Last Updated: February 28, 2026 3:22 PM PKT
Frontmatter Fields
Unique identifier using lowercase letters and hyphens
When to invoke. Use
"PROACTIVELY" for auto-invocation by ClaudeComma-separated allowlist of tools (e.g.,
Read, Write, Edit, Bash). Inherits all tools if omitted. Supports Task(agent_type) syntax to restrict spawnable subagentsTools to deny, removed from inherited or specified list
Model alias:
haiku, sonnet, opus, or inherit (default: inherit)Permission mode:
default, acceptEdits, dontAsk, bypassPermissions, or planMaximum number of agentic turns before the subagent stops
Skill names to preload into agent context at startup (full content injected, not just made available)
MCP servers for this subagent — server name strings or inline
{name: config} objectsLifecycle hooks scoped to this subagent:
PreToolUse, PostToolUse, Stop (converted to SubagentStop at runtime)Persistent memory scope:
user, project, or localSet to
true to always run as a background task (default: false)Set to
"worktree" to run in a temporary git worktree (auto-cleaned if no changes)CLI output color for visual distinction (e.g.,
green, magenta). Functional but absent from official frontmatter table — documented in interactive quickstart onlyMemory Scopes
| Scope | Storage Location | Shared | Version Controlled |
|---|---|---|---|
user | ~/.claude/agent-memory/<name>/ | No | No |
project | .claude/agent-memory/<name>/ | Yes | Yes |
local | .claude/agent-memory-local/<name>/ | No | No |
See claude-agent-memory.md for full details.
Invocation
Agents are invoked via the Task tool, never via bash commands:CLI Flag
--agents '{...}' — Define session-scoped agents via JSONList Agents
claude agents — List all configured agents grouped by sourceInteractive Management
/agents — Create, edit, and manage agents interactivelyCommand Delegation
A command file can delegate to an agent
Agent Resumption
Completed subagents can be resumed with their agent ID
Example: Minimal Agent
Example: Full-Featured Agent (All Fields)
Scope and Priority
When multiple subagents share the same name, the higher-priority location wins:| Location | Scope | Priority |
|---|---|---|
--agents CLI flag | Current session | 1 (highest) |
.claude/agents/ | Current project | 2 |
~/.claude/agents/ | All your projects | 3 |
Plugin’s agents/ directory | Where plugin is enabled | 4 (lowest) |
Claude Agents
Official Claude Agents
Built-in agent types available viasubagent_type in the Task tool:
general-purpose
general-purpose
Model: inherit | Tools: AllComplex multi-step tasks — the default agent type for research, code search, and autonomous work
Explore
Explore
Model: haiku | Tools: Read-only (no Write, Edit)Fast codebase search and exploration — optimized for finding files, searching code, and answering codebase questions
Plan
Plan
Model: inherit | Tools: Read-only (no Write, Edit)Pre-planning research in plan mode — explores the codebase and designs implementation approaches before writing code
claude-code-guide
claude-code-guide
Model: inherit | Tools: Glob, Grep, Read, WebFetch, WebSearchAnswers questions about Claude Code features, hooks, slash commands, MCP servers, settings, IDE integrations, and keyboard shortcuts
statusline-setup
statusline-setup
Model: inherit | Tools: Read, EditConfigures the user’s Claude Code status line setting
Custom Agents Example
- presentation-curator
- weather-agent
Model: sonnet | Color: magentaTools: Read, Write, Edit, Grep, GlobSkills:
- presentation/vibe-to-agentic-framework
- presentation/presentation-structure
- presentation/presentation-styling
Sources
Create Custom Subagents
Official documentation for subagent creation
CLI Reference
Command-line flags and options
CHANGELOG
Latest updates and features
