Creates Claude Code subagents for task delegation. Guides through agent configuration, tool selection, and system prompts. Use this skill when the user wants to create a new agent, delegate tasks to specialists, or asks about subagents.
Creates Claude Code subagents for task delegation. Guides through defining purpose, selecting tools, writing system prompts, and saving agent files to `.claude/agents/` when users want to delegate specialized tasks.
/plugin marketplace add BrendanShields/spec-flow/plugin install spec@spec-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
reference.mdtemplates/researcher.mdtemplates/reviewer.mdtemplates/specialist.mdGuides creation of Claude Code subagents for task delegation.
.claude/agents/Progress:
- [ ] Define purpose and triggers
- [ ] Choose storage location
- [ ] Select tools and model
- [ ] Write system prompt
- [ ] Create agent file
Ask user:
| Location | Path | Use For |
|---|---|---|
| Project | .claude/agents/ | Team-shared, project-specific |
| User | ~/.claude/agents/ | Personal, cross-project |
Project agents take priority over user agents.
Tools - Grant minimum needed:
| Tool | Purpose |
|---|---|
| Read | Read files |
| Write | Create files |
| Edit | Modify files |
| Glob | Find files |
| Grep | Search content |
| Bash | Run commands |
| Task | Spawn subagents |
Model - Choose based on task:
| Model | Best For |
|---|---|
opus | Complex reasoning, nuanced decisions |
sonnet | General tasks (default) |
haiku | Quick lookups, simple analysis |
inherit | Use parent's model |
Keep prompts focused:
---
name: {agent-name}
description: {when to use - include trigger words}
tools: Read, Grep, Glob
model: sonnet
---
{System prompt here}
Save to .claude/agents/{name}.md
---
name: agent-name # Required: lowercase, hyphens
description: | # Required: when to invoke
Reviews code for quality issues.
Use when user asks for code review.
tools: Read, Grep, Glob # Optional: omit to inherit all
model: sonnet # Optional: opus, sonnet, haiku, inherit
permissionMode: default # Optional: permission handling
skills: skill1, skill2 # Optional: auto-load skills
---
System prompt defining the agent's behavior.
Before creating custom agents, know what's built-in:
| Agent | Model | Tools | Purpose |
|---|---|---|---|
| general-purpose | sonnet | All | Complex multi-step tasks |
| plan | haiku | Read, Glob, Grep, Bash | Research and strategy |
| explore | haiku | Read, Glob, Grep | Fast codebase exploration |
When to create custom agents:
| Need | Use |
|---|---|
| Quick file search | Built-in explore |
| Research before planning | Built-in plan |
| Multi-step code changes | Built-in general-purpose |
| Code review with specific rules | Custom reviewer agent |
| Security analysis | Custom security agent |
| Domain expertise (DB, API, etc.) | Custom specialist agent |
To make Claude automatically use your agent, include in description:
description: |
PROACTIVELY reviews all code changes before commit.
MUST BE USED when user mentions "review" or "check code".
Use templates from templates/ directory:
See reference.md for complete configuration details.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.