Validate custom agent file format and structure
npx skills add https://github.com/majiayu000/claude-skill-registry --skill agent-check
Validate agent files in .claude/agents/ for correct format.
.claude/agents/*.md---
name: agent-name # Required: lowercase, hyphenated, 3-50 chars
description: > # Required: 10-5000 chars, include triggering conditions + <example> blocks
Use this agent when [conditions]. Examples:
<example>
Context: [situation]
user: "[request]"
assistant: "[response using this agent]"
</example>
color: cyan # Required: yellow, red, green, blue, magenta, cyan
model: sonnet # Required: inherit, haiku, sonnet, opus, best, sonnet[1m], opus[1m], opusplan
tools: # Optional: YAML list (omit = all tools available)
- Read
- Write
- Grep
# forkContext: "true" # Optional: run in forked context (string "true"/"false")
# maxTurns: 20 # Optional: max conversation turns (positive integer)
skills: # Optional: auto-load skills (array)
- linked-skill
memory: # Optional: memory scopes to load (array)
- user
- project
- local
mcpServers: # Optional: MCP server refs or objects (array)
- server-name
hooks: # Optional: agent-scoped lifecycle hooks
PreToolUse:
- matcher: Write
hooks:
- type: command
command: ./validate.sh
PostToolUse:
- matcher: Bash
hooks:
- type: command
command: ./log.sh
permissionMode: default # Optional: permission handling
disallowedTools: # Optional: explicit tool blocking
- NotebookEdit
---
Read, Write, Edit, Bash, Grep, Glob, Task,
WebFetch, WebSearch, TodoWrite, NotebookEdit
yellow, red, green, blue, magenta, cyan
inherit, haiku, sonnet, opus, best, sonnet[1m], opus[1m], opusplan
name exists (lowercase, hyphenated, 3-50 chars)description exists (10-5000 chars, recommend 200-1000 with <example> blocks)color is set (valid color name)model is set (inherit/haiku/sonnet/opus/best/sonnet[1m]/opus[1m]/opusplan)tools are valid tool names, YAML list format (omit = all tools available)skills references existing skills (array, if set)forkContext is string "true" or "false" (if set)maxTurns is positive integer (if set)memory is valid array of: user, project, local (if set)mcpServers is valid array of string refs or objects (if set)hooks has valid structure (if set)permissionMode is valid value (if set)disallowedTools are valid tool names (if set)# Agent Name heading## Activation sectiontools uses YAML list format (not [Read, Write] bracket array)## Agent Validation Report
### Files Checked
| File | Status | Issues |
|------|--------|--------|
| code-reviewer.md | OK | None |
| my-agent.md | WARN | Missing color, model |
### Summary
- Total: [N]
- Valid: [N]
- Needs fixes: [N]
color field (default: cyan)model field (default: inherit)Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
Replace with description of the skill and when Claude should use it.
Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill content", or needs guidance on skill structure, progressive disclosure, or skill development best practices for Claude Code plugins.
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
Use when creating new skills, editing existing skills, or verifying skills work before deployment
Take majiayu000/agent-check from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.