Create custom Claude Code sub-agents with specialized expertise and tool access. Use when you need to build reusable agents for specific tasks like code review, debugging, data analysis, or domain-specific workflows.
Create custom sub-agents with specialized expertise and tool access. Use when building reusable agents for recurring tasks like code review, debugging, or domain-specific workflows.
/plugin marketplace add resolve-io/.prism/plugin install prism-devtools@prismThis skill inherits all available tools. When active, it can use any tool Claude has access to.
reference/agent-examples.mdreference/best-practices.mdreference/configuration-guide.mdreference/prism-agent-strategy.mdreference/troubleshooting.mdGuides you through creating custom sub-agents that:
# Run the agents command
/agents
Then:
.claude/agents/) or user-level (~/.claude/agents/)Create a markdown file in .claude/agents/ (project) or ~/.claude/agents/ (user):
---
name: my-agent-name
description: Use this agent when [specific trigger condition]
tools: Read, Edit, Bash
model: sonnet
---
# Agent System Prompt
Your detailed instructions for the agent go here.
Be specific about:
- What tasks this agent handles
- How to approach problems
- What outputs to produce
- Any constraints or guardrails
Automatic: Claude detects matching tasks based on description Explicit: "Use the my-agent-name agent to [task]"
| Field | Description | Example |
|---|---|---|
name | Lowercase with hyphens | code-reviewer |
description | When to use this agent (triggers routing) | Use PROACTIVELY to review code changes for quality and security |
| Field | Description | Default |
|---|---|---|
tools | Comma-separated tool list | All tools inherited |
model | Model alias (sonnet/opus/haiku) or 'inherit' | Inherits from main |
.claude/agents/ # Project-level agents
├── code-reviewer.md
├── debugger.md
└── custom-agent.md
~/.claude/agents/ # User-level agents (global)
├── my-helper.md
└── data-analyzer.md
Priority: Project agents override user agents with same name
Reviews code for quality, security, and best practices
Triggers: After code changes, before commits
Analyzes errors, identifies root causes, proposes fixes
Triggers: Test failures, runtime errors
Writes SQL queries, performs analysis, generates reports
Triggers: Data questions, BigQuery tasks
See: Agent Examples
Full Guide: Best Practices
Sub-agents can access:
Use /agents interface to visually select tools.
This skill helps you create:
.md with YAML frontmatter)This skill activates when you mention:
To test your agent:
# Ask Claude to use it explicitly
"Use the [agent-name] agent to [task]"
# Or test automatic triggering
"[Describe a task matching agent's description]"
Verify:
Last Updated: 2025-10-27 Version: 1.0.0
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.