agentleFS
daman8271daman8271/the-perfect-orchestrator/skill/SKILL.md

orch

Skill1 starsChanged 5 months agoMITView on GitHub

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".

4 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions4 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 4

    1. vanillagreencom/kendex★ 76same name
    2. gabrielkoerich/orch★ 21same name
    3. kbarendrecht/orchestrator★ 11same name
    4. Henrique-All/skills★ 4same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Brief neutrally: don't pre-declare the cause ("verify *whether/why* X is wrong", not "fix the X bug") — workers investigate instead of …

    line 39
  2. Distinctive:

    One owner per shared file: if several workers would edit the same shared file, assign ONE owner.

    line 40
  3. Very specific:

    TUI height: don't cram many panes into one window — the worker TUI needs rows.

    line 53

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

commandwhat 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)

  1. PLAN — split the job into N independent sub-tasks (one per worker). Pick N deliberately (see Limits).
  2. SPAWN — orch spawn <name> <N> [workdir]. Give workers a few seconds to boot (a pane showing a ready prompt = booted).
  3. 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 to touch, and how to use the bus.
  4. DISPATCH — orch send <name> <i> --file .../agent-<i>.task.md for each booted worker.
  5. 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.
  6. MONITOR (your core job) — periodically orch read each pane + read bus.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.
  7. COLLECT — each worker touches a done-flag (e.g. shared/agent-<i>.done) + writes agent-<i>.result.md. Poll the flags (background loop or orch status) so you know when all are done.
  8. 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 flock on a repo-local lockfile), do NOT push; the lead verifies then pushes. Use git show --stat <hash> to confirm each commit is own-files-only (workers must git 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 send only 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) then tmux send-keys -t "$pane" Escape; tmux send-keys -t "$pane" C-a; tmux send-keys -t "$pane" C-k then your clean message, then a separate tmux send-keys -t "$pane" Enter.
  • A long message typed via send-keys sometimes needs Enter sent 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/tmux calls get blocked, the user must add allow-rules to ~/.claude/settings.local.json: Bash(orch:*) and Bash(tmux:*). Run orch doctor to 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 spawn per target) or batch them.
  • Tear down finished fleets (orch kill) to free resources + your attention. Check live sessions with orch 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.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.