/skill-tools:create-subagent <subagent-name> <description-of-purpose>from skill-tools
Creates a new Claude subagent with best practices and proper configuration, following Anthropic's agent design principles.
Ships in skill-tools. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
I'll help you create a new Claude subagent. Based on the Claude Code slash commands documentation at https://docs.claude.com/en/docs/claude-code/sub-agents, I'll create a properly structured subagent file.
Based on Anthropic's research on building effective agents (https://www.anthropic.com/engineering/building-effective-agents), follow these principles:
Simplicity First: Start with the simplest solution possible. Only add complexity when it demonstrably improves outcomes. Many tasks can be solved with optimized single LLM calls before needing a full subagent.
Single Purpose: Create focused subagents with one clear responsibility. Agents work best for well-defined tasks where success criteria are measurable.
Transparency: Design subagents to explicitly show their planning steps and reasoning. This makes them more debugable and trustworthy.
Detailed Instructions: Write comprehensive instructions like you would for a junior developer:
Context Isolation: Remember that subagents start fresh each time. Include all necessary context in the system prompt - they don't inherit conversation history.
Agent-Computer Interface (ACI): Invest as much effort in tool design as you would in human-computer interfaces:
Poka-Yoke Your Tools: Design tools to be mistake-proof:
Tool Permissions: Only grant tools the subagent truly needs. More tools = more complexity and potential for errors.
Measure and Iterate: Test in sandboxed environments with clear success metrics. Iterate on both the system prompt AND tool definitions based on actual usage.
Ground Truth Feedback: Design subagents to get concrete feedback at each step (tool results, test outputs, environment state) to assess progress.
Use subagents for:
Don't use subagents for:
Create the subagent file at .claude/agents/<subagent-name>.md with:
---
description: Brief description of what this subagent does
tools:
- ToolName1
- ToolName2
model: claude-sonnet-4-5 # Optional: specify model if needed
---
# System Prompt
[Detailed instructions for the subagent's behavior, including:]
- Its primary purpose and expertise area
- How it should approach tasks
- Any constraints or guidelines
- Expected output format
- Examples of good behavior (if applicable)
Choose the right pattern for your use case:
Key Distinction: Workflows follow predefined paths. Agents dynamically direct their own process using tools in loops. Choose workflows for predictability, agents for flexibility.
Based on the user's request: $ARGUMENTS
Follow this process:
Clarify Requirements:
Design the Agent-Computer Interface:
Craft the System Prompt:
Create the Subagent File in .claude/agents/:
Plan for Testing:
.claude/agents/) should be version controlledcode-reviewer, test-generator)Your subagent is well-designed when:
Create a well-structured, production-ready subagent that follows these principles. Remember: Build the right system for your needs, not the most sophisticated one.
What SKILL.md sets; muted values are Claude Code's defaults
mediumThree short reads, in order
npx claudepluginhub jtsternberg/claude-plugins --plugin skill-tools6 skills in this plugin
/review-slash-commandReview a slash command for opportunities to split into subagentsOther plugins' skills for the same job