delegating-to-subagents
Skill0 starsChanged 3 days agoMITView on GitHub
Use when handing work to subagents — writing dispatch briefs, partitioning parallel edits across agents, deciding whether a silent agent is stuck — and whenever anything a subagent produced is about to be used — an identifier wired into code, a diff committed, a finding acted on, a "done" accepted.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- claudeaibot26/claude-skillstheir own version, first seen Nov 16, 2026
- MorganOnGitHub/tackletheir own version, first seen Sep 27, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- claudeaibot26/claude-skills★ 0same name
- MorganOnGitHub/tackle★ 0same 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 repository20 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- addressing-review-feedbackSkill
- budgeting-agentic-workSkill
- coordinating-sessionsSkill
- explaining-changes-visuallySkill
- git-syncSkill
- implementation-gatesSkill
- implement-planSkill
- landing-merged-workSkill
- maintaining-project-memorySkill
- plan-featureSkill
- reporting-defects-upstreamSkill
- review-prSkill
- tracking-open-asksSkill
- verifying-before-sendingSkill
- writing-code-commentsSkill
- writing-commit-messagesSkill
- writing-for-audiencesSkill
- writing-plan-docsSkill
- writing-pr-descriptionsSkill
The file
Files
Delegating to Subagents
This skill does not decide when to delegate — the superpowers dispatch skills own that decision and the shape of a good brief; call the Skill tool with them rather than restating them here.
What it adds is what dispatch skills lack: collision-safe partitioning, and the discipline that a subagent's output is a claim about work, not the work. Every rule below is one where treating the output as fact shipped a defect or lost a session's worth of results — briefs that were followed into a bug, diffs committed with the agent's monologue in them, identifiers pasted from a report straight into runtime code, and reports that never arrived at all.
Before dispatch
Know the agent type's isolation before giving it edits. A repo's custom agent types may run in a fresh git worktree by default — even when isolation was not requested — and a worktree can be branched from a stale base commit where the target files do not yet exist. Edits made there never land on the current branch. Two agents once produced correct designs that could not be applied for exactly this reason, costing the whole parallel round. When edits must land on the current working tree, use an agent type known not to isolate; if an agent reports "edit the worktree copy instead" or that target files are missing, it is isolated on a stale base — re-delegate or apply the hunks yourself.
Partition parallel edits by file ownership, never by finding. Several findings usually live in one file; handing agents findings means concurrent writes and lost edits, handing them files makes collisions structurally impossible. A finding that spans a boundary gets split at the boundary. Three boundaries file ownership does not protect:
- Git. No agent sharing a tree — the working tree, or a worktree other agents read — runs a git write command (commit, restore, stash, reset, add): repo-wide operations respect no file boundary. The sole occupant of its own dedicated worktree may restore or reset files there; commits stay the orchestrator's everywhere, one per workstream, after verifying that workstream alone.
- Verification. Typecheck and tests are repo-wide, so one agent mid-edit reddens everyone else's run. Serialize the workstream that changes types everyone reads.
- The file itself. While agents share a tree,
git show <sha>:<path>at the pinned commit is the only fixed point — the copy in the tree may be mid-edit by someone else, so re-read from the object before asserting anything about a file. An agent that must transform a shared file works on a scratch copy and writes the result back in one step: an in-place, unbounded rewrite once left the file wrong for minutes and hung the suite every other agent runs. To preserve a dying agent's uncommitted work,git stash createfollowed bygit update-refrecords it as a commit object without touching the tree; a plaingit stashreverts the tree under everyone.
Specify cross-boundary contracts yourself, upfront (the exact shape, the exact name), so two agents cannot disagree about a seam neither owns.
Make the brief falsifiable. The dispatch skills own brief structure; what they miss is falsifiability — state mechanisms and expected behavior precisely enough that the agent can prove you wrong. In one large remediation, three agents corrected the orchestrator's own instructions: a wrong rule, an overstated finding, an upstream reference implementation that was itself broken. A vague brief would have been followed, and the bug shipped.
Name the file the report goes to in every spawn prompt, and make long work recoverable from disk. Background agents can finish without their final text ever reaching you — completion arrives as a bare idle signal — and what does arrive is cut: the transport truncates a report mid-finding, and the text before the cut reads as a finished sentence, so nothing in what you receive says anything is missing. A second budget is shared by the agents whose reports arrive together, and it replaces a whole report with a placeholder, so a report well inside the per-report limit is lost for having arrived beside its siblings — which is why the short dispatch needs a file as much as the one expected to produce many findings. End every spawn prompt by naming the path the agent writes its full report to, and ask for a reply of that path alone. The instruction does not retrofit: an agent told after the fact to write a file keeps re-sending prose in chat, so the recovery costs more round trips than naming the path upfront would have. Tell any long-running agent to script its work and write its running results to a file as it goes: when one vanished at a session boundary — unreachable, results gone — its scripts survived, and re-running them cost minutes instead of a fresh dispatch from zero.
An agent whose output is a file is dispatched as a one-shot background agent, never as a named teammate with a mailbox: a teammate reports twice, once with its result and once as it goes idle, and each report wakes the orchestrator for a full-context turn.
While it runs
Nothing an agent sends reaches you inside the turn that dispatched it. A reply, and the completion signal with it, are injected only where your own turn ends: the send reports success, the message lands in your inbox, and every further tool round of that same turn sees none of it — so a message pulling for a missing report, and any wait for one, are unanswerable by construction. Mid-turn the file the dispatch named is the only channel that carries a report; an agent's listed availability and its workspace are the only other evidence of its state. Pull for what is still missing at the end of the turn, not inside it.
Idle is not done, and silence is not death. Agents routinely go idle without delivering — pull the report explicitly, restating the exact output format wanted and asking for an honest partial — what blocked it and how far it got — so a stuck agent and one that finished but wrote its result as prose both answer with something usable. But before concluding a quiet agent is stuck, sample its workspace two or three times, a minute apart: a build or mutation agent's tree oscillates between dirty and clean, so one clean sample proves nothing. An orchestrator once "took over" for an agent that was mid-run, overwriting its driver script under it. If you do take over, use a different worktree — never the agent's own.
Address agents unambiguously. Names can collide across sessions, and a message by name can reach a stale agent that worked on something else entirely — use the id, or the name with the disambiguating ref the harness lists when two rows share it.
Budget the rescue. Two status pings with nothing back: stop the agent and do the work yourself. The findings are the deliverable, not the delegation. When a dead agent left scripts behind, re-run those in its now-free workspace rather than re-dispatching from zero.
When results come back
Verify every identifier before wiring it into shipped code. A research agent hands you a function name, tool name, file path, endpoint, flag: grep the actual source or fetch the real file yourself before it enters runtime code. Citations in the report — file, line, a code quote — are necessary but not sufficient; agents have fabricated those too, under the phrase "confirmed from source". One startup check was built on a tool name the agent invented: it rejected every input, valid or invalid — strictly worse than no check at all. Spot-check the two or three highest-stakes identifiers per research run; where a wrong identifier would reject or destroy rather than merely miss, also add a runtime check that degrades gracefully when the identifier turns out not to exist.
Audit the diff before committing it. Discipline stated in the brief does not survive delegation: an agent treats an explanatory comment as evidence it understood the problem, so the brief's "no narrating comments" yields three-to-five-line monologues anyway. Before committing any subagent's work, read the diff — every added comment against the repo's bar (writing-code-comments where the repo states none), every hunk against the brief. This is still write-time; nothing is committed yet. Tell the agent upfront that the sweep is coming and that its reasoning belongs in its report, where the insight is actually wanted.
Treat findings and "done" as claims. This skill owns that rule for every delegation; review-pr applies it with review-specific mechanics. A reply that does not name the exact commit or object it read is unverified. Verify a delegated agent's findings at source before acting — repeated real rounds each contained one finding whose fix would have been mis-scoped without that check. And when delegation fails and you do the work yourself, say so where the summary is read, not buried in a file: the loss is independence — a second reader who never saw your framing — and the reader deserves to know it is gone.
Red flags
| Thought | Reality |
| "The brief said no comments, so there are none" | The brief is not the enforcement point. The diff is |
| "The report cites file and line" | Agents fabricate citations. Grep it yourself |
| "The agent went idle, so it's finished" | Idle means available. Pull the report explicitly |
| "I'll ping it and wait for the answer" | Nothing arrives inside this turn. Read the file the dispatch named |
| "This dispatch is short; no file needed" | The budget siblings share replaces a short report wholesale |
| "Its tree is clean, so it's stuck" | One sample proves nothing — it may be between operations. Sample again, then ask |
| "I'll just fix it in the agent's worktree" | You are overwriting a live agent's work. Use a different worktree |
| "Re-dispatch a fresh agent" | If the dead agent left scripts, re-running them is minutes, not a fresh run |
| "The reviewer confirmed it, apply the fix" | A finding is a claim. Verify at source; note which commit the reviewer read |
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.

