Reference example of extracting, structuring, and bulletproofing a critical skill.
Extracted debugging framework from /Users/jesse/.claude/CLAUDE.md:
- 4-phase systematic process (Investigation → Pattern Analysis → Hypothesis → Implementation)
- Core mandate: ALWAYS find root cause, NEVER fix symptoms
- Rules designed to resist time pressure and rationalization
What to include:
- Complete 4-phase framework with all rules
- Anti-shortcuts ("NEVER fix symptom", "STOP and re-analyze")
- Pressure-resistant language ("even if faster", "even if I seem in a hurry")
- Concrete steps for each phase
What to leave out:
- Project-specific context
- Repetitive variations of same rule
- Narrative explanations (condensed to principles)
- Rich when_to_use - Included symptoms and anti-patterns
- Type: technique - Concrete process with steps
- Keywords - "root cause", "symptom", "workaround", "debugging", "investigation"
- Flowchart - Decision point for "fix failed" → re-analyze vs add more fixes
- Phase-by-phase breakdown - Scannable checklist format
- Anti-patterns section - What NOT to do (critical for this skill)
Framework designed to resist rationalization under pressure:
- "ALWAYS" / "NEVER" (not "should" / "try to")
- "even if faster" / "even if I seem in a hurry"
- "STOP and re-analyze" (explicit pause)
- "Don't skip past" (catches the actual behavior)
- Phase 1 required - Can't skip to implementation
- Single hypothesis rule - Forces thinking, prevents shotgun fixes
- Explicit failure mode - "IF your first fix doesn't work" with mandatory action
- Anti-patterns section - Shows exactly what shortcuts look like
- Root cause mandate in overview + when_to_use + Phase 1 + implementation rules
- "NEVER fix symptom" appears 4 times in different contexts
- Each phase has explicit "don't skip" guidance
Created 4 validation tests following skills/meta/testing-skills-with-subagents:
- Simple bug, no time pressure
- Result: Perfect compliance, complete investigation
- User "in a hurry", symptom fix looks easy
- Result: Resisted shortcut, followed full process, found real root cause
- Multi-layer failure, unclear if can find root cause
- Result: Systematic investigation, traced through all layers, found source
- Hypothesis doesn't work, temptation to add more fixes
- Result: Stopped, re-analyzed, formed new hypothesis (no shotgun)
All tests passed. No rationalizations found.
- Complete 4-phase framework
- Anti-patterns section
- Flowchart for "fix failed" decision
- Added link to skills/testing/test-driven-development
- Note explaining TDD's "simplest code" ≠ debugging's "root cause"
- Prevents confusion between methodologies
Bulletproof skill that:
- ✅ Clearly mandates root cause investigation
- ✅ Resists time pressure rationalization
- ✅ Provides concrete steps for each phase
- ✅ Shows anti-patterns explicitly
- ✅ Tested under multiple pressure scenarios
- ✅ Clarifies relationship to TDD
- ✅ Ready for use
Most important bulletproofing: Anti-patterns section showing exact shortcuts that feel justified in the moment. When Claude thinks "I'll just add this one quick fix", seeing that exact pattern listed as wrong creates cognitive friction.
When encountering a bug:
- Load skill: skills/debugging/systematic-debugging
- Read overview (10 sec) - reminded of mandate
- Follow Phase 1 checklist - forced investigation
- If tempted to skip - see anti-pattern, stop
- Complete all phases - root cause found
Time investment: 5-10 minutes Time saved: Hours of symptom-whack-a-mole
Created: 2025-10-03 Purpose: Reference example for skill extraction and bulletproofing