Extracts reusable skills and decision-making heuristics from debugging sessions. Use after solving tricky bugs, discovering non-obvious workarounds, or finding hidden gotchas specific to a codebase. Triggers include "save this as a skill", "learn from this", or after significant debugging effort.
Reusable skills are not code snippets to copy-paste, but **principles and decision-making heuristics** that teach Claude HOW TO THINK about a class of problems.
**The difference:**
A good skill changes how Claude APPROACHES problems, not just what code it produces.
Before extracting a skill, ask yourself:
If a potential skill fails any of these questions, it's not worth saving.
Use /oh-my-claudecode:learner ONLY after:
**Step 1: Gather Required Information**
- Include actual error messages, file paths, line numbers
- Example: "TypeError in src/hooks/session.ts:45 when sessionId is undefined after restart"
- Include code snippets, file paths, configuration changes
- Example: "Add null check before accessing session.user, regenerate session on 401"
- Use error message fragments, file names, symptom descriptions
- Example: ["sessionId undefined", "session.ts TypeError", "401 session"]
**Step 2: Quality Validation**
The system REJECTS skills that are:
**Step 3: Save Location**
**CRITICAL**: Not every solution is worth saving. A good skill is:
1. **Non-Googleable**: Something you couldn't easily find via search
- BAD: "How to read files in TypeScript" ❌
- GOOD: "This codebase uses custom path resolution in ESM that requires fileURLToPath + specific relative paths" ✓
1. **Context-Specific**: References actual files, error messages, or patterns from THIS codebase
- BAD: "Use try/catch for error handling" ❌
- GOOD: "The aiohttp proxy in server.py:42 crashes on ClientDisconnectedError - wrap StreamResponse in try/except" ✓
1. **Actionable with Precision**: Tells you exactly WHAT to do and WHERE
- BAD: "Handle edge cases" ❌
- GOOD: "When seeing 'Cannot find module' in dist/, check tsconfig.json moduleResolution matches package.json type field" ✓
1. **Hard-Won**: Took significant debugging effort to discover
- BAD: Generic programming patterns ❌
- GOOD: "Race condition in worker.ts - the Promise.all at line 89 needs await before the map callback returns" ✓
Skills are saved as markdown with this structure:
Standard metadata fields:
```markdown
What is the underlying PRINCIPLE you discovered? Not the code, but the mental model.
Example: "Async I/O operations are independently failable. Client lifecycle != server lifecycle."
What goes wrong if you don't know this? What symptom led you here?
Example: "Proxy server crashes on client disconnect, taking down other requests."
How do you know when this skill applies? What are the signs?
Example: "Building any long-lived connection handler (proxy, websocket, SSE)"
The decision-making heuristic, not just code. How should Claude THINK about this?
Example: "For each I/O operation, ask: what if this fails right now? Handle it locally."
If code helps, show it - but as illustration of the principle, not copy-paste material.
```
**Key**: A skill is REUSABLE if Claude can apply it to NEW situations, not just identical ones.
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/extracting-learned-skills/raw