/learn Command
Analyze the current session and extract patterns worth saving as skills.When to Use
Run/learn at any point during a session when you’ve solved a non-trivial problem.
What to Extract
Look for:-
Error Resolution Patterns
- What error occurred?
- What was the root cause?
- What fixed it?
- Is this reusable for similar errors?
-
Debugging Techniques
- Non-obvious debugging steps
- Tool combinations that worked
- Diagnostic patterns
-
Workarounds
- Library quirks
- API limitations
- Version-specific fixes
-
Project-Specific Patterns
- Codebase conventions discovered
- Architecture decisions made
- Integration patterns
Command Syntax
Process
- Review the session for extractable patterns
- Identify the most valuable/reusable insight
- Draft the skill file
- Ask user to confirm before saving
- Save to
~/.claude/skills/learned/
Output Format
Creates a skill file at~/.claude/skills/learned/[pattern-name].md: