implement-sub-agents
Skill1 starsChanged 9 months agoApache-2.0View on GitHub
Create and validate Claude sub-agent definitions with correct frontmatter, tool permissions, and delegation boundaries.
In this repository8 other files it gives its agents.
- implement-agent-skillsSkill
- implement-agent-teamsSkill
- implement-claude-extensionsSkill
- implement-hooksSkill
- implement-pluginSkill
- lint-fixSkill
- plugin-implementation-deprecatedSkill
- plugin-verificationSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
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
- Very specific: line 8
Create or update agent files under agents/ with explicit role boundaries, model/tool settings, and delegation patterns.
- Distinctive: line 12
Assess complexity: Verify that sub-agent is needed (score 7-8).
- Distinctive: line 19
Validate: Check frontmatter and agent file structure
- Very specific: line 47
Read-only sub-agent example: assets/templates/subagent-readonly.md
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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
Implement Sub-Agents
Create or update agent files under agents/ with explicit role boundaries, model/tool settings, and delegation patterns.
Workflow
- Assess complexity: Verify that sub-agent is needed (score 7-8). If simpler approach works, use skill instead.
- Define role: Clear purpose, responsibilities, and explicit boundaries
- Set decision authority: What agent can/cannot do autonomously
- Configure tools: Least privilege access to required tools only
- Author/update: Agent markdown with valid frontmatter
- Context strategy: Define how agent manages context (retrieval, summarization, state)
- Plan evaluations: Identify 20-50 test scenarios covering success and failure modes
- Validate: Check frontmatter and agent file structure
- Connect selectively: Link related skills/hooks only when required
Progressive Disclosure
Best Practices (Anthropic Guidelines)
- Complexity decision framework:
../implement-claude-extensions/references/decision-framework.md - Context management patterns:
../implement-claude-extensions/references/context-management.md - Evaluation strategy:
../implement-claude-extensions/references/evaluation-strategy.md
Sub-Agent Design
- Agent frontmatter rules:
references/subagent-frontmatter.md - Tool access strategy:
references/subagent-tools.md - Model selection guidance:
references/subagent-models.md - Permission boundaries:
references/subagent-permissions.md - Delegation patterns:
references/subagent-delegation.md
Validation Tools
- Agent file validator:
scripts/validate-subagent.sh - Frontmatter checker:
scripts/check-subagent-frontmatter.sh
Templates (by Complexity)
- Level 3 - Autonomous Agent (Score 7-8):
assets/templates/subagent-autonomous.md - Base sub-agent template:
assets/templates/subagent-template.md - Read-only sub-agent example:
assets/templates/subagent-readonly.md - Sub-agent with skills example:
assets/templates/subagent-with-skills.md - Sub-agent with hooks example:
assets/templates/subagent-with-hooks.md
Related Skills
- Umbrella routing and architecture:
../implement-claude-extensions/SKILL.md - Agent team coordination:
../implement-agent-teams/SKILL.md
Sources
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.

