| name | continuous-learning |
| description | Automatically extract reusable patterns from Claude Code sessions and save them as learned skills for future use. |
Continuous Learning Skill
Automatically evaluates Claude Code sessions on end to extract reusable patterns and save them to the project repository.
How It Works
This skill runs as a Stop hook at the end of each session:
- Session Evaluation: Checks if session has enough messages (default: 10+)
- Pattern Detection: Identifies extractable patterns from the session
- Skill Extraction: Saves useful patterns to
.claude/learned/ in the project repo
Storage
Learned patterns are saved to the project repository at .claude/learned/, not the global ~/.claude/ directory. This ensures:
- Patterns are version-controlled with the project
- Team members share the same learned knowledge
- Patterns stay relevant to this specific codebase
Configuration
Edit config.json to customize:
{
"min_session_length": 10,
"extraction_threshold": "medium",
"auto_approve": false,
"learned_skills_path": ".claude/learned/",
"patterns_to_detect": [
"error_resolution",
"user_corrections",
"workarounds",
"debugging_techniques",
"project_specific"
],
"ignore_patterns": [
"simple_typos",
"one_time_fixes",
"external_api_issues"
]
}
Pattern Types
| Pattern | Description |
|---|
error_resolution | How specific errors were resolved |
user_corrections | Patterns from user corrections |
workarounds | Solutions to framework/library quirks |
debugging_techniques | Effective debugging approaches |
project_specific | Project-specific conventions |
Hook Setup
Add to your ~/.claude/settings.json:
{
"hooks": {
"Stop": [{
"matcher": "*",
"hooks": [{
"type": "command",
"command": ".claude/skills/continuous-learning/evaluate-session.sh"
}]
}]
}
}
Related
/learn command - Manual pattern extraction mid-session