Skill Validator
Validate SKILL.md files against the Agent Skills specification and Claude Code extensions.
When to Run
- After creating a new skill
- After modifying a skill's SKILL.md frontmatter
- Before committing skill changes
- During periodic repo audits
Validation Rules
Required Fields (Agent Skills Spec)
Every SKILL.md must have YAML frontmatter with:
name— kebab-case, matches directory namedescription— 1-3 sentences, under 1024 chars, starts with verb or domain noun
Metadata Block
version and tags must be inside metadata:, never top-level:
# CORRECT
metadata:
version: "1.0.0"
tags: "react, performance, optimization"
# WRONG — top-level version
version: 1.0.0
# WRONG — tags as YAML list
metadata:
tags:
- react
- performanceForbidden Fields
These are not part of any spec:
auto_activate/auto_trigger— removed in 2026-04 migrationrisk— not in Agent Skills or Claude Code specs
Claude Code Extensions (Optional)
Valid extension fields:
| Field | Purpose |
|---|---|
when_to_use | Trigger phrases for auto-activation |
disable-model-invocation | Prevent auto-triggering (for destructive skills) |
user-invocable | Slash command name |
allowed-tools | Pre-approved tool patterns |
model | Model override |
effort | Effort level |
context | fork for subagent isolation |
Content Rules
- No hardcoded
/workspace/paths - No tool names in instructions (say "search for" not "use Grep")
- Imperative/infinitive style ("Configure X" not "You should configure X")
- Code blocks use real backtick fences, not escaped
\```
Validation Process
- Read the SKILL.md frontmatter
- Check
namematches parent directory name - Check
descriptionexists and is under 1024 chars - Check
version/tagsare NOT top-level (must be insidemetadata:) - Check for forbidden fields (
auto_activate,auto_trigger,risk) - Check for escaped backtick fences in content
- Check for hardcoded paths (
/workspace/, project-specific paths) - Run
bunx markdownlint-clion the file - Run
./scripts/validate-skill-sync.shfor cross-validation
Quick Validation Command
# Single skill
bunx markdownlint-cli skills/<name>/SKILL.md skills/<name>/references/*.md
# All skills
bunx markdownlint-cli --ignore bundles --ignore dist "**/*.md"
# Sync validation
./scripts/validate-skill-sync.sh