
Subagent Creator
FreeGuidance for creating specialized AI subagents.
Free · Opens the source repo
What Subagent Creator does
The Subagent Creator skill provides a structured approach to developing AI subagents that can handle complex workflows requiring isolated context. These subagents are designed to be specialized assistants that an AI agent can delegate tasks to, allowing for parallel execution and deep specialization in specific areas. This skill is particularly useful for developers and designers looking to enhance the capabilities of their AI systems by creating agents that can handle distinct tasks independently.
Subagents are characterized by their isolated context, which means each one operates within its own context window, enabling them to manage complex, multi-step processes without interference from other tasks. This isolation is crucial for tasks that require a high level of detail and accuracy, such as verification, debugging, or security auditing. By following the guidelines provided in this skill, users can create reusable subagents that can be invoked for various purposes, thus streamlining workflows and improving efficiency.
The creation process involves defining the subagent's purpose, configuring its metadata, and writing a clear prompt that outlines its identity, responsibilities, and expected outputs. The skill also emphasizes the importance of specificity in the subagent's description to ensure that automatic delegation occurs effectively. With best practices and common patterns provided, users can avoid common pitfalls and create focused, effective subagents that enhance their AI's functionality.
When to use it
Use this skill when you need to create subagents for complex tasks that require isolated context and specialization.
When not to use it
Avoid this skill for simple, one-off tasks that do not require context isolation or deep specialization.
What you can build with it
Creating a Verification Agent
Use the Subagent Creator to define a verification agent that independently validates completed tasks, ensuring quality and accuracy.
Developing a Debugger
Leverage this skill to create a debugging subagent that specializes in root cause analysis for software errors.
Establishing a Security Auditor
Utilize the Subagent Creator to build a security auditing subagent that checks for vulnerabilities in code and ensures compliance.
How to install Subagent Creator
View source1. Install with the skills CLI
npx skills add tech-leads-club/agent-skills/subagent-creator --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by tech-leads-clubSubagent Creator
This skill provides guidance for creating effective, agent-agnostic subagents.
What are Subagents?
Subagents are specialized assistants that an AI agent can delegate tasks to. Characteristics:
- Isolated context: Each subagent has its own context window
- Parallel execution: Multiple subagents can run simultaneously
- Specialization: Configured with specific prompts and expertise
- Reusable: Defined once, used in multiple contexts
When to Use Subagents vs Skills
Is the task complex with multiple steps?
├─ YES → Does it require isolated context?
│ ├─ YES → Use SUBAGENT
│ └─ NO → Use SKILL
│
└─ NO → Use SKILL
Use Subagents for:
- Complex workflows requiring isolated context
- Long-running tasks that benefit from specialization
- Verification and auditing (independent perspective)
- Parallel workstreams
Use Skills for:
- Quick, one-off actions
- Domain knowledge without context isolation
- Reusable procedures that don't need isolation
Subagent Structure
A subagent is typically a markdown file with frontmatter metadata:
---
name: agent-name
description: Description of when to use this subagent.
model: inherit # or fast, or specific model ID
readonly: false # true to restrict write permissions
---
You are an [expert in X].
When invoked:
1. [Step 1]
2. [Step 2]
3. [Step 3]
[Detailed instructions about expected behavior]
Report [type of expected result]:
- [Output format]
- [Metrics or specific information]
Subagent Creation Process
1. Define the Purpose
- What specific responsibility does the subagent have?
- Why does it need isolated context?
- Does it involve multiple complex steps?
- Does it require deep specialization?
2. Configure the Metadata
name (required)
Unique identifier. Use kebab-case.
name: security-auditor
description (critical)
CRITICAL for automatic delegation. Explains when to use this subagent.
Good descriptions:
- "Security specialist. Use when implementing auth, payments, or handling sensitive data."
- "Debugging specialist for errors and test failures. Use when encountering issues."
- "Validates completed work. Use after tasks are marked done."
Phrases that encourage automatic delegation:
- "Use proactively when..."
- "Always use for..."
- "Automatically delegate when..."
model (optional)
model: inherit # Uses same model as parent (default)
model: fast # Uses fast model for quick tasks
readonly (optional)
readonly: true # Restricts write permissions
3. Write the Subagent Prompt
Define:
- Identity: "You are an [expert]..."
- When invoked: Context of use
- Process: Specific steps to follow
- Expected output: Format and content
Template:
You are an [expert in X] specialized in [Y].
When invoked:
1. [First action]
2. [Second action]
3. [Third action]
[Detailed instructions about approach]
Report [type of result]:
- [Specific format]
- [Information to include]
- [Metrics or criteria]
[Philosophy or principles to follow]
Common Subagent Patterns
1. Verification Agent
Purpose: Independently validates that completed work actually works.
---
name: verifier
description: Validates completed work. Use after tasks are marked done.
model: fast
---
You are a skeptical validator.
When invoked:
1. Identify what was declared as complete
2. Verify the implementation exists and is functional
3. Execute tests or relevant verification steps
4. Look for edge cases that may have been missed
Be thorough. Report:
- What was verified and passed
- What is incomplete or broken
- Specific issues to address
2. Debugger
Purpose: Expert in root cause analysis.
---
name: debugger
description: Debugging specialist. Use when encountering errors or test failures.
---
You are a debugging expert.
When invoked:
1. Capture the error message and stack trace
2. Identify reproduction steps
3. Isolate the failure location
4. Implement minimal fix
5. Verify the solution works
For each issue, provide:
- Root cause explanation
- Evidence supporting the diagnosis
- Specific code fix
- Testing approach
3. Security Auditor
Purpose: Security expert auditing code.
---
name: security-auditor
description: Security specialist. Use for auth, payments, or sensitive data.
---
You are a security expert.
When invoked:
1. Identify security-sensitive code paths
2. Check for common vulnerabilities
3. Confirm secrets are not hardcoded
4. Review input validation
Report findings by severity:
- **Critical** (must fix before deploy)
- **High** (fix soon)
- **Medium** (address when possible)
- **Low** (suggestions)
4. Code Reviewer
Purpose: Code review with focus on quality.
---
name: code-reviewer
description: Code review specialist. Use when changes are ready for review.
---
You are a code review expert.
When invoked:
1. Analyze the code changes
2. Check readability, performance, patterns, error handling
3. Identify code smells and potential bugs
4. Suggest specific improvements
Report:
**✅ Approved / ⚠️ Approved with caveats / ❌ Changes needed**
**Issues Found:**
- **[Severity]** [Location]: [Issue]
- Suggestion: [How to fix]
Best Practices
✅ DO
- Write focused subagents: One clear responsibility
- Invest in the description: Determines when to delegate
- Keep prompts concise: Direct and specific
- Share with team: Version control subagent definitions
- Test the description: Check correct subagent is triggered
❌ AVOID
- Vague descriptions: "Use for general tasks" gives no signal
- Prompts too long: 2000 words don't make it smarter
- Too many subagents: Start with 2-3 focused ones
Quality Checklist
Before finalizing:
- Description is specific about when to delegate
- Name uses kebab-case
- One clear responsibility (not generic)
- Prompt is concise but complete
- Instructions are actionable
- Output format is well defined
- Model configuration appropriate
Output Messages
When creating a subagent:
✅ Subagent created successfully!
📁 Location: .agent/subagents/[name].md
🎯 Purpose: [brief description]
🔧 How to invoke:
- Automatic: Agent delegates when it detects [context]
- Explicit: /[name] [instruction]
💡 Tip: Include keywords like "use proactively" to encourage delegation.
Frequently asked questions about Subagent Creator
Similar skills
Skill Creator
Efficiently create and manage skills for Gemini CLI.
Agent Development
Create and manage autonomous agents for Claude Code.
Math Olympiad Solver
Solve and verify competition math problems effectively.
Microsoft Skill Creator
Create specialized skills for Microsoft technologies.
Doublecheck
A verification pipeline for AI-generated claims.
Skill Development for Claude Code
Create and enhance skills for Claude Code plugins.
