Note: This information applies at the time of writing and may be subject to change in future versions of Claude Code.
When creating subagents in Claude Code, the frontmatter configuration defines how the orchestrator identifies and delegates tasks to your agent. The frontmatter is straightforward and requires only three mandatory fields.
The agent's identifier/name.
Example: evaluator, code-generator, documentation-writer
This is the key field. The description defines the logic by which the orchestrator picks a subagent for delegation. It should clearly explain when and why this agent should be invoked.
Example: "Invoke this agent to run the evaluations for ideas proposed by the user"
Specifies which model the agent should use. Can be set to inherit to use the parent orchestrator's model, or explicitly specify a model like sonnet, opus, or haiku.
Example: inherit, sonnet, haiku
Here's a minimal frontmatter configuration:
---
name: evaluator
description: Invoke this agent to run the evaluations for ideas proposed by the user
model: inherit
---- Only 3 fields required: name, description, and model
- Description is critical: It determines when the orchestrator delegates to this agent
- Model flexibility: Use
inheritto adopt the orchestrator's model or specify explicitly - Keep it simple: The frontmatter is intentionally minimal to reduce complexity
- Write clear, specific descriptions that explain the agent's purpose and when it should be invoked
- Use
inheritfor model unless you have a specific reason to use a different model (e.g., usinghaikufor quick, straightforward tasks to minimize cost) - Choose descriptive agent names that reflect their function
About this Gist
This gist was generated using Claude Code to document subagent frontmatter configuration. While the information is accurate at the time of writing, please verify against the official Claude Code documentation for the most up-to-date specifications.
Users should validate this information and refer to the official Claude Code documentation for authoritative guidance.