with one click
continuous-learning
// Automatically extract reusable patterns from OpenCode sessions and save them as learned skills for future use.
// Automatically extract reusable patterns from OpenCode sessions and save them as learned skills for future use.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | continuous-learning |
| description | Automatically extract reusable patterns from OpenCode sessions and save them as learned skills for future use. |
| version | 1.0.0 |
| scope | opencode |
| hooks | ["Stop"] |
Automatically evaluates OpenCode sessions at session end and extracts reusable patterns into new “learned skills” for future reuse.
Use this skill when you want:
~/.config/opencode/skills/<learned-skill>/SKILL.md~/.config/opencode/skills/learned/.continuous-learning-index.jsonThis skill runs as a Stop hook at the end of each OpenCode session:
10+ messages)~/.config/opencode/skills/<descriptive-slug>/SKILL.md~/.config/opencode/skills/learned/.continuous-learning-index.jsonLearned skills are written with meaningful, descriptive names derived from the session content rather than generic pattern categories:
<descriptive-slug>/SKILL.md (e.g., angular-facade-debugging/SKILL.md)<descriptive-slug>-2/SKILL.md (counter suffix for collisions)The slug is built from the most distinctive terms found in the session transcript.
The content also includes a signature: in frontmatter for deduplication.
Recommended structure:
~/.config/opencode/skills/continuous-learning/
skill.md (this file)config.jsonhooks/stop.shbin/evaluate-session.js (or evaluate-session.py)Learned output:
~/.config/opencode/skills/<descriptive-slug>/SKILL.md~/.config/opencode/skills/learned/.continuous-learning-index.jsonEdit config.json:
{
"min_session_length": 10,
"extraction_threshold": "medium",
"auto_approve": false,
"skills_root_path": "~/.config/opencode/skills/",
"learned_metadata_path": "~/.config/opencode/skills/learned/",
"patterns_to_detect": [
"error_resolution",
"user_corrections",
"workarounds",
"debugging_techniques",
"project_specific"
],
"ignore_patterns": ["simple_typos", "one_time_fixes", "external_api_issues"],
"max_skills_per_session": 3,
"dedupe_window_sessions": 20
}
Legacy note: learned_skills_path is still supported for backward compatibility.
If it points to .../skills/learned/, the generator will still write skills to
.../skills/<slug>/SKILL.md and keep metadata in the learned directory.
Shared setup note: if you want learned skills shared between OpenCode and
ClaudeCode, point skills_root_path to ~/.claude/skills/ and
learned_metadata_path to ~/.claude/skills/learned/.