Skip to content

Agent Frontmatter

Agent files are flat .md files (e.g., .claude/agents/code-reviewer.md). The YAML frontmatter configures the agent; the file body is the system prompt.

Fields

FieldTypeRequiredDescription
namestringyesLowercase with hyphens, max 64 chars
descriptionstringyesMin 10 chars, third-person voice
modelstringnoAlias (sonnet, opus, haiku, inherit) or full model ID (e.g. claude-opus-4-6)
toolsstring[]noTool names to allow
disallowedToolsstring[]noTool names to disallow
permissionModestringnodefault, acceptEdits, dontAsk, bypassPermissions, or plan
skillsstring[]noSkills this agent can use
hooksobjectnoHooks configuration
memorystringnouser, project, or local
effortstringnolow, medium, high, or max
maxTurnsnumbernoMaximum agent turns (positive integer)
mcpServers(string|object)[]noMCP server references or inline definitions
colorstringnoblue, cyan, green, yellow, magenta, red, or pink (claudelint extension)
backgroundbooleannoRun as background task (default: false)
isolationstringnoworktree — run in a temporary git worktree

Cross-field validations:

  • tools and disallowedTools are mutually exclusive

Example

yaml
---
name: code-reviewer
description: Reviews code changes for quality, security, and best practices.
model: sonnet
tools:
  - Read
  - Glob
  - Grep
color: blue
---