Continuous Learning

affaan-m/ECC/docs/ja-JP/skills/continuous-learning

by affaan-mef648e01899ba3e8dc6371642deaaf64b4477775No license275K starsListed Oct 9, 2026Updated Oct 9, 2026Repository updated 4 days ago

Claude Codeセッションから再利用可能なパターンを自動的に抽出し、将来の使用のために学習済みスキルとして保存します。

Instructions onlyAI & Agents
AI-generated overview

Extracts reusable patterns from Claude Code sessions and saves them as learned skills for later use.

What it does
The skill evaluates a Claude Code session at its end, checks whether the session has enough messages, detects reusable patterns such as error resolutions, user corrections, workarounds, debugging techniques and project-specific conventions, and saves useful ones under a learned-skills directory. It is configured through a JSON config file that sets minimum session length, extraction threshold, auto-approval and the patterns to detect or ignore. It is designed to run as a Stop hook and also documents a manual extraction command.
When to use it
Use it when you want coding sessions to feed a growing library of reusable skills automatically. It suits users who want recurring fixes, corrections and debugging approaches captured without manual note-taking. It is also relevant when comparing or planning session-observation approaches for agent learning.
Requirements
Runs as a Claude Code Stop hook configured in the user's settings file, with a JSON config file and a learned-skills output directory. The document references a hook command script and a manual command, but no scripts are shipped with the skill.

継続学習スキル

Claude Codeセッションを終了時に自動的に評価し、学習済みスキルとして保存できる再利用可能なパターンを抽出します。

動作原理

このスキルは各セッション終了時にStopフックとして実行されます:

  1. セッション評価: セッションに十分なメッセージがあるか確認(デフォルト: 10以上)
  2. パターン検出: セッションから抽出可能なパターンを識別
  3. スキル抽出: 有用なパターンを~/.claude/skills/learned/に保存

設定

config.jsonを編集してカスタマイズ:

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効果的なデバッグアプローチ
project_specificプロジェクト固有の規約

フック設定

~/.claude/settings.jsonに追加:

json
{  "hooks": {    "Stop": [{      "matcher": "*",      "hooks": [{        "type": "command",        "command": "~/.claude/skills/continuous-learning/evaluate-session.sh"      }]    }]  }}

Stopフックを使用する理由

  • 軽量: セッション終了時に1回だけ実行
  • ノンブロッキング: すべてのメッセージにレイテンシを追加しない
  • 完全なコンテキスト: セッション全体のトランスクリプトにアクセス可能

関連項目

  • The Longform Guide - 継続学習に関するセクション
  • /learnコマンド - セッション中の手動パターン抽出

比較ノート (調査: 2025年1月)

vs Homunculus

Homunculus v2はより洗練されたアプローチを採用:

機能このアプローチHomunculus v2
観察Stopフック(セッション終了時)PreToolUse/PostToolUseフック(100%信頼性)
分析メインコンテキストバックグラウンドエージェント(Haiku)
粒度完全なスキル原子的な「本能」
信頼度なし0.3-0.9の重み付け
進化直接スキルへ本能 → クラスタ → スキル/コマンド/エージェント
共有なし本能のエクスポート/インポート

homunculusからの重要な洞察:

"v1はスキルに観察を依存していました。スキルは確率的で、発火率は約50-80%です。v2は観察にフック(100%信頼性)を使用し、学習された振る舞いの原子単位として本能を使用します。"

v2の潜在的な改善

  1. 本能ベースの学習 - 信頼度スコアリングを持つ、より小さく原子的な振る舞い
  2. バックグラウンド観察者 - 並行して分析するHaikuエージェント
  3. 信頼度の減衰 - 矛盾した場合に本能の信頼度が低下
  4. ドメインタグ付け - コードスタイル、テスト、git、デバッグなど
  5. 進化パス - 関連する本能をスキル/コマンドにクラスタ化

詳細: docs/continuous-learning-v2-spec.mdを参照。

Source and attribution

Source:affaan-m/ECCindocs/ja-JP/skills/continuous-learningat commitef648e0

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal