Learner Skill
The Insight
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:
- BAD (mimicking): "When you see ConnectionResetError, add this try/except block"
- GOOD (reusable skill): "In async network code, any I/O operation can fail independently due to client/server lifecycle mismatches. The principle: wrap each I/O operation separately, because failure between operations is the common case, not the exception."
A good skill changes how Claude APPROACHES problems, not just what code it produces.
Why This Matters
Before extracting a skill, ask yourself:
- "Could someone Google this in 5 minutes?" → If yes, STOP. Don't extract.
- "Is this specific to THIS codebase?" → If no, STOP. Don't extract.
- "Did this take real debugging effort to discover?" → If no, STOP. Don't extract.
If a potential skill fails any of these questions, it's not worth saving.
Recognition Pattern
Use /oh-my-claudecode:learner ONLY after:
- Solving a tricky bug that required deep investigation
- Discovering a non-obvious workaround specific to this codebase
- Finding a hidden gotcha that wastes time when forgotten
- Uncovering undocumented behavior that affects this project
The Approach
Extraction Process
Step 1: Gather Required Information
Problem Statement: The SPECIFIC error, symptom, or confusion that occurred
- Include actual error messages, file paths, line numbers
- Example: "TypeError in src/hooks/session.ts:45 when sessionId is undefined after restart"
Solution: The EXACT fix, not general advice
- Include code snippets, file paths, configuration changes
- Example: "Add null check before accessing session.user, regenerate session on 401"
Triggers: Keywords that would appear when hitting this problem again
- Use error message fragments, file names, symptom descriptions
- Example: ["sessionId undefined", "session.ts TypeError", "401 session"]
Scope: Almost always Project-level unless it's a truly universal insight
Step 2: Quality Validation
The system REJECTS skills that are:
- Too generic (no file paths, line numbers, or specific error messages)
- Easily Googleable (standard patterns, library usage)
- Vague solutions (no code snippets or precise instructions)
- Poor triggers (generic words that match everything)
Step 3: Save Location
- User-level: ~/.claude/skills/omc-learned/ - Rare. Only for truly portable insights.
- Project-level: .omc/skills/ - Default. Version-controlled with repo.
What Makes a USEFUL Skill
CRITICAL: Not every solution is worth saving. A good skill is:
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" ✓
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" ✓
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" ✓
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" ✓
Anti-Patterns (DO NOT EXTRACT)
- Generic programming patterns (use documentation instead)
- Refactoring techniques (these are universal)
- Library usage examples (use library docs)
- Type definitions or boilerplate
- Anything a junior dev could Google in 5 minutes
Skill Format
Skills are saved as markdown with this structure:
YAML Frontmatter
Standard metadata fields:
- id, name, description, source, triggers, quality
Body Structure (Required)
# [Skill Name]
## The Insight
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."
## Why This Matters
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."
## Recognition Pattern
How do you know when this skill applies? What are the signs?
Example: "Building any long-lived connection handler (proxy, websocket, SSE)"
## The Approach
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."
## Example (Optional)
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.
Related Commands
- /oh-my-claudecode:note - Save quick notes that survive compaction (less formal than skills)
- /oh-my-claudecode:ralph - Start a development loop with learning capture
1---2name: extracting-learned-skills3description: 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.4---56# Learner Skill78## The Insight910Reusable 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.1112**The difference:**1314- BAD (mimicking): "When you see ConnectionResetError, add this try/except block"15- GOOD (reusable skill): "In async network code, any I/O operation can fail independently due to client/server lifecycle mismatches. The principle: wrap each I/O operation separately, because failure between operations is the common case, not the exception."1617A good skill changes how Claude APPROACHES problems, not just what code it produces.1819## Why This Matters2021Before extracting a skill, ask yourself:2223- "Could someone Google this in 5 minutes?" → If yes, STOP. Don't extract.24- "Is this specific to THIS codebase?" → If no, STOP. Don't extract.25- "Did this take real debugging effort to discover?" → If no, STOP. Don't extract.2627If a potential skill fails any of these questions, it's not worth saving.2829## Recognition Pattern3031Use /oh-my-claudecode:learner ONLY after:3233- Solving a tricky bug that required deep investigation34- Discovering a non-obvious workaround specific to this codebase35- Finding a hidden gotcha that wastes time when forgotten36- Uncovering undocumented behavior that affects this project3738## The Approach3940### Extraction Process4142**Step 1: Gather Required Information**4344- **Problem Statement**: The SPECIFIC error, symptom, or confusion that occurred4546 - Include actual error messages, file paths, line numbers47 - Example: "TypeError in src/hooks/session.ts:45 when sessionId is undefined after restart"4849- **Solution**: The EXACT fix, not general advice5051 - Include code snippets, file paths, configuration changes52 - Example: "Add null check before accessing session.user, regenerate session on 401"5354- **Triggers**: Keywords that would appear when hitting this problem again5556 - Use error message fragments, file names, symptom descriptions57 - Example: ["sessionId undefined", "session.ts TypeError", "401 session"]5859- **Scope**: Almost always Project-level unless it's a truly universal insight6061**Step 2: Quality Validation**6263The system REJECTS skills that are:6465- Too generic (no file paths, line numbers, or specific error messages)66- Easily Googleable (standard patterns, library usage)67- Vague solutions (no code snippets or precise instructions)68- Poor triggers (generic words that match everything)6970**Step 3: Save Location**7172- **User-level**: ~/.claude/skills/omc-learned/ - Rare. Only for truly portable insights.73- **Project-level**: .omc/skills/ - Default. Version-controlled with repo.7475### What Makes a USEFUL Skill7677**CRITICAL**: Not every solution is worth saving. A good skill is:78791. **Non-Googleable**: Something you couldn't easily find via search8081 - BAD: "How to read files in TypeScript" ❌82 - GOOD: "This codebase uses custom path resolution in ESM that requires fileURLToPath + specific relative paths" ✓83841. **Context-Specific**: References actual files, error messages, or patterns from THIS codebase8586 - BAD: "Use try/catch for error handling" ❌87 - GOOD: "The aiohttp proxy in server.py:42 crashes on ClientDisconnectedError - wrap StreamResponse in try/except" ✓88891. **Actionable with Precision**: Tells you exactly WHAT to do and WHERE9091 - BAD: "Handle edge cases" ❌92 - GOOD: "When seeing 'Cannot find module' in dist/, check tsconfig.json moduleResolution matches package.json type field" ✓93941. **Hard-Won**: Took significant debugging effort to discover9596 - BAD: Generic programming patterns ❌97 - GOOD: "Race condition in worker.ts - the Promise.all at line 89 needs await before the map callback returns" ✓9899### Anti-Patterns (DO NOT EXTRACT)100101- Generic programming patterns (use documentation instead)102- Refactoring techniques (these are universal)103- Library usage examples (use library docs)104- Type definitions or boilerplate105- Anything a junior dev could Google in 5 minutes106107## Skill Format108109Skills are saved as markdown with this structure:110111### YAML Frontmatter112113Standard metadata fields:114115- id, name, description, source, triggers, quality116117### Body Structure (Required)118119```markdown120# [Skill Name]121122## The Insight123What is the underlying PRINCIPLE you discovered? Not the code, but the mental model.124Example: "Async I/O operations are independently failable. Client lifecycle != server lifecycle."125126## Why This Matters127What goes wrong if you don't know this? What symptom led you here?128Example: "Proxy server crashes on client disconnect, taking down other requests."129130## Recognition Pattern131How do you know when this skill applies? What are the signs?132Example: "Building any long-lived connection handler (proxy, websocket, SSE)"133134## The Approach135The decision-making heuristic, not just code. How should Claude THINK about this?136Example: "For each I/O operation, ask: what if this fails right now? Handle it locally."137138## Example (Optional)139If code helps, show it - but as illustration of the principle, not copy-paste material.140```141142**Key**: A skill is REUSABLE if Claude can apply it to NEW situations, not just identical ones.143144## Related Commands145146- /oh-my-claudecode:note - Save quick notes that survive compaction (less formal than skills)147- /oh-my-claudecode:ralph - Start a development loop with learning capture