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/luohaothu/everything-codex/continuous-learningnpx skills add Luohaothu/everything-codex --skill continuous-learninggit clone --depth 1 https://github.com/Luohaothu/everything-codexWhat 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.00027 | $0.00981 |
| Opus 5 | $0.00014 | $0.00491 |
| Sonnet 5 | $0.00005 | $0.00196 |
| Haiku 4.5 | $0.00003 | $0.00098 |
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 — 112 lines — stays where its author put it; the contents beside it link to each section on GitHub.
持续学习技能
自动评估 Claude Code 会话的结尾,以提取可重用的模式,这些模式可以保存为学习到的技能。
工作原理
此技能作为 停止钩子 在每个会话结束时运行:
- 会话评估:检查会话是否包含足够多的消息(默认: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 |
项目特定的约定 |
钩子设置
添加到你的 ~/.claude/settings.json 中:
{
"hooks": {
"Stop": [{
"matcher": "*",
"hooks": [{
"type": "command",
"command": "~/.claude/skills/continuous-learning/evaluate-session.sh"
}]
}]
}
}
为什么使用停止钩子?
- 轻量级:仅在会话结束时运行一次
- 非阻塞:不会给每条消息增加延迟
- 完整上下文:可以访问完整的会话记录
相关
- 长篇指南 - 关于持续学习的章节
/learn命令 - 在会话中手动提取模式
对比说明(研究:2025年1月)
与 Homunculus (github.com/humanplane/homunculus) 对比
Homunculus v2 采用了更复杂的方法:
| 功能 | 我们的方法 | Homunculus v2 |
|---|---|---|
| 观察 | 停止钩子(会话结束时) | PreToolUse/PostToolUse 钩子(100% 可靠) |
| 分析 | 主上下文 | 后台代理 (Haiku) |
| 粒度 | 完整技能 | 原子化的“本能” |
| 置信度 | 无 | 0.3-0.9 加权 |
| 演进 | 直接到技能 | 本能 → 集群 → 技能/命令/代理 |
| 共享 | 无 | 导出/导入本能 |
来自 homunculus 的关键见解:
"v1 依赖技能来观察。技能是概率性的——它们触发的概率约为 50-80%。v2 使用钩子进行观察(100% 可靠),并以本能作为学习行为的原子单元。"
潜在的 v2 增强功能
- 基于本能的学习 - 更小、原子化的行为,附带置信度评分
- 后台观察者 - Haiku 代理并行分析
- 置信度衰减 - 如果被反驳,本能会降低置信度
- 领域标记 - 代码风格、测试、git、调试等
- 演进路径 - 将相关本能聚类为技能/命令
完整规格请参见:/Users/affoon/Documents/tasks/12-continuous-learning-v2.md
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 · 112 lines · 27 tokens per session scan B 9a8536fc1bba
continuous-learning is a skill published in the GitHub repository Luohaothu/everything-codex (24 stars, last pushed 21d ago), licensed MIT. It adds 27 tokens to every session and 981 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…