agentleFS
BK202503BK202503/open-claude-all/skills/parallel-dispatch/SKILL.md

parallel-dispatch

Skill7 starsChanged 4 months agoMITView on GitHub

When the user's message contains multiple INDEPENDENT tasks in one turn, fan out to N subagents in a single response instead of executing sequentially. Detects compound requests ("check A and also B", "all three of these", "look up X, grep for Y, and read Z") and routes each unit to the most specific worker (Explore, general-purpose, ...). Triggers automatically whenever a single user turn has ≥ 2 independent actionable items. Skip when items depend on each other (must be sequential).

10 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use test-driven-development, verification-before-completion and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • OpenAISkill

    test-driven-development

    Use when implementing any feature or bugfix, before writing implementation code

    Also in 5 projects that use this

  • OpenAISkill

    verification-before-completion

    Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always

    Also in 4 projects that use this

  • CloudflareSkill

    receiving-code-review

    Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation

    Also in 3 projects that use this

  • CloudflareSkill

    security-audit

    Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons. Use for security questions, focused reviews, vulnerability research, security audits, or pen tests. Run the complete workflow only for explicit codebase audit or pen-test requests, full/comprehensive/end-to-end reviews, or requested report artifacts.

    Also in 3 projects that use this

  • +7 more from openai

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 8 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the user's message and enumerate INDEPENDENT actionable items.

    line 15
  2. Distinctive:

    If in doubt: sequential. Do NOT force parallelism when it introduces ordering risk.

    line 25
  3. Distinctive:

    If only ONE item is present, this skill does not apply.

    line 27
  4. Distinctive:

    If a unit needs live user approval mid-flight (e.g.

    line 38
  5. Distinctive:

    When all subagents return, produce ONE aggregated response for the user.

    line 63
  6. Distinctive:

    If any subagent errored, surface the error inline with the unit's label.

    line 65
  7. Very specific:

    If the user's turn has > 12 independent units, split into two responses of ≤ 12 each.

    line 72
  8. Distinctive:

    Do NOT chain the second batch behind the first if the units are truly independent — emit the second batch as soon as the first returns.

    line 73
  9. Very specific:

    Over-parallelising trivial work: Do not spawn a subagent for a single gh pr view when the parent can just call Bash directly in one turn.

    line 81
  10. Distinctive:

    Racing writes: If two units both edit the same file / repo / branch, they are NOT independent.

    line 83

“Common” is measured: kept by at least 6 in 10 of the 8 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

Parallel dispatch — one user turn, N parallel workers

The default failure mode of the primary Claude is executing multi-task user turns sequentially. That is measurably slower on I/O-bound work (gh, WebFetch, git, log polling) and burns cache repeatedly. This skill enforces a different pattern: read the whole turn, split into independent units, dispatch all units in one assistant response.


Phase 1 — Split the request

Read the user's message and enumerate INDEPENDENT actionable items. Two items are independent if:

  • Neither reads the other's output.
  • The user's phrasing lists them as parallel (A, B, C, X and also Y, all of these).
  • Order does not matter for correctness.

Items are NOT independent if:

  • Item B needs a value / decision from item A.
  • User uses sequencing words (first A, then B, once A finishes, B).
  • Item B is a follow-up (check A, and if there's an issue, B).

If in doubt: sequential. Do NOT force parallelism when it introduces ordering risk.

If only ONE item is present, this skill does not apply. Return control immediately without emitting anything.

Phase 2 — Route each unit

For every independent unit, pick exactly one worker:

Unit shapeWorker
"look up file / grep / read"Agent(Explore, prompt=<query>)
Anything else that is a well-scoped read-only research / analysis / summaryAgent(general-purpose, prompt=<unit>)

If a unit needs live user approval mid-flight (e.g. anything that will post to a shared surface — external comment, PR create, etc.), do NOT parallelise it — hand it back to the parent as sequential.

Phase 3 — Emit all workers in ONE response

Critical: emit every Agent(...) call in the same assistant response. Claude Code executes tool calls in the same response concurrently; splitting across responses is sequential.

Concrete example. User says: "grep for PaymentIntent in packages/api, list all TS files that import date-fns, and find where MAX_RETRIES is defined."

Correct emission (one response, three tool calls):

Agent(subagent_type="Explore", description="grep PaymentIntent", prompt="grep for symbol 'PaymentIntent' under packages/api and return file:line hits.")
Agent(subagent_type="Explore", description="date-fns importers", prompt="Find every TS file that imports from 'date-fns'.")
Agent(subagent_type="Explore", description="MAX_RETRIES definition", prompt="Find where MAX_RETRIES is defined and return the file:line and the value.")

Incorrect — three separate responses:

Response 1: Agent(Explore, PaymentIntent)
Response 2: Agent(Explore, date-fns)
Response 3: Agent(Explore, MAX_RETRIES)

Phase 4 — Aggregate

When all subagents return, produce ONE aggregated response for the user. Never regurgitate each subagent's raw output — group by outcome (found / not-found / errored) and put the most actionable bucket first.

If any subagent errored, surface the error inline with the unit's label; do not retry silently.


Concurrency budget

  • Hard cap: 12 subagents per response. Beyond that Claude Code starts serializing.
  • If the user's turn has > 12 independent units, split into two responses of ≤ 12 each. Announce the split briefly (Fanning out in two batches (12 + N)…).
  • Do NOT chain the second batch behind the first if the units are truly independent — emit the second batch as soon as the first returns.

Anti-patterns

  • Fake parallelism (sequential in disguise). Emitting one Agent per response and pretending it is parallel. It is not.
  • Fake independence. Splitting a workflow that has dependencies (fix bug → run tests → commit) into parallel workers. That will corrupt state.
  • Over-parallelising trivial work. Do not spawn a subagent for a single gh pr view when the parent can just call Bash directly in one turn.
  • Skipping the aggregation. Returning raw subagent transcripts to the user is noise. Always aggregate.
  • Racing writes. If two units both edit the same file / repo / branch, they are NOT independent. Sequential.

When NOT to invoke

  • Single-task user turns.
  • Any user turn where ordering matters (all then, after, if X).
  • Tasks that require the user's live approval mid-flight (posting to any shared / external surface).
  • One-shot lookups where a fast Bash call in parent is cheaper than spawning a subagent.

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.