meta
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.
- License 许可
- MIT
- 所属仓库
- whilp/world
- 最近更新
- 2026-11-13
- Stars
- ★ 10
- Forks
- 3
01 前言 Front Matter
- 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.
03 SKILL.md 正文
Writing effective Claude Code skills
Required structure
skill-name/
├── SKILL.md (required)
├── reference.md (optional)
├── scripts/ (optional)
└── templates/ (optional)
SKILL.md frontmatter
---
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
---
Critical best practices
- Keep skills focused - one capability per skill
- Write specific descriptions - include actual terms users would mention
- Test activation - verify Claude invokes it when expected
- Use allowed-tools - restrict permissions for security
Description examples
❌ 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."
Debugging checklist
If Claude doesn't use your skill:
- Description lacks trigger terms users would say
- YAML syntax errors (check
---markers, indentation) - Description not specific enough about WHEN to use it
- Wrong file path or permissions
Finding and fixing frontmatter issues
Check if frontmatter exists:
# View first 10 lines of SKILL.md
head -10 ~/.claude/skills/*/SKILL.md
Common frontmatter problems:
- Missing frontmatter block - File starts with
#instead of---- Fix: Add YAML block at top of file
- Missing closing
---- Only one---marker- Fix: Ensure both opening and closing markers exist
- Missing required fields - No
name:ordescription:- Fix: Add both required fields
- Wrong indentation - YAML is indentation-sensitive
- Fix: Use 2 spaces, no tabs
- Missing description trigger terms - Generic description
- Fix: Add specific keywords users would say
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
Systematic skill debugging workflow
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 terms
-
Test description specificity - Does it explain WHEN to use?
- Include file types, actions, or domain terms
- Avoid generic phrases like "helps with" or "manages"
-
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
Skills vs slash commands
Use skills for:
- Complex workflows with multiple files
- Automatic contextual invocation
- Comprehensive capabilities
Use slash commands for:
- Simple single prompts
- Manual explicit control
- Quick frequently-used operations
04 同仓库更多 Skills
screenshot
Take screenshots, screen recordings, scrolling captures, and OCR text recognition using CleanShot X. Use when user requests screenshots, captures, screen recording, OCR, text extraction, or image annotation.
nvim
Interact with Neovim configuration and build system
karabiner
Configure and manage Karabiner-Elements key remapping. Use when modifying karabiner.json, adding key remappings, creating complex modifications, managing profiles, setting variables, or troubleshooting keybinding issues.
hammerspoon
Configure and manage Hammerspoon automation, app launching, and window switching. Use when working with ~/.config/hammerspoon config files, adding keybindings, modifying the leader modal, or troubleshooting Hammerspoon functionality. Window management is handled by AeroSpace.
ghostty
Configure and manage Ghostty terminal emulator settings. Use when modifying ghostty config, validating configuration, checking window settings, themes, fonts, keybindings, or troubleshooting ghostty startup behavior.
gh-workflow
Trigger and monitor GitHub Actions workflows, CI/CD pipelines, and automated builds. Use when running workflows, triggering CI, deploying via GitHub Actions, downloading artifacts, or checking workflow status on github.com