Validate custom agent file format and structure. Use after creating or editing an agent, before committing agent changes, or when an agent fails to load.
Instalação
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Validate custom agent file format and structure. Use after creating or editing an agent, before committing agent changes, or when an agent fails to load.
user-invocable
true
Agent File Validator
Validate agent files in .claude/agents/ for correct format against the
official Claude Code spec (plus Director Mode conventions).
Validation Target
With argument: validate specific file
Without: validate all .claude/agents/*.md
Required Frontmatter
---name:agent-name# Required: lowercase, hyphenated, 3-50 charsdescription:># Required: 10-5000 chars, include triggering conditions + <example> blocksUsethisagentwhen [conditions].Examples:<example>Context: [situation]
user:"[request]"assistant:"[response using this agent]"</example>color:cyan# Required by Director Mode convention (CI-enforced); OPTIONAL per official specmodel:sonnet# Required by Director Mode convention (CI-enforced); OPTIONAL per official spec.# Valid: fable, opus, sonnet, haiku, inherit, default, best, sonnet[1m], opus[1m]# (or a full model ID). inherit is the recommended default. NOT opusplan.effort:medium# Optional: low, medium, high, xhigh, maxtools:# Optional: YAML list (omit = all tools available)-Read-Write-GrepdisallowedTools:# Optional: explicit tool blocking-NotebookEditmaxTurns:20# Optional: max agentic turns (positive integer)skills:# Optional: preloaded skill names (list)-linked-skillmemory:project# Optional: one of user, project, localbackground:false# Optional: run the agent in the background (boolean)isolation:worktree# Optional: run the agent in an isolated git worktree---
fable, opus, sonnet, haiku, inherit, default, best, sonnet[1m], opus[1m]
(or a full model ID). inherit recommended. NOT opusplan (session-only, invalid for agents).
NOT supported in filesystem/plugin agent frontmatter (WARN if present)
hooks # Root/skill-scoped only; ignored on filesystem/plugin agents
mcpServers # Not supported on filesystem/plugin agents
permissionMode # Security restriction — not honored from agent frontmatter
forkContext # Not an official field (agents fork automatically when dispatched)
Validation Checklist
Required Fields
name exists (lowercase, hyphenated, 3-50 chars)
description exists (10-5000 chars, recommend 200-1000 with <example> blocks)
color is set (valid color name) — required by Director Mode convention, optional per spec
model is set (valid value below) — required by Director Mode convention, optional per spec
Optional Fields (official)
tools are valid tool names, YAML list format (omit = all tools available)
disallowedTools are valid tool names
effort is one of: low, medium, high, xhigh, max
maxTurns is a positive integer
skills is a list of skill names (references existing skills)
memory is one of: user, project, local
background is boolean
isolation is worktree
model is valid: fable, opus, sonnet, haiku, inherit, default, best, sonnet[1m], opus[1m], or a full model ID (NOT opusplan)
Unsupported / Unknown Fields (WARN, do not silently accept)
Warn on hooks, mcpServers, permissionMode — not supported in filesystem/plugin agent frontmatter
Warn on forkContext — not an official field
Content Structure
# Agent Name heading
## Activation section
Process/workflow description
Output format definition
Format Rules
tools uses YAML list format (not [Read, Write] bracket array) — Director Mode / CI house rule