Create and manage Claude Code skills 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, file paths, content patterns), enforcement levels (block, suggest, warn), hook mechanisms (UserPromptSubmit, PreToolUse), session tracking, and the 500-line rule.
60
71%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./.claude/skills/skill-developer/SKILL.mdComprehensive 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:
1. UserPromptSubmit Hook (Proactive Suggestions)
.claude/hooks/skill-activation-prompt.tsenforcement: "block" skills are marked MANDATORY; suggest/warn skills always appear as recommendations2. PreToolUse Hook - Skill Verification Guard (Enforcement)
.claude/hooks/skill-verification-guard.tsenforcement: "block" skills can block3. PostToolUse Hook - Edit Tracker
.claude/hooks/post-tool-use-tracker.sh4. PostToolUse Hook - Skill Activation Tracker
.claude/hooks/skill-activation-tracker.ts5. Stop Hook - Session Doc Updater
.claude/hooks/session-doc-updater.tsOptional (shipped but not wired): error-handling-reminder.ts (Stop) — a gentle post-response self-check that analyzes edited files for risky patterns instead of blocking edits.
Philosophy Change (2025-10-27): We moved away from blocking PreToolUse for Sentry/error handling. Instead, use gentle post-response reminders that don't block workflow but maintain code quality awareness.
Location: .claude/skills/skill-rules.json
Defines:
Purpose: Enforce critical best practices that prevent errors
Characteristics:
"guardrail""block""critical" or "high"Examples:
frontend-dev-guidelines - Enforce React/TypeScript patterns (the shipped block guardrail)database-verification skill verifying table/column names before Prisma queries (hypothetical)When to Use:
Purpose: Provide comprehensive guidance for specific areas
Characteristics:
"domain""suggest""high" or "medium"Examples:
backend-dev-guidelines - Node.js/Express/TypeScript patternsfrontend-dev-guidelines - React/TypeScript best practiceserror-tracking - Sentry integration guidanceWhen to Use:
Location: .claude/skills/{skill-name}/SKILL.md
Template:
---
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, examplesBest Practices:
See SKILL_RULES_REFERENCE.md for complete schema.
Basic Template:
{
"my-new-skill": {
"type": "domain",
"enforcement": "suggest",
"priority": "medium",
"promptTriggers": {
"keywords": ["keyword1", "keyword2"],
"intentPatterns": ["(create|add).*?something"]
}
}
}Test UserPromptSubmit:
echo '{"session_id":"test","prompt":"your test prompt"}' | \
npx tsx .claude/hooks/skill-activation-prompt.tsTest PreToolUse:
cat <<'EOF' | npx tsx .claude/hooks/skill-verification-guard.ts
{"session_id":"test","tool_name":"Edit","tool_input":{"file_path":"test.ts"}}
EOFBased on testing:
✅ 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
enforcement: "block" skills can hard-block — in both the UserPromptSubmit mandatory list and the PreToolUse guardrail checks. suggest/warn matches are always advisory.Example: Database column name verification
Example: Frontend development guidelines
Rarely used - most skills are either BLOCK or SUGGEST.
Purpose: Don't nag repeatedly in same session
How it works:
State File: .claude/hooks/state/skills-used-{session_id}.json
Purpose: Permanent skip for verified files
Marker: // @skip-validation
Usage:
// @skip-validation
import { PrismaService } from './prisma';
// This file has been manually verifiedNOTE: Use sparingly - defeats the purpose if overused
Purpose: Emergency disable, temporary override
Global disable:
export SKIP_MANDATORY_SKILLS=true # Disables mandatory-skill blocking
export SKIP_PRETOOLUSE_AI=true # Disables AI edit analysis in the guardSkill-specific (via skipConditions.envOverride in skill-rules.json):
export SKIP_FRONTEND_GUIDELINES=true
export SKIP_ERROR_REMINDER=true # Optional Stop-hook reminderWhen creating a new skill, verify:
.claude/skills/{name}/SKILL.mdskill-rules.jsonjq . skill-rules.jsonFor detailed information on specific topics, see:
Complete guide to all trigger types:
Complete skill-rules.json schema:
Deep dive into hook internals:
Comprehensive debugging guide:
Ready-to-use pattern collection:
Future enhancements and ideas:
.claude/skills/{name}/SKILL.md with frontmatter.claude/skills/skill-rules.jsonnpx tsx commandsSee TRIGGER_TYPES.md for complete details.
// @skip-validation (permanent skip)SKIP_MANDATORY_SKILLS, per-skill envOverride (emergency disable)✅ 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:
# UserPromptSubmit
echo '{"prompt":"test"}' | npx tsx .claude/hooks/skill-activation-prompt.ts
# PreToolUse
cat <<'EOF' | npx tsx .claude/hooks/skill-verification-guard.ts
{"tool_name":"Edit","tool_input":{"file_path":"test.ts"}}
EOFSee 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/skill-verification-guard.ts - PreToolUse (Edit|MultiEdit|Write).claude/hooks/post-tool-use-tracker.sh - PostToolUse (Edit|MultiEdit|Write).claude/hooks/skill-activation-tracker.ts - PostToolUse (Skill).claude/hooks/session-doc-updater.ts - Stop.claude/hooks/error-handling-reminder.ts - Stop (optional, not wired by default)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
07f75ce
Also appears in
since Jul 24, 2026
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.