fanout-brief
Run several Claude workers on one piece of work and get back a result you can trust — parallel subagents, background agents, a sequence of build sessions, or sessions driving a live app. Covers code and non-code work alike - parallel research and prior-art checks, weighing options for a decision, audits and inventories, drafts, and gathering across accounts or channels. Use when the user says fan out, split this up, use sub-agents in parallel, get agents to research or check this, run these at the same time, or when a task has independent parts worth doing concurrently; also for deciding who owns which files, checking a shared base before dispatch, relaying a finding to running workers, reviewing what workers returned, and merging their work into one tested result. Each worker's own brief is written with worker-brief. Not for a single bounded edit or an ordinary question.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- fanout-brief
- description
- Run several Claude workers on one piece of work and get back a result you can trust — parallel subagents, background agents, a sequence of build sessions, or sessions driving a live app. Covers code and non-code work alike - parallel research and prior-art checks, weighing options for a decision, audits and inventories, drafts, and gathering across accounts or channels. Use when the user says fan out, split this up, use sub-agents in parallel, get agents to research or check this, run these at the same time, or when a task has independent parts worth doing concurrently; also for deciding who owns which files, checking a shared base before dispatch, relaying a finding to running workers, reviewing what workers returned, and merging their work into one tested result. Each worker's own brief is written with worker-brief. Not for a single bounded edit or an ordinary question.
02 资源文件 12
- 参考文档references/coordination-doc-template.md1.4 KB
- 参考文档references/execution-modes.md6.4 KB
- 参考文档references/grounding-and-evidence.md3.1 KB
- 参考文档references/integration-and-acceptance.md2.8 KB
- 参考文档references/live-driving.md2.4 KB
- 参考文档references/non-code-work.md5.6 KB
- 参考文档references/preflight.md7.3 KB
- 参考文档references/work-contract.md4.8 KB
- 脚本scripts/fanout_preflight.py12.2 KB
- 脚本scripts/fanout-preflight.sh880 B
- 脚本scripts/scope_check.py11.0 KB
- 脚本scripts/test_fanout_gates.py15.6 KB
03 SKILL.md 正文
Fanout brief
You are the lead. You plan, brief, dispatch, relay, recombine and accept. Workers answer to you; the user talks only to you. A worker may prove its brief wrong, which is useful. Accepting the combined result stays with you even when agents did the checking.
Decide what the user asked for
A request for briefs or prompts ends with ready-to-use briefs, not a running job. A request to do the work goes through dispatch, recombination and acceptance. A request to review returns starts from what came back. Do not turn one into another.
Split by dependency, not by headcount
Write down the result and the evidence that will establish it before splitting. Then draw the dependencies:
- Independent questions or changes with stable interfaces go in parallel.
- Tightly coupled changes stay with one owner, or run in sequence.
- Readers (investigation, review) can share one checkout. Builders each need their own git worktree.
- Reserve capacity for review, testing and recombination. Filling every slot with builders starves the work that finishes the job.
Name what each extra worker buys: separate context, parallel time, or an independent view. If you cannot, use fewer. Splitting pays most when the answer depends on material in several separate places (files, logs, tickets, mail): give each worker one place to read in full. One open web question is better kept with one worker; in our own use, splitting it cost more and did no better. A one-line fix needs one session and a test. Scale to the question: one worker for a fact, 2-4 workers for a comparison, more than 10 only for broad research. When a job has two or more independent substantial parts, send them out together in one message instead of working through them in turn; the Agent tool's own "when in doubt, don't spawn" is about small lookups, not about this.
One lead, one level of workers by default: coordinated workers beat independent ones on parallel tasks, independent agents amplify errors about four times as much, and extra agents add little to a task one agent already does well (Google, 2025). A worker does its own work by default and starts read-only helpers only for independent parallel reads or an independent check of a costly result; those helpers spawn nothing. Deeper trees over-prescribe and assume state nobody passed down (Cognition). A worker is a bounded call that returns a result, not a nested supervisor.
Work goes out in waves. A planning wave (readers, no edits) returns findings and plans. A build wave (one job and one worktree each) returns changed code and a report. A use wave (testers on one frozen, recombined copy) returns real conversations and findings. Only a build wave has anything to recombine; real bugs from a use wave become the next build wave.
Work that isn't code (research, decisions, audits, drafts, admin) runs the same loop with different nouns: acceptance is the questions or end state you will check, ownership covers people, accounts and ledgers as well as files, and a fresh check of the claims the result rests on stands in for the test suite. See non-code work.
Ground the run before dispatch
Workers inherit your mistakes at scale, so check the base once:
- Open every path you cite. Record the base commit and the verified baseline test command, and whether it passes now.
- For a repository build, the optional script does this mechanically:
A nonzero exit blocks any claim that the baseline passes. Exit 0 means the command completed, not that the product works. See preflight for flags.bash scripts/fanout-preflight.sh /absolute/repo --test 'the verified baseline command' - Give each worker the project rules it needs (the relevant CLAUDE.md lines, conventions, gotchas) inside its brief. A link it cannot read, or does not know it must read, is not a rule it will follow.
- For research outside a repository, record the source list and the time instead.
Use grounding and evidence when a cause, count or regression claim will travel between workers.
Dispatch the set
Write each brief with worker-brief, then read the whole set side by side. The set carries three things no single brief can:
- Ownership. Write scopes do not overlap, each brief names its neighbours, and every mutable thing (a file, a record, a ticket, a shared field) has one named writer. A worker never reverts another's edits. It asks you before touching another owner's file or a shared contract, and continues its own work meanwhile.
- Interfaces. Each shared contract (a field, a status value, an API shape) lives in one record, cited by revision from both the producer's and the consumer's brief.
- Resources. A worktree isolates files, not databases, ports, queues, browser tabs or outbound messages. Allocate those explicitly, along with each worker's scratch directory and report path.
- Returns. A worker that edits writes its full report to its own path and returns the path with a short summary (one or two thousand tokens). Every brief says what happens if that fails: if hand-back is refused or the write is refused, the worker puts the whole report in its final message as plain text. A read-only worker (research, lookup, review) returns its report inline under fixed headings and you save it: Claude Code tells subagents to return findings as text, so their report files are often refused. The refusal is a fixed rule on the file name, so name a writer's report after the worker (
w2-out.md): a subagent's write to a.mdstartingreport,summary,findingsoranalysisis blocked.
The bundled worker agent runs one briefed build job in its own git worktree and reports under the fixed headings; researcher and reviewer cover read-only questions and the independent check. Execution modes covers Claude subagents, worktree isolation, agent teams, background runs and resuming interrupted work. Live driving covers a session that operates a running app.
Coordinate while work runs
Keep a small run record: worker IDs, worktrees, base commits, ownership, contract revision and status (template). Keep two ledgers in it: a task ledger (verified facts, guesses, plan) and a progress ledger per worker (done, progressing, next owner, next instruction). A check that finds no progress or a repeated step is a stall; at two, replan from the ledger rather than resend the instruction (Magentic-One; repeated steps are a sixth of multi-agent failures, MAST). When a finding affects others, relay it with the changed contract revision and ask for acknowledgement; silence is not agreement. If a change invalidates running work, name what must be redone.
Use the waiting time for synthesis and dependency work. Do not edit workers' files, poll without reason, or assume an interrupted process finished. Save each report as it arrives, and check that the saved body really is that worker's (its own title or task ID), not just filed under the right heading.
Recombine and accept
Read each worker's diff and evidence against the original acceptance checks, not against its own summary. Reproduce anything disputed and anything high-consequence yourself. The doer never verifies its own work: a fresh context checks the end state. A model judge for repeated runs starts on about 20 real cases with known outcomes plus a person reading its verdicts (MAST: unclear specs are two fifths of multi-agent failures, missed verification a fifth).
Recombine one candidate at a time onto a tested base, and run the tests after each. If adding C breaks two tests, look at C or at how C meets A and B. Passing alone is not passing together: the combined build is a new candidate and needs its own run. For an agent or chat product, test the combined app through its real entry point with multi-agent-system-design's testing loop; mocked parts stay named as unverified. For research, decisions or documents, merge by claim rather than by worker, have a fresh worker check the claims the result rests on (non-code work), then read the combined deliverable.
Integration and acceptance has the git steps, the scope checker and how to reconcile producers and consumers.
Keep five words separate in everything you report: changed, tested, committed, integrated, deployed. A tested uncommitted change can be ready for approval; a committed one can be missing from the running app. Commits, pushes and anything sent outward follow the user's existing permission; this skill grants none.
Finish
Deliver the result before housekeeping can eat the remaining context: what changed, how it was checked, what remains and who continues it. Then release what this run acquired (processes, ports, worktrees no longer needed), keeping anything still needed for acceptance. If the work continues, hand over with close-out. When a brief turned out wrong, fix the brief template or the project's notes, not just this run.
The work contract defines the shared vocabulary (verdicts, candidate identity, status) used across briefs, returns and handovers. Map it onto whatever task tracker the project already has; do not create a new one to use this skill.
04 同仓库更多 Skills
write-human
暂无简介
worker-brief
Write the brief for a subagent, background agent or headless Claude session so it can succeed with no memory of this conversation, then lint it before dispatch. Use whenever you delegate — spawning an Agent or Task call, handing a job to a subagent, writing a prompt for another agent or session, queueing work for later, or re-briefing a worker whose first attempt missed. Covers acceptance first, inputs checked now, gotchas, write scope, authority, budget and partial returns, a separate report path, and permission to push back. For several workers on one job, use fanout-brief as well.
test-crew
Test a running app, tool, AI agent or plan in minutes with a crew of independent AI testers run in parallel against the real thing on this machine - a user who tries to get the job done, an attacker who tries to break in or misuse it, a strategist who asks whether it is worth using, and optionally a breaker for edge inputs - each finding tied to an input that reproduces it. Use when the user says test it, try it out, does this actually work, is it ready, sanity-check it, pentest or red-team it, UX test, user test, stress-test the plan, or before calling a build done, demoing or shipping it; also to test a chatbot or agent with a simulated user and attacker. Fast and local, not a diff review (review-changes) or a CI suite. Ships a planted-defect app to check the crew itself still catches what it should.
review-changes
Use this skill whenever someone asks you to review, check or look over a diff, pull request, patch, script or config change, however short, and before you call your own change ready. Reviews changed code, scripts or configuration — a diff, a pull request, the first working version of a feature, partial work being parked, a helper script whose output you are about to rely on, or several workers' changes combined. Use when asked to review, check or sanity-check a change, and on your own at those points during a build. Runs each new check against its whole input class, opens every caller and consumer the change touches, looks for other routes around a guard, compares the result with main, and reports only findings that matter, each with the input that reproduces it.
pr-writing
Write a pull request title and description a reviewer who never saw the conversation can assess quickly — the concrete problem, the resulting behaviour, how it was checked and what was left out. Use when drafting or opening a PR, preparing a branch for review, writing a PR for an open-source project, or rewriting a PR after its scope changed. Follows the target repository's template, branch and commit conventions. Drafting is not permission to push or open the PR.
oss-contribute
Take an open-source repository you have never opened to a small, reviewable pull request in one session — pick an unclaimed issue, open the clone safely, learn the project's rules, fix it test-first, write it up, and stop for the human to push. Use when the user says contribute to X, find me something to fix in X, any good first issues in X, ship a PR to X, or can we fix this bug upstream. Includes quarantining a stranger's repo so its CLAUDE.md, AGENTS.md and .claude/ folder cannot load as instructions or hooks. Stops at green tests and a diff; the human opens the PR.