Skill
Spawn and orchestrate a fleet of autonomous Claude Code workers in tmux. One LEAD Claude (you) spawns N worker sessions, hands each a task brief, coordinates them via a shared message bus, monitors them live, intervenes when they drift, and adversarially verifies results before reporting. Use for parallelizable, multi-target, long-running work (audits, fixes across many modules/platforms, broad sweeps, "do X across all N of these"). Triggers: "spawn a fleet", "orchestrate workers", "delegate this across sessions", "tmux Claude team", "divide this and run it in parallel".From its SKILL.md
npx -y skills add daman8271/the-perfect-orchestrator --skill skillAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
- runs commandsInstructs the agent to run 7 commands, including `orch spawn <session> <N> [workdir]` and 6 more.
SKILL.md
6.2 KB, ~1.5k tokens by cl100k_base, as published. Nobody here has run it
The Perfect Orchestrator — lead playbook
You are the LEAD. This harness lets you spawn N autonomous Claude Code workers
(each its own tmux pane), brief each one, watch them, correct them, verify their
results, and drive them to completion — all from this one session. The CLI is orch
(run orch --help for usage; state lives under $ORCH_HOME, default ~/.orch).
The harness commands
| command | what it does |
|---|---|
orch spawn <session> <N> [workdir] | Create tmux session orch-<session> with N worker panes + a shared workspace at $ORCH_HOME/runs/<session>/shared/ (contains bus.md; panes.txt lives one level up). Workers are numbered 1..N. Workdir defaults to the current directory. |
orch send <session> <#> --file <path> | Dispatch a task: tells worker # "Read and follow <path> then begin, work autonomously." |
orch send <session> <#> <one-line msg> | Send a short single-line nudge (NO newlines — newline submits). |
orch read <session> <#> [lines] | Capture a worker's pane (to see what it's doing). |
orch status [session] | Overview of all live fleets, or one fleet's panes + done-flags + bus tail. |
orch kill <session> | Tear down a fleet when done. |
Workers launch with an isolated config (no hooks → no notification spam on every
turn, a generous allowlist → no permission prompts, shared live credentials,
ORCH_WORKER=1). When a worker's claude exits, its pane ends.
The workflow (do it in this order)
- PLAN — split the job into N independent sub-tasks (one per worker). Pick N deliberately (see Limits).
- SPAWN —
orch spawn <name> <N> [workdir]. Give workers a few seconds to boot (a pane showing a ready prompt = booted). - BRIEF — write each worker's brief to
$ORCH_HOME/runs/<name>/shared/agent-<i>.task.md. A good brief is self-contained: the goal, hard constraints (what NOT to touch), exactly what to produce, where to write its result + a done-flag totouch, and how to use the bus. - DISPATCH —
orch send <name> <i> --file .../agent-<i>.task.mdfor each booted worker. - COORDINATE via the bus — tell workers to post findings to
shared/bus.md(lines prefixed[Wn]) and to read it. When one discovers something (a bug class, a shared fix needed), the others act on it. The bus is the fleet's shared memory. - MONITOR (your core job) — periodically
orch readeach pane + readbus.md. Catch wrong-roads early and correct them with a nudge. Watch for: off-task drift, dead-ends, forbidden actions, or stalls. Re-check on a cadence (~80–600s) so you stay free between passes; a tighter cadence = closer watch. - COLLECT — each worker
touches a done-flag (e.g.shared/agent-<i>.done) + writesagent-<i>.result.md. Poll the flags (background loop ororch status) so you know when all are done. - VERIFY + TEAR DOWN — read the results, verify them adversarially (don't trust blindly — have a DIFFERENT worker try to refute each finding), then
orch kill <name>. Report a consolidated sign-off BEFORE killing sessions.
Patterns that work (battle-tested)
- Find → verify: some workers FIND issues; a different worker VERIFIES each finding. Independent eyes kill false positives.
- Brief neutrally: don't pre-declare the cause ("verify whether/why X is wrong", not "fix the X bug") — workers investigate instead of rubber-stamping your assumption. (This repeatedly caught the lead being wrong.)
- One owner per shared file: if several workers would edit the same shared file, assign ONE owner; the rest request changes via the bus — else their git commits collide.
- Commit-local, lead pushes: workers commit only their own files (behind a
flockon a repo-local lockfile), do NOT push; the lead verifies then pushes. Usegit show --stat <hash>to confirm each commit is own-files-only (workers mustgit add <own paths>, never-A). - 3× cross-verify for high-stakes: R1 audit → R2 adversarially refute R1 → R3 confirm survivors.
Nudging / un-sticking a worker
orch sendonly sends single-line messages (or--file). Long text with newlines will submit early — put it in a file.- To clear a stuck/garbled input draft, drive tmux directly:
pane=$(sed -n '1p' $ORCH_HOME/runs/<s>/panes.txt)thentmux send-keys -t "$pane" Escape; tmux send-keys -t "$pane" C-a; tmux send-keys -t "$pane" C-kthen your clean message, then a separatetmux send-keys -t "$pane" Enter. - A long message typed via send-keys sometimes needs
Entersent twice to submit. Never type onto an existing draft (it concatenates).
Limits / gotchas
- PERMISSIONS (the #1 blocker): the permission classifier may deny autonomous spawns/sends. If
orch/tmuxcalls get blocked, the user must add allow-rules to~/.claude/settings.local.json:Bash(orch:*)andBash(tmux:*). Runorch doctorto print them. - SCALE: workers are real sessions consuming real usage — size the fleet to the work AND to the user's plan. If the account rate-limits, fleets degrade; prefer fewer, better-briefed workers.
- TUI height: don't cram many panes into one window — the worker TUI needs rows. For many workers, spawn separate sessions (one
orch spawnper target) or batch them. - Tear down finished fleets (
orch kill) to free resources + your attention. Check live sessions withorch status.
When NOT to use this
For a single quick task, just do it yourself or use one subagent. Reach for the fleet only when the work is genuinely parallel, multi-target, and long enough that one lead managing many workers beats serial execution.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.