// Guide for writing and improving Claude Code skills. Use when creating new skills, debugging why skills aren't activating, or improving skill descriptions and structure.
| name | meta |
| description | Guide for writing and improving Claude Code skills. Use when creating new skills, debugging why skills aren't activating, or improving skill descriptions and structure. |
skill-name/
โโโ SKILL.md (required)
โโโ reference.md (optional)
โโโ scripts/ (optional)
โโโ templates/ (optional)
---
name: lowercase-with-hyphens
description: Explain WHAT it does AND WHEN to use it. Include trigger terms users would say.
allowed-tools: [Read, Write, Bash] # optional: restrict permissions
---
โ Bad: "Helps with data" โ Good: "Analyze Excel spreadsheets, generate pivot tables, create charts. Use when working with .xlsx files."
โ Bad: "Manages configuration" โ Good: "Read and update YAML/JSON config files. Use when modifying settings, environment variables, or application configuration."
If Claude doesn't use your skill:
--- markers, indentation)Check if frontmatter exists:
# View first 10 lines of SKILL.md
head -10 ~/.claude/skills/*/SKILL.md
Common frontmatter problems:
# instead of ---
--- - Only one --- marker
name: or description:
Validation script:
# Check all skills for frontmatter
for skill in ~/.claude/skills/*/SKILL.md; do
echo "=== $skill ==="
if head -1 "$skill" | grep -q "^---$"; then
echo "โ Has frontmatter"
else
echo "โ Missing frontmatter"
fi
done
When debugging skills that aren't working:
List all skills - Verify skill exists
ls -la ~/.claude/skills/
Check frontmatter - Validate YAML structure
head -10 ~/.claude/skills/skill-name/SKILL.md
Verify required fields - Ensure name and description exist
name: must match directory namedescription: must include trigger termsTest description specificity - Does it explain WHEN to use?
Check allowed-tools - If restricted, verify needed tools included
allowed-tools: [Read, Write, Edit, Bash, Glob, Grep]
Review content - Ensure instructions are clear and actionable
Use skills for:
Use slash commands for: