自动从 Claude Code 会话(Session)中提取可重用的模式(Pattern),并将其作为已学习的技能(Skill)保存以备将来使用。
42
42%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
Fix and improve this skill with Tessl
tessl review fix ./docs/ja-JP/skills/continuous-learning/SKILL.mdClaude Code 会话结束时自动进行评估,提取可作为已学习技能保存的可重用模式(Pattern)。
此技能在每个会话结束时作为 Stop 钩子(Hook) 执行:
~/.claude/skills/learned/通过编辑 config.json 进行自定义:
{
"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"
]
}| 模式 | 描述 |
|---|---|
error_resolution | 特定错误的解决方法 |
user_corrections | 来自用户修正的模式 |
workarounds | 针对框架/库特性的解决方案 |
debugging_techniques | 有效的调试方法(Debugging Approaches) |
project_specific | 项目特定的约定 |
添加到 ~/.claude/settings.json:
{
"hooks": {
"Stop": [{
"matcher": "*",
"hooks": [{
"type": "command",
"command": "~/.claude/skills/continuous-learning/evaluate-session.sh"
}]
}]
}
}/learn 命令 - 会话中的手动模式提取Homunculus v2 采用了更精细的方法:
| 功能 | 当前方法 | Homunculus v2 |
|---|---|---|
| 观察 | Stop 钩子 (会话结束时) | PreToolUse/PostToolUse 钩子 (100% 可靠性) |
| 分析 | 主上下文 (Main Context) | 后台智能体 (Background Agent, Haiku) |
| 粒度 | 完整的技能 | 原子级的“本能 (Instinct)” |
| 置信度 | 无 | 0.3-0.9 的权重分配 |
| 演进 | 直接转换为技能 | 本能 → 集群 → 技能/命令/智能体 |
| 共享 | 无 | 本能的导出/导入 |
homunculus 的重要洞察:
"v1 依赖技能进行观察。技能是概率性的,触发率约为 50-80%。v2 使用钩子(100% 可靠性)进行观察,并使用本能作为学习行为的原子单位。"
详细信息:请参阅 /Users/affoon/Documents/tasks/12-continuous-learning-v2.md。
dfbf946
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.