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
modelstringnosonnet, opus, haiku, or inherit (valid values)
toolsstring[]noTool names to allow
disallowedToolsstring[]noTool names to disallow
permissionModestringnodefault, acceptEdits, dontAsk, bypassPermissions, plan, or delegate
skillsstring[]noSkills this agent can use
hooksobjectnoHooks configuration
memorystringnouser, project, or local
maxTurnsnumbernoMaximum agent turns (positive integer)
mcpServersstring[]noMCP servers available to the agent
colorstringnoblue, cyan, green, yellow, magenta, red, or pink

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
---