Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/codelably/harmony-claude-code/continuous-learningnpx skills add codelably/harmony-claude-code --skill continuous-learninggit clone --depth 1 https://github.com/codelably/harmony-claude-codeWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00021 | $0.01022 |
| Opus 5 | $0.00010 | $0.00511 |
| Sonnet 5 | $0.00004 | $0.00204 |
| Haiku 4.5 | $0.00002 | $0.00102 |
Grade B, and why
continuous-learning scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
新增到你的 `~/.claude/settings.json`: How it starts
The opening of the file, as written. The whole thing — 111 lines — stays where its author put it; the contents beside it link to each section on GitHub.
持續學習技能
自動評估 Claude Code 工作階段結束時的內容,提取可重用模式並儲存為學習技能。
運作方式
此技能作為 Stop hook 在每個工作階段結束時執行:
- 工作階段評估:檢查工作階段是否有足夠訊息(預設:10+ 則)
- 模式偵測:從工作階段識別可提取的模式
- 技能提取:將有用模式儲存到
~/.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 |
有效的除錯方法 |
project_specific |
專案特定慣例 |
Hook 設定
新增到你的 ~/.claude/settings.json:
{
"hooks": {
"Stop": [{
"matcher": "*",
"hooks": [{
"type": "command",
"command": "~/.claude/skills/continuous-learning/evaluate-session.sh"
}]
}]
}
}
為什麼用 Stop Hook?
- 輕量:工作階段結束時只執行一次
- 非阻塞:不會為每則訊息增加延遲
- 完整上下文:可存取完整工作階段記錄
相關
- Longform Guide - 持續學習章節
/learn指令 - 工作階段中手動提取模式
比較筆記(研究:2025 年 1 月)
vs Homunculus (github.com/humanplane/homunculus)
Homunculus v2 採用更複雜的方法:
| 功能 | 我們的方法 | Homunculus v2 |
|---|---|---|
| 觀察 | Stop hook(工作階段結束) | PreToolUse/PostToolUse hooks(100% 可靠) |
| 分析 | 主要上下文 | 背景 agent(Haiku) |
| 粒度 | 完整技能 | 原子「本能」 |
| 信心 | 無 | 0.3-0.9 加權 |
| 演化 | 直接到技能 | 本能 → 聚類 → 技能/指令/agent |
| 分享 | 無 | 匯出/匯入本能 |
來自 homunculus 的關鍵見解:
"v1 依賴技能進行觀察。技能是機率性的——它們觸發約 50-80% 的時間。v2 使用 hooks 進行觀察(100% 可靠),並以本能作為學習行為的原子單位。"
潛在 v2 增強
- 基於本能的學習 - 較小的原子行為,帶信心評分
- 背景觀察者 - Haiku agent 並行分析
- 信心衰減 - 如果被矛盾則本能失去信心
- 領域標記 - code-style、testing、git、debugging 等
- 演化路徑 - 將相關本能聚類為技能/指令
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 111 lines · 21 tokens per session scan B 83d44aa85d95
continuous-learning is a skill published in the GitHub repository codelably/harmony-claude-code (42 stars, last pushed 6mo ago), licensed MIT. It adds 21 tokens to every session and 1,022 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
next-cache-components-adoption
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…
babysit-pr
Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…
imagegen
Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…
next-cache-components-optimizer
Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…