subagents
Skill33 starsChanged 22 days agoMITView on GitHub
Use when delegating work to a separate agent with its own context. Covers when delegation pays off, designing a subagent's scope and prompt, parallel fan-out, and the cost of a cold start. Trigger on "spin up a subagent for this", "run these searches in parallel", "the search results are flooding my context", "have a fresh agent verify this". Do not use for building a standalone tool-using agent — see the agent-design skill.
We split this skill into the rules it gives an agent
3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 12 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 29
Read-only agents for review and verification.
- Distinctive: line 54
Search and exploration are the archetypal delegation: the subagent reads forty files and returns one paragraph.
- Distinctive: line 55
Do not delegate a task you cannot verify.
“Common” is measured: kept by at least 6 in 10 of the 12 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
Subagents
Purpose
Delegate work to a subagent when its own context is worth the cost of starting one. A subagent begins cold — it re-derives everything the main agent already knows — so the delegation must buy more than it costs.
When to Use
- A search or exploration that would flood the main context with results you do not need to keep.
- Independent work that can run in parallel.
- A task requiring a different, specialized instruction set.
- Verification by an agent that has not seen the reasoning that produced the work.
Capabilities
- Scoping a subagent's task and boundaries.
- Prompt design for a cold-start agent.
- Parallel fan-out for independent work.
- Result aggregation.
- Read-only agents for review and verification.
Inputs
- The task, and whether it is genuinely independent.
- What the subagent needs to know, since it knows nothing.
- What it must return.
Outputs
- A subagent that completes its task without further interaction.
- A result compact enough to be worth the round trip.
Workflow
- Justify the delegation — The valid reasons are: context isolation (the search produces 50 files of noise and one answer), parallelism (five independent tasks), and specialization (a different instruction set). "The task is big" is not a reason — a big task in the same context is usually cheaper.
- Write the prompt as if to a stranger — Because it is one. The subagent has none of your context: no conversation history, no prior findings, no shared understanding of the goal. Everything it needs must be in the prompt.
- State exactly what to return — A subagent that returns a wall of text has moved the context problem rather than solved it. Specify the format and the length.
- Fan out only genuinely independent work — Two subagents editing the same file will conflict. Parallelism requires disjoint scopes.
- Use a read-only agent for verification — An agent that did not write the code is a better reviewer of it than the one that did.
Best Practices
- A subagent starts cold and re-derives context you already have. That is the cost. It is worth paying for isolation and parallelism, and it is not worth paying to avoid a long turn.
- The subagent's prompt is the entire interface. Include the file paths, the constraints, the definition of done, and the return format. Ambiguity produces a confidently wrong answer you then have to check.
- Search and exploration are the archetypal delegation: the subagent reads forty files and returns one paragraph. That paragraph is what you wanted; the forty files are what you were trying to avoid.
- Do not delegate a task you cannot verify. A subagent's report is a claim, not evidence.
- Parallel subagents that write to the same files will race. Give each a disjoint scope, or serialize them.
- Verification by a fresh agent is genuinely more effective than self-review — it has no attachment to the approach and no memory of why a shortcut seemed reasonable.
Examples
Delegation that pays for itself — exploration with a compact return:
Task for the subagent:
Find every place in this repository where an outbound HTTP call is made without
a timeout.
Search for: fetch(), axios, httpx, requests, http.Client, and any wrapper around
them in src/. For each call site, determine whether a timeout is configured —
either at the call, on the client, or by a default in a shared client factory.
Do not fix anything. Do not read files that are not relevant.
Return ONLY a markdown table with these columns, and nothing else:
| File:line | Call | Timeout configured? | Where the timeout is set (or "none") |
If there are more than 20, return the 20 with the widest blast radius (those in
request paths rather than in scripts or tests) and state the total count.The subagent reads sixty files. It returns a twenty-row table. The main context receives the table.
A delegation that is not worth it:
"Implement the refund feature."
The subagent does not know: the domain conventions, the Result type, the fact
that Money is an integer, the existing RefundService, or why the previous
approach was rejected. It will re-derive some of this, get some of it wrong,
and return code that must be reviewed line by line against context it never had.
Doing this in the main context — where all of that is already established — is
faster and produces better code.Parallel fan-out with disjoint scopes:
Three subagents, in parallel, each with a scope that cannot collide:
1. "Audit skills/frontend/ for broken internal links. Report only."
2. "Audit skills/backend/ for broken internal links. Report only."
3. "Audit skills/devops/ for broken internal links. Report only."
Read-only, disjoint, independently useful. This is the shape delegation is for.Notes
- The single best use of a subagent is a search whose intermediate results you do not want. The isolation is the product.
- A subagent that needs to ask a follow-up question has been given an insufficient prompt. Since it usually cannot ask, it will guess. Write the prompt accordingly.
- Verification subagents are most valuable on high-stakes work: a fresh reader catches the thing the author's context made invisible.
Other versions12 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 12
- Waishnav/devspace★ 5.3ksame name
- sebnado/worldbuild-bench★ 9same name
- haxqer/skills★ 4same name
- vlln/subagents-skill★ 4same name
- skrrt-sh/skills★ 3same name
- mteam88/pi-config★ 2same name
- Eclipter/agents★ 1same name
- ershiyidian/QuayMesh★ 1same name
- MaGe1993/Claude-Code-Base-Harness★ 1same name
- wtsi-hgi/agentskills★ 1same name
2 more not listed
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 repository137 other files it gives its agents.
- agent-instructionsSkill
- agent-memorySkill
- hooksSkill
- plugin-developmentSkill
- skill-authoringSkill
- skill-reviewSkill
- slash-commandsSkill
- agent-designSkill
- context-engineeringSkill
- fine-tuningSkill
- llm-cost-optimizationSkill
- llm-evaluationSkill
- llm-integrationSkill
- mcp-serverSkill
- ml-pipelineSkill
- model-selectionSkill
- prompt-engineeringSkill
- ragSkill
- structured-outputSkill
- api-designSkill
- background-jobsSkill
- cachingSkill
- djangoSkill
- event-driven-architectureSkill
- fastapiSkill
- graphqlSkill
- microservicesSkill
- nestjsSkill
- realtime-websocketsSkill
- spring-bootSkill
- competitive-analysisSkill
- lead-researchSkill
- product-analysisSkill
- resumeSkill
- user-researchSkill
- database-performanceSkill
- data-modelingSkill
- data-qualitySkill
- pandasSkill
- postgresSkill
- sparkSkill
- brand-guidelinesSkill
- generative-artSkill
- themingSkill
- ui-reviewSkill
- visual-designSkill
- architecture-decisionsSkill
- bug-fix-protocolSkill
- cli-developmentSkill
- code-reviewSkill
- debuggingSkill
- design-patternsSkill
- domain-modelingSkill
- git-workflowSkill
- legacy-modernizationSkill
- refactoringSkill
- repository-explorationSkill
- simple-designSkill
- system-designSkill
- aws-cdkSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

