second-brain-learn

second-brain-learn is a skill for Codex from YusenZhang0601/context-canopy. It costs 145 tokens per session (2,280 once invoked), scanned A, original, MIT.

A learning tool that reviews the current conversation and work evidence to find durable preferences, project rules, reusable methods, and lessons. It routes each finding to the appropriate long-term owner or leaves it unsaved when it has no lasting value.

In plain words
What is it for?
Use it when you want the agent to learn, remember, adopt, or stop a behavior, correct a rule, save an experience, or improve a reusable workflow.
Why use it?
It reduces the risk of losing useful lessons while avoiding the storage of temporary context, secrets, unsupported assumptions, or duplicate rules.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: mentions CLAUDE.md; mentions AGENTS.md; mentions Codex.

Install

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.

agentmods
npx agentmods add skills/yusenzhang0601/context-canopy/second-brain-learn
Any agent
npx skills add YusenZhang0601/context-canopy --skill second-brain-learn
Clone the repo
git clone --depth 1 https://github.com/YusenZhang0601/context-canopy

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for second-brain-learn

README.md
[![agentmods](https://agentmods.dev/badge/skills/yusenzhang0601/context-canopy/second-brain-learn.svg)](https://agentmods.dev/skills/yusenzhang0601/context-canopy/second-brain-learn)
Your own site
<a href="https://agentmods.dev/skills/yusenzhang0601/context-canopy/second-brain-learn"><img src="https://agentmods.dev/badge/skills/yusenzhang0601/context-canopy/second-brain-learn.svg" alt="Measured on agentmods" height="20"></a>
Per session 145 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,280 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00145 $0.02280
Opus 5 $0.00072 $0.01140
Sonnet 5 $0.00029 $0.00456
Haiku 4.5 $0.00015 $0.00228

Measured 6d ago against content hash 4249eb8910fc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

second-brain-learn scanned grade A with 0 findings 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 6d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/second-brain-learn/SKILL.md · 128 lines

How it starts

The opening of the file, as written. The whole thing — 128 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Second Brain - Learn(沉淀当前对话与工作经验)

从当前对话里提炼可复用的“油”,由当前 Agent 自己完成证据审计、owner 路由、写入和验证。SkillOpt 只提供“从历史工作中学习并迭代”的理念,不运行或依赖 SkillOpt/Sleep 的程序、API、评分数据库或自动优化器。

显式调用

  • Codex:$second-brain-learn,或从 /skills 选择。历史 /learn 入口应薄重定向到本 Skill。
  • Claude、Hermes、AntiGravity:/second-brain-learn

范围

默认只审计当前父对话及其直接工作证据。不要自行扩展为全历史扫描;历史批量榨取使用 second-brain-distill

可学习对象包括:

  • 用户明确表达的跨 Agent 偏好。
  • 当前 Agent 独有角色、分工或宿主限制。
  • 可复用的 Skill 流程或现有 Skill 改进。
  • 项目局部规则、失败教训、验收标准及其实际自动注入入口。
  • 可成为 canonical 的知识、洞见或个人事实。
  • 对某座山的证据、阻点、路线变化和下一信息动作。

闲聊、一次性措辞、秘密值、模型自我评价、无证据人格推断、工具噪声和已被 owner 覆盖的重复内容不沉淀。

Authority 路由

  • 跨 Agent 稳定规则 → 90-System/Personal-AI/COMMON-RULES.md
  • 当前 Agent 的独特角色 → 90-System/Personal-AI/AGENTS/<agent-id>.md
  • 标准化执行流程 → 对应 90-System/Personal-AI/SKILLS/<skill-id>/SKILL.md
  • 项目局部约束 → 项目唯一 authority;若 AGENTS.mdCLAUDE.mdGEMINI.md 等是实际自动注入入口或受管投影,必须按项目合同同步它们,不能只写 Second Brain 卡片或自然语言指针
  • 客观知识/洞见/个人事实 → Vault 对应 canonical owner
  • 长期方向进度 → 03-Personal/Profile/长期方向与山脉.md 或具体 mountain 页面
  • 无持久价值或已覆盖 → no-op

宿主记忆和自动摘要只可作为待核验证据,不是 owner。

学习流程

1. 建立证据账本

按对话顺序复核:用户要求、Agent 行动、工具证据、用户纠正、最终结果、尚未解决项。对每个候选记录:

  • 可检索来源位置或消息摘要。
  • 候选主张,不超过一个稳定主题。
  • 适用范围和目标 owner。
  • explicitsupported inferenceassumptionunknown
  • 风险级别、新颖性和是否与现有 owner 冲突。
  • 相对旧规则的转换类型、旧/新预期行为,以及需要进入或退出的注入面。

不要只读最终回答;真正有价值的学习常在用户纠正、失败原因和验证差异中。

2. 查重、反证与状态转换

先读 INDEX、相关 canonical、COMMON-RULES、当前 Agent profile 和相关 Skills。检查文件名、H1、alias、核心主张与现有规则,优先更新唯一 owner。主动寻找:

  • 这是不是已有规则的具体例子,而不是新规则?
  • 用户后来是否撤销或缩小了先前要求?
  • 成功来自哪一步,还是只是时间相关?
  • 失败教训是否只适用于当前项目或宿主?

每个候选必须且只能裁决为一种主要转换:addreinforce/no-opcorrectnarrowbroadenreplacemergerelocateretire。判断依据是证据强度、authority、适用范围和反例,不是“新消息天然更真”。若新结论修正旧规则,必须指出旧规则位置、仍保留的有效部分、退出活动注入链的部分和历史证据去向。

把相关活动 owner 作为一个整体审计:删除语义重复,合并可由一条更精确规则表达的内容,把细节迁回项目或 Skill,退役已失效正文。除非宿主或项目有可验证硬限制,不设任意行数或字节上限;目标是当前有效性与信息密度,不是只增不减或机械压缩。

3. 风险分级与批准

可自动合并的低风险学习:

  • 用户当前明确陈述、适用范围清楚的格式或协作偏好。
  • 有两处独立工作证据支持、且不涉及权限的稳定方法偏好。
  • 现有 owner 的去重、勘误、精确化或验证状态更新。
  • 有更强证据支持、范围明确且不改变高风险边界的旧规则缩限、替代、迁移或退役。
  • 当前 Agent profile 的已验证宿主事实。
  • mountain 的新证据、普通 checkpoint 或已执行工作链接,但不改变 summit。

Read the full file on GitHub · 128 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. 6d ago First seen · 128 lines · 145 tokens per session scan A 4249eb8910fc

Subscribe to this mod's changes

second-brain-learn is a skill published in the GitHub repository YusenZhang0601/context-canopy (2 stars, last pushed 14d ago), licensed MIT. It adds 145 tokens to every session and 2,280 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories