Reusable specialists for coding tasks
Anthropic has published documentation detailing custom subagents for Claude Code, giving developers a file-based way to define specialized assistants for recurring work.
According to Anthropic’s Claude Code subagents documentation, a custom subagent is defined in a Markdown file with YAML frontmatter. The definition can include a name, description, task instructions and tool permissions, allowing a developer to create a more narrowly directed assistant than the primary coding conversation.
Anthropic describes subagents as a way to delegate focused tasks while keeping the main Claude Code session centered on the broader objective. Rather than repeatedly supplying the same long prompt, developers can place role-specific guidance in a reusable definition file.
That approach can apply to tasks such as reviewing code for security issues, preparing implementation plans, investigating test failures, refactoring code or producing documentation in a required style. The documentation does not present these roles as fixed presets; instead, developers write the instructions and configure the tools available to each subagent.