Claude Code SKILL.md Frontmatter Error — Fix Unrecognized Skills & Slash Commands
Symptom: Your custom skill under .claude/skills/ never appears in Claude Code's skill list or auto-triggers.
Every Claude Code skill must live at .claude/skills/<skill-name>/SKILL.md (exact uppercase SKILL.md) with valid YAML frontmatter containing both name: (lowercase kebab-case) and description: (explaining when to invoke the skill). Unquoted colons in description:, wrong filename casing (skill.md), or leftover {{PLACEHOLDER}} tokens prevent registration.
Broken vs. Fixed Configuration
# .claude/skills/deploy.md (wrong path!) --- name: Deploy Prod description: Deploy: release app to staging or production ---
# .claude/skills/deploy/SKILL.md --- name: deploy description: "Run pre-release checks and deploy to staging. Use when asked to ship or verify a release; not for local dev." --- 1. Run pnpm test && pnpm build. 2. Verify clean git status before tagging.
Why This Happens
YAML fails silently when description: contains an unquoted colon (e.g. description: Deploy: push to staging), or developers place the file at .claude/skills/deploy.md instead of .claude/skills/deploy/SKILL.md.
Step-by-Step Fix
- 01Use the directory structure .claude/skills/<slug>/SKILL.md
Each skill needs its own folder with an uppercase SKILL.md entrypoint.
- 02Quote YAML strings containing colons or special characters
Ensure name: is lowercase kebab-case and description: is double-quoted if it includes colons.
- 03Write concrete trigger conditions in description:
Describe exact user intents and when NOT to trigger so Claude routes reliably.
Automated AgentLint Checks That Catch This
Frequently Asked Questions
What is the difference between .claude/commands/ and .claude/skills/?
Slash commands are explicit user-invoked prompts, whereas skills include YAML name/description metadata so Claude Code can also auto-select them when relevant.
Can a skill bundle helper scripts alongside SKILL.md?
Yes. Placing scripts inside .claude/skills/<name>/scripts/ keeps helper logic modular without bloating CLAUDE.md.