fan-out-fan-in
Skill56 starsChanged 38 days agoApache-2.0View on GitHub
Use this workflow skill only when the user wants explicit parallelization or the task should be split into isolated worktrees and merged back without separate PRs.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- prerock/fan-out-fan-in-agent-skilltheir own version, first seen Jun 15, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- prerock/fan-out-fan-in-agent-skill★ 1same 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 repository35 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/AGENTS.mdAGENTS.md
- android/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- .github/CLAUDE.mdCLAUDE.md
- ios/CLAUDE.mdCLAUDE.md
- auto-mobile-code-reviewSkill
- ci-failure-triageSkill
- github-pr-feedbackSkill
- ios-swift-ciSkill
- node-prepushSkill
- prepush-androidSkill
- shell-prepushSkill
- android-gradlewSkill
- auto-mobile-code-reviewSkill
- bun-tasksSkill
- check-ciSkill
- ci-failure-triageSkill
- dead-codeSkill
- device-session-lifecycleSkill
- github-cliSkill
- github-pr-feedbackSkill
- ios-swift-ciSkill
- manual-testSkill
- node-prepushSkill
- observeSkill
- pr-analysisSkill
- prepush-androidSkill
- push-my-prsSkill
- push-prSkill
- researchSkill
- shell-prepushSkill
- ship-issueSkill
- testSkill
- validateSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
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
- Distinctive: line 8
Use this when the user explicitly wants parallel agent work or the task is naturally decomposable into independent file scopes.
- Very specific: line 12
Read the plan from a file such as scratch/plan.md or from inline instructions.
- Distinctive: line 14
Stop if git status --short is not clean.
- Distinctive: line 20
Remove successful worktrees and branches.
- Distinctive: line 24
Prefer repo validations over generic ones:
- Very specific: line 28
Write logs that matter to scratch/ if they are too long to inspect inline.
- Distinctive: line 29
Do not create PRs or push branches as part of fan-out work.
- Distinctive: line 30
Do not proceed if the work cannot be partitioned cleanly.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Fan Out Fan In
Use this when the user explicitly wants parallel agent work or the task is naturally decomposable into independent file scopes.
Workflow
- Read the plan from a file such as
scratch/plan.mdor from inline instructions. - Record the parent branch and commit with
git branch --show-currentandgit rev-parse HEAD. - Stop if
git status --shortis not clean. Do not fan out from a dirty tree. - Scan recent history and existing worktrees with
git log --oneline -20andgit worktree listso you do not duplicate work. - Split the work into units that do not edit the same files. If two units need the same file, merge them or sequence them.
- For each unit, create an isolated worktree from the parent commit with
git worktree add ../worktree-unit-N -b fan-out-unit-N "$PARENT_COMMIT". - In each worktree, implement only the assigned scope, run the relevant validation, and commit with
fan-out: [unit-name]. - Merge unit branches back into the parent branch one at a time, validating after each merge and again at the end.
- Remove successful worktrees and branches. Preserve failed ones for inspection.
Repo Rules
- Prefer repo validations over generic ones:
- TypeScript:
bun run lint,bun run build,bun test - Fast repo checks:
bash scripts/all_fast_validate_checks.sh - Android:
(cd android && ./gradlew <task>)
- TypeScript:
- Write logs that matter to
scratch/if they are too long to inspect inline. - Do not create PRs or push branches as part of fan-out work.
- Do not proceed if the work cannot be partitioned cleanly.
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.

