Validates and reviews Claude Code agents against best practices. Checks YAML syntax, naming conventions, description quality, system prompt effectiveness, and tool configuration. Provides improvement suggestions and optionally applies fixes. Use when validating agents, reviewing agent quality, checking agents before commit, or when `--validate-agent` is mentioned.
Validates Claude Code agent files against best practices, checking YAML syntax, naming, descriptions, system prompts, and tool configuration. Use when reviewing agents, before commits, or when `--validate-agent` is mentioned to catch errors and suggest improvements.
/plugin marketplace add outfitter-dev/agents/plugin install agent-kit@outfitterThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Validate and review Claude Code agents against best practices and quality standards. Combines validation (catch errors) and review (suggest improvements) in one pass.
# User agents
~/.claude/agents/[agent-name].md
# Project agents
.claude/agents/[agent-name].md
Use Read to examine:
Use TodoWrite to track validation phases. Expand as you discover issues.
<initial_todo_template>
</initial_todo_template>
Todo discipline: Mark in_progress as you start each check. Mark completed immediately when done. Add specific issue todos as you find problems (e.g., "Fix missing trigger keywords in description").
For comprehensive validation, load the authoring skill for reference patterns:
Skill tool: agent-kit:claude-agent-authoring
This provides detailed guidance on frontmatter schema, tool patterns, and description quality. See especially:
references/frontmatter.md - Field requirementsreferences/tools.md - Tool configuration patternsreferences/todowrite.md - TodoWrite usage patternsRequired Fields:
name present and non-emptydescription present and non-emptySyntax:
--- on line 1--- before contentOptional Fields:
tools (if present) uses comma-separated valid tool namesmodel (if present) is sonnet, opus, haiku, or inheritcolor (if present) is a valid color name[role]-[specialty] or [specialty] patternGood: code-reviewer, test-runner, debugger
Bad: helper, my-agent, the-best-agent
Structure:
Quality:
Anti-patterns:
Structure:
Quality:
Anti-patterns:
Field syntax:
tools: (not allowed-tools: or other variants)Valid tool formats:
# Basic tools
tools: Read, Write, Edit, Bash, Glob, Grep, Skill, Task, TodoWrite
# Pattern restrictions (command family)
tools: Bash(git *), Bash(npm *)
# Pattern restrictions (specific subcommand)
tools: Bash(git status:*), Bash(git diff:*)
# File path patterns
tools: Write(tests/**), Write(src/**/*.ts)
# MCP tools
tools: mcp__server__tool, mcp__github__*
Validation checks:
Tool(pattern)Common patterns:
Glob, Grep, Read, Skill, Task, TodoWriteGlob, Grep, Read, Skill, Task, TodoWrite, Bash(git show:*), Bash(git diff:*)Glob, Grep, Read, Skill, Task, TodoWrite, WebSearch, WebFetchAnti-patterns:
allowed-tools: — wrong field nameSee agent-kit:claude-agent-authoring references/tools.md for detailed patterns.
If model field present:
sonnet, opus, haiku, or inheritAfter validation passes, review for improvements:
# Agent Validation Report: [Agent Name]
## Summary
- **Status**: PASS / FAIL / WARNINGS
- **Location**: [path]
- **Issues**: [count critical] / [count warnings]
## Validation Results
### YAML Frontmatter
[Status and details]
### Naming Conventions
[Status and details]
### Description Quality
[Status and details]
### System Prompt
[Status and details]
### Tool Configuration
[Status and details]
### Model Configuration
[Status and details]
## Critical Issues (must fix)
1. [Issue with specific fix]
## Warnings (should fix)
1. [Issue with specific fix]
## Improvement Suggestions
1. [Suggestion with before/after]
## Strengths
- [What's done well]
For each issue:
Current:
description: Helps with debugging
Problem: Too vague, no trigger keywords
Fix:
description: Debugging specialist for errors, test failures, and unexpected behavior. Use proactively when encountering any issues.
Impact: Specific purpose, trigger keywords, proactive invocation.
Current:
You are a helpful debugging assistant.
Problem: No process, no specifics
Fix:
You are an expert debugger specializing in root cause analysis.
When invoked:
1. Capture error message and stack trace
2. Identify reproduction steps
3. Isolate the failure location
4. Implement minimal fix
5. Verify solution works
Impact: Clear process, actionable steps.
Ask before making changes:
Found [N] issues:
- [Critical issues]
- [Warnings]
- [Suggestions]
Would you like me to apply these fixes?
If approved, use Edit to make changes.
Critical (must fix):
Important (should fix):
Nice-to-have:
# Find agent files
ls ~/.claude/agents/*.md
ls .claude/agents/*.md
# Search by name
find ~/.claude/agents .claude/agents -name "*.md" 2>/dev/null
# Check for tabs
grep -P "\t" ~/.claude/agents/agent-name.md
# View frontmatter
head -n 20 ~/.claude/agents/agent-name.md
After creating an agent:
agent-kit:claude-agent-authoring → agent-kit:claude-agent-validation → iterate until passing
Before committing:
agent-kit:claude-agent-validation → fix critical issues → commit
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.