subagents-creator
Guide for defining and using Claude subagents effectively. Use when (1) creating new subagent types, (2) learning how to delegate work to specialized subagents, (3) improving subagent delegation prompts, (4) understanding subagent orchestration patterns, or (5) debugging ineffective subagent usage.
When & Why to Use This Skill
The Subagents Creator skill is a comprehensive framework designed to optimize the orchestration and delegation of specialized Claude subagents. It introduces a standardized 7-section prompt structure to ensure that subagents—such as 'explore', 'oracle', and 'librarian'—receive precise instructions, explicit tool whitelists, and clear operational constraints, significantly reducing task drift and improving the reliability of multi-agent workflows.
Use Cases
- Defining specialized subagent types: Establishing custom agents with specific expertise and tool access for domains like frontend engineering, code exploration, or deep architectural reasoning.
- Structured task delegation: Implementing a mandatory 7-section prompt template (Task, Outcome, Skills, Tools, Must Do, Must Not Do, Context) to eliminate ambiguity during agent handoffs.
- Orchestration pattern optimization: Learning and applying best practices for parallel task execution and background processing to improve system performance.
- Debugging agent behavior: Identifying and resolving common pitfalls such as vague delegation prompts, tool sprawl, and subagent misalignment with specific task types.
- Safety and Guardrail implementation: Using 'Must Not Do' sections and explicit tool whitelists to prevent subagents from performing unauthorized or destructive actions.
| name | subagents-creator |
|---|---|
| description | Guide for defining and using Claude subagents effectively. Use when (1) creating new subagent types, (2) learning how to delegate work to specialized subagents, (3) improving subagent delegation prompts, (4) understanding subagent orchestration patterns, or (5) debugging ineffective subagent usage. |
Subagents Creator
This skill provides guidance for defining, using, and improving Claude subagents—the specialized agents that handle specific domains like explore, librarian, oracle, and frontend-ui-ux-engineer.
Quick Start
Delegating Work
When delegating to subagents, use the mandatory 7-section structure:
1. TASK: Atomic, specific goal (one action per delegation)
2. EXPECTED OUTCOME: Concrete deliverables with success criteria
3. REQUIRED SKILLS: Which skill to invoke
4. REQUIRED TOOLS: Explicit tool whitelist (prevents tool sprawl)
5. MUST DO: Exhaustive requirements - leave NOTHING implicit
6. MUST NOT DO: Forbidden actions - anticipate and block rogue behavior
7. CONTEXT: File paths, existing patterns, constraints
Choosing a Subagent
See subagent-types.md for detailed guidance on which subagent to use:
explore: Contextual grep for codebaseslibrarian: Reference search (docs, OSS, web)oracle: Deep reasoning for architecture/complex decisionsfrontend-ui-ux-engineer: Visual UI/UX changes
Defining New Subagents
Only create subagents when: The task domain has distinct tooling, expertise, or patterns that benefit from specialization.
See delegation-patterns.md for:
- Subagent definition templates
- When to create a new subagent vs using existing ones
- Naming and description guidelines
Common Pitfalls
See common-pitfalls.md for:
- Vague delegation prompts and why they fail
- Over-delegating trivial tasks
- Subagent misalignment with task type
- Anti-patterns in agent orchestration
Best Practices
- One action per delegation: Combine tasks in parallel calls, not one call
- Be exhaustive: "MUST DO" and "MUST NOT DO" sections prevent drift
- Background everything: Use
background_taskforexploreandlibrarian - Explicit tool lists: Prevent subagents from using unauthorized tools
- Verify results: Check that delegated work meets expectations before proceeding
Delegation Example
# GOOD: Specific, exhaustive
background_task(
agent="explore",
prompt="""
1. TASK: Find all authentication implementations
2. EXPECTED OUTCOME: List of files with auth logic, patterns used
3. REQUIRED SKILLS: explore
4. REQUIRED TOOLS: Grep, Read
5. MUST DO: Search for 'jwt', 'session', 'auth' patterns; identify middleware; list all endpoints
6. MUST NOT DO: Don't modify any files; don't run build/test commands
7. CONTEXT: Working in ./src directory, looking for Express.js patterns
"""
)
# BAD: Vague, implicit expectations
background_task(
agent="explore",
prompt="Find auth stuff in the codebase"
)
Reference Files
- subagent-types.md - When to use each subagent type
- delegation-patterns.md - Prompt templates and patterns
- common-pitfalls.md - Anti-patterns and how to avoid them