Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-depend
.claude/skills/microck-writing-skills/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 270% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 142% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 81% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 128% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 218% | 0% |
Comprehensive guide for creating and managing skills in Claude Code with auto-activation system, following Anthropic's official best practices including the 500-line rule and progressive disclosure pattern.
Automatically activates when you mention:
UserPromptSubmit Hook (Proactive Suggestions)
.claude/hooks/skill-activation-prompt.tsSKILL_DEBUG=true to see matching logic--validate flag to check configurationLocation: .claude/skills/skill-rules.json
Defines:
"suggest" is implemented)Purpose: Provide comprehensive guidance for specific areas
Characteristics:
"domain""suggest" (advisory, non-blocking)"high" or "medium"Examples in HASH:
rust-error-stack - Error handling with error-stack cratecargo-dependencies - Cargo.toml dependency management patternsrust-documentation - Rust doc comment best practiceswriting-skills - This skill! Meta-guidance for creating skillsWhen to Use:
Guardrail skills with blocking enforcement ("block") are designed but not yet implemented. These would enforce critical patterns and prevent common mistakes.
Location: .claude/skills/{skill-name}/SKILL.md
Template:
markdown--- name: my-new-skill description: Brief description including keywords that trigger this skill. Mention topics, file types, and use cases. Be explicit about trigger terms. --- # My New Skill ## Purpose What this skill helps with ## When to Use Specific scenarios and conditions ## Key Information The actual guidance, documentation, patterns, examples
Best Practices:
See SKILL_RULES_REFERENCE.md for complete schema.
Basic Template:
json{ "my-new-skill": { "type": "domain", "enforcement": "suggest", "priority": "medium", "promptTriggers": { "keywords": ["keyword1", "keyword2"], "intentPatterns": ["(create|add).*?something"] } } }
Test with specific prompt:
bashecho '{"session_id":"test","prompt":"your test prompt","cwd":".","permission_mode":"auto","transcript_path":""}' | \ yarn workspace @local/claude-hooks run:skill
Validate configuration:
bashyarn lint:skill
Debug matching logic:
bashecho '{"session_id":"test","prompt":"your test prompt","cwd":".","permission_mode":"auto","transcript_path":""}' | \ yarn workspace @local/claude-hooks dev:skill
Based on testing:
\\b(keyword)\\b instead of just keyword✅ Keep SKILL.md under 500 lines ✅ Use progressive disclosure with reference files ✅ Add table of contents to reference files > 100 lines ✅ Write detailed description with trigger keywords ✅ Test with 3+ real scenarios before documenting ✅ Iterate based on actual usage
Currently only SUGGEST enforcement is implemented:
Future: Blocking enforcement ("block") and warning enforcement ("warn") are designed in the schema but not yet implemented.
Yarn Commands:
yarn lint:skill - Validate configurationyarn workspace @local/claude-hooks run:skill - Run skill activation with test promptyarn workspace @local/claude-hooks dev:skill - Run with debug output enabledEnvironment Variables:
SKILL_DEBUG=true - Show detailed matching logic to stderr (automatically set by yarn dev:skill)CLAUDE_PROJECT_DIR - Override project directory (auto-detected if not set)Validation shows:
When creating a new skill, verify:
.claude/skills/{name}/SKILL.mdskill-rules.jsonyarn workspace @local/claude-hooks dev:skill)jq . .claude/skills/skill-rules.jsonyarn lint:skillFor detailed information on specific topics, see:
Complete guide to trigger types (currently implemented):
Note: File path and content pattern triggers are documented but not yet used by the hook.
Complete skill-rules.json schema:
Deep dive into hook internals:
Note: PreToolUse hooks and session state management are documented but not yet implemented.
Comprehensive debugging guide:
SKILL_DEBUG=true)Ready-to-use pattern collection:
Ideas for expanding the skill system:
.claude/skills/{name}/SKILL.md with frontmatter.claude/skills/skill-rules.jsonyarn lint:skill and yarn workspace @local/claude-hooks dev:skillSee trigger-types.md for complete details.
yarn workspace @local/claude-hooks dev:skill - Show detailed matching logicyarn lint:skill - Validate configuration.claude/hooks/skill-activation-prompt.ts for implementation✅ 500-line rule: Keep SKILL.md under 500 lines ✅ Progressive disclosure: Use reference files for details ✅ Table of contents: Add to reference files > 100 lines ✅ One level deep: Don't nest references deeply ✅ Rich descriptions: Include all trigger keywords (max 1024 chars) ✅ Test first: Build 3+ evaluations before extensive documentation ✅ Gerund naming: Prefer verb + -ing (e.g., "processing-pdfs")
Test hooks manually:
bash# Test with prompt echo '{"session_id":"test","prompt":"test","cwd":".","permission_mode":"auto","transcript_path":""}' | \ yarn workspace @local/claude-hooks run:skill # Validate configuration yarn lint:skill # Debug matching echo '{"session_id":"test","prompt":"test","cwd":".","permission_mode":"auto","transcript_path":""}' | \ yarn workspace @local/claude-hooks dev:skill
See troubleshooting.md for complete debugging guide.
Configuration:
.claude/skills/skill-rules.json - Master configuration.claude/hooks/state/ - Session tracking.claude/settings.json - Hook registrationHooks:
.claude/hooks/skill-activation-prompt.ts - UserPromptSubmit.claude/hooks/error-handling-reminder.ts - Stop event (gentle reminders)All Skills:
.claude/skills/*/SKILL.md - Skill content filesSkill Status: COMPLETE - Restructured following Anthropic best practices ✅ Line Count: < 500 (following 500-line rule) ✅ Progressive Disclosure: Reference files for detailed information ✅
Next: Create more skills, refine patterns based on usage
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-14 | pass→pass | 7,901 | 6,747 | -15% | 1 | 1 | 0% | 1,343 | 3,824 | +185% | 0 | 0 | — |
case-01 | fail→pass | 27,220 | 8,790 | -68% | 1 | 1 | 0% | 1,141 | 4,227 | +270% | 0 | 0 | — |
case-02 | fail→fail | 29,185 | 9,905 | -66% | 1 | 1 | 0% | 1,164 | 4,400 | +278% | 0 | 0 | — |
case-03 | fail→pass | 10,773 | 9,041 | -16% | 1 | 1 | 0% | 1,759 | 4,248 | +142% | 0 | 0 | — |
case-04 | fail→pass | 15,127 | 10,883 | -28% | 1 | 1 | 0% | 2,547 | 4,600 | +81% | 0 | 0 | — |
case-05 | pass→pass | 6,802 | 4,656 | -32% | 1 | 1 | 0% | 952 | 3,253 | +242% | 0 | 0 | — |
case-06 | fail→pass | 8,847 | 4,084 | -54% | 1 | 1 | 0% | 1,494 | 3,408 | +128% | 0 | 0 | — |
case-07 | fail→pass | 7,573 | 5,365 | -29% | 1 | 1 | 0% | 1,119 | 3,564 | +218% | 0 | 0 | — |
case-08 | fail→pass | 8,448 | 5,239 | -38% | 1 | 1 | 0% | 1,156 | 3,547 | +207% | 0 | 0 | — |
case-09 | fail→pass | 13,711 | 2,866 | -79% | 1 | 1 | 0% | 2,223 | 3,162 | +42% | 0 | 0 | — |
case-10 | fail→pass | 10,586 | 4,565 | -57% | 1 | 1 | 0% | 1,757 | 3,423 | +95% | 0 | 0 | — |
case-11 | pass→pass | 11,917 | 3,783 | -68% | 1 | 1 | 0% | 1,824 | 3,197 | +75% | 0 | 0 | — |
case-12 | pass→pass | 8,340 | 6,598 | -21% | 1 | 1 | 0% | 1,364 | 3,694 | +171% | 0 | 0 | — |
case-13 | fail→pass | 7,706 | 3,782 | -51% | 1 | 1 | 0% | 1,212 | 3,172 | +162% | 0 | 0 | — |
case-15 | fail→pass | 11,290 | 3,026 | -73% | 1 | 1 | 0% | 1,748 | 3,144 | +80% | 0 | 0 | — |
case-16 | pass→pass | 10,685 | 3,958 | -63% | 1 | 1 | 0% | 1,649 | 3,359 | +104% | 0 | 0 | — |
case-17 | fail→pass | 2,890 | 2,489 | -14% | 1 | 1 | 0% | 451 | 3,062 | +579% | 0 | 0 | — |
case-18 | fail→pass | 23,554 | 6,348 | -73% | 1 | 1 | 0% | 1,177 | 3,783 | +221% | 0 | 0 | — |
case-19 | pass→fail | 10,894 | 4,808 | -56% | 1 | 1 | 0% | 1,838 | 2,888 | +57% | 0 | 0 | — |
case-20 | pass→pass | 7,876 | 5,540 | -30% | 1 | 1 | 0% | 1,186 | 3,529 | +198% | 0 | 0 | — |
case-21 | pass→fail | 15,780 | 11,370 | -28% | 1 | 1 | 0% | 2,390 | 4,303 | +80% | 0 | 0 | — |
case-22 | pass→pass | 9,246 | 2,451 | -73% | 1 | 1 | 0% | 1,333 | 3,092 | +132% | 0 | 0 | — |
case-23 | fail→pass | 12,565 | 8,541 | -32% | 1 | 1 | 0% | 1,897 | 4,029 | +112% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted, and 19 counted toward the lift figure. The other 4 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +48 percentage points is the difference between those two pass rates over the 19 comparable cases. 2 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.