Create and use specialized AI subagents in Claude Code for task-specific workflows and improved context management.
Open the subagents interface
Select 'Create New Agent'
Define the subagent
e
Save and use
Type | Location | Scope | Priority |
---|---|---|---|
Project subagents | .claude/agents/ | Available in current project | Highest |
User subagents | ~/.claude/agents/ | Available across all projects | Lower |
Field | Required | Description |
---|---|---|
name | Yes | Unique identifier using lowercase letters and hyphens |
description | Yes | Natural language description of the subagent’s purpose |
tools | No | Comma-separated list of specific tools. If omitted, inherits all tools from the main thread |
/agents
command to modify tool access - it provides an interactive interface that lists all available tools, including any connected MCP server tools, making it easier to select the ones you need.tools
field to inherit all tools from the main thread (default), including MCP tools/agents
)tools
field is omitted, subagents inherit all MCP tools available to the main thread.
/agents
command provides a comprehensive interface for subagent management:
description
field in subagent configurationsdescription
field.description
fields specific and action-oriented for best results.