بنقرة واحدة
continuous-learning
// Automatically extract reusable patterns from Claude Code sessions and save them as learned skills for future use.
// Automatically extract reusable patterns from Claude Code sessions and save them as learned skills for future use.
Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.
Patterns for providing structured feedback that closes the loop between implementation and requirements. Use when closing issues, documenting implementation decisions, or updating specs with learnings.
Patterns for breaking specs into atomic issues with proper dependency graphs and execution ordering. Use when planning implementation of a spec or organizing complex work.
Patterns for writing effective specs that capture user intent, design decisions, and requirements clearly. Use when creating or updating specs to ensure quality and completeness.
Use when starting implementation tasks, planning features, or managing multi-session work. Enforces spec-first development with proper issue tracking and feedback loops. Integrates sudocode specs/issues with Claude Code's native task system.
Use this skill when writing new features, fixing bugs, or refactoring code. Enforces test-driven development with 80%+ coverage including unit, integration, and E2E tests. Integrates with sudocode for issue tracking and feedback.
| name | continuous-learning |
| description | Automatically extract reusable patterns from Claude Code sessions and save them as learned skills for future use. |
Automatically evaluates Claude Code sessions on end to extract reusable patterns that can be saved as learned skills.
This skill runs as a Stop hook at the end of each session:
~/.claude/skills/learned/Edit config.json to customize:
{
"min_session_length": 10,
"extraction_threshold": "medium",
"auto_approve": false,
"learned_skills_path": "~/.claude/skills/learned/",
"patterns_to_detect": [
"error_resolution",
"user_corrections",
"workarounds",
"debugging_techniques",
"project_specific"
],
"ignore_patterns": [
"simple_typos",
"one_time_fixes",
"external_api_issues"
]
}
| 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 |
Add to your ~/.claude/settings.json:
{
"hooks": {
"Stop": [{
"matcher": "*",
"hooks": [{
"type": "command",
"command": "~/.claude/skills/continuous-learning/evaluate-session.sh"
}]
}]
}
}
/learn command - Manual pattern extraction mid-sessionWhen patterns are extracted that relate to a spec, they can become feedback:
Pattern detected: "Error handling for OAuth requires PKCE flow"
Related spec: [[s-auth]] (Authentication System)
→ Automatically suggest:
add_feedback to_id=s-auth type=suggestion
content="Consider adding PKCE requirement to OAuth section.
Discovered during implementation that this is required for
security compliance."
Analyze feedback provided across sessions to identify:
When evaluating sessions, include sudocode activity:
{
"patterns_to_detect": [
"error_resolution",
"user_corrections",
"workarounds",
"debugging_techniques",
"project_specific",
"spec_clarifications", // NEW: Ambiguities found in specs
"feedback_improvements", // NEW: Better feedback patterns
"dependency_discoveries" // NEW: Missing issue dependencies
]
}
Significant patterns can be promoted to formal specs:
Pattern: "Always use PKCE for OAuth mobile flows"
↓
Consider creating:
upsert_spec title="OAuth Security Requirements"
description="Patterns learned from implementation..."