parallel
Skill9 starsChanged 8 months agoMITView on GitHub
Spawn N peer agents on genuinely independent subtasks, wait for every result, then merge. Use when subtasks do not read each other's outputs and the wall-clock saving is worth N× the token cost.
7 other projects use a version of this.
Adopted by
Most recently taken up by
- BULDEE/ai-craftsman-superpowerstheir own version, first seen Sep 21, 2026
- nc9/skillstheir own version, first seen Sep 19, 2026
- xjsongphy/skillstheir own version, first seen Aug 17, 2026
- TechNickAI/openclaw-configtheir own version, first seen Apr 2, 2026
- Jay-523/agent-skillstheir own version, first seen Mar 28, 2026
- AGMO-Inc/agmo-everywheretheir own version, first seen Mar 18, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- am-will/codex-skills★ 1ksame name
- TechNickAI/openclaw-config★ 76same name
- BULDEE/ai-craftsman-superpowers★ 35same name
- Jay-523/agent-skills★ 17same name
- xjsongphy/skills★ 7same name
- AGMO-Inc/agmo-everywhere★ 4same name
- nc9/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.
In this repository3 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- context-protectSkill
- verifySkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
0
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
- Very specific: line 107
Call 2 (packages/billing/) and Call 3 (packages/notifications/) run in parallel with the same shape, different contextIds and scopes.
- Very specific: line 116
Every branch reached final: true?
“Common” is measured: kept by at least 6 in 10 of the 6 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.
Files
parallel — spawn N independent peers, merge when they finish
The only safe multi-agent parallel pattern: carve the work into subtasks that do not depend on each other's outputs, send each to a peer, await all of them, then merge. If any subtask depends on another's result, this pattern degrades to sequential with extra steps and should not be used.
When to use
- Subtasks are independent by construction — different files, different modules, different investigations, different doc pages.
- Each subtask's output is stable regardless of the others' outcomes.
- Wall-clock latency matters enough to justify N× the token cost. (The equivalent sequential run costs 1× tokens; parallel costs N× and only saves time.)
When NOT to use
- Subtasks share context or build on each other's output. Merge loses fidelity; sequential with the real output is better.
- The "independence" is by job title (planner / implementer / tester / reviewer). This is sequential pretending to be parallel and almost always underperforms one session with the same tools.
- One of the subtasks would be cheap enough to inline. Parallel overhead only pays off when every branch is substantial.
Protocol
Spawn one message/stream call per subtask. Each call gets its own
contextId so replies do not cross wires; a2a-bridge's RoomRouter
(Phase 4) isolates them end-to-end. Then await every SSE stream to
its terminal status-update.final === true and merge.
┌─ subtask A ─────────► peer 1 ─► artifact-update A ─► final A ┐
├─ subtask B ─────────► peer 2 ─► artifact-update B ─► final B ┤─► merge
└─ subtask C ─────────► peer 3 ─► artifact-update C ─► final C ┘return_format per branch is a caller choice:
"full"when each branch's raw output matters to the merge."summary"when only a conclusion per branch matters (seeskills/context-protect/)."verdict"when each branch is a check (seeskills/verify/); merge ispassonly when all branches returnpass.
Prompt scaffold
Each subtask gets a self-contained prompt. It must not reference the other subtasks because the peer cannot see them.
You are handling subtask <k of N> in an independent parallel set.
Your output will be merged with the other subtasks' outputs; do NOT
reference or assume knowledge of them.
SCOPE:
<precisely what this subtask covers, e.g. "only files under
packages/auth/">
NON-SCOPE (explicitly ignore):
<what this subtask must not touch, so merges do not overlap>
TASK:
<concrete instruction>
OUTPUT FORMAT:
<same per-branch format — bullet list, JSON, verdict — so the merge
is a straightforward concatenation, not a transformation>Keeping the output format identical across branches is the biggest lever on merge quality; a heterogeneous output set forces a second merge pass and usually erases the wall-clock win.
Worked example
Scenario: review a cross-cutting PR that touches three independent packages. A single reviewer session would have to hold all three contexts. Three parallel review branches keep each context focused.
Call 1 (packages/auth/):
{
"jsonrpc": "2.0",
"id": "par-auth",
"method": "message/stream",
"params": {
"message": {
"contextId": "ctx-auth-review",
"parts": [{ "kind": "text", "text": "You are handling subtask 1 of 3 ... SCOPE: files under packages/auth/ in PR 4821. NON-SCOPE: everything else. TASK: flag any missing auth checks or input validation. OUTPUT FORMAT: JSON {\"findings\": [{\"file\": ..., \"line\": ..., \"issue\": ...}]}" }],
"metadata": { "return_format": "full" }
}
}
}Call 2 (packages/billing/) and Call 3 (packages/notifications/)
run in parallel with the same shape, different contextIds and
scopes.
Caller awaits all three SSE streams to completion, concatenates
findings arrays, and presents one merged list sorted by file.
Merge checklist
- Every branch reached
final: true? If not, retry the missing branch; do not pretend partial data covers the whole job. - Output formats match? Heterogeneous formats mean the merge becomes its own LLM turn — add one more second to the wall-clock budget.
- Any branch returned
needs-info(if you used the verdict variant)? Surface that branch's reasoning separately; do not silently drop it from the merge.
See also
architecture.md§"return_format hint" — how each branch's output mode is relayed to the peer.skills/verify/— when each branch is a check and the merge is all-pass-or-fail.skills/context-protect/— when each branch should return a summary instead of raw output.
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
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.

