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 skills add YusenZhang0601/context-canopy --skill second-brain-distillgit clone --depth 1 https://github.com/YusenZhang0601/context-canopyWrote 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.
[](https://agentmods.dev/skills/yusenzhang0601/context-canopy/second-brain-distill)<a href="https://agentmods.dev/skills/yusenzhang0601/context-canopy/second-brain-distill"><img src="https://agentmods.dev/badge/skills/yusenzhang0601/context-canopy/second-brain-distill/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/yusenzhang0601/context-canopy/second-brain-distill"><img src="https://agentmods.dev/badge/skills/yusenzhang0601/context-canopy/second-brain-distill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00123 | $0.02101 |
| Opus 5 | $0.00062 | $0.01051 |
| Sonnet 5 | $0.00025 | $0.00420 |
| Haiku 4.5 | $0.00012 | $0.00210 |
Grade A, and why
second-brain-distill 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 9d 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.
How it starts
The opening of the file, as written. The whole thing — 122 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Second Brain - Distill(榨取历史对话并清理原始数据)
把历史对话当作一次性矿石:完整榨取可复用信息,验证沉淀物和附件后,才处理用户明确授权的原始批次。SkillOpt 只贡献“从历史 Agent 轨迹中挖掘改进”的理念;不要运行它的程序、Sleep 循环、评分数据库、外部推理 API 或自动优化器。
显式调用
- Codex:
$second-brain-distill,或从/skills选择。 - Claude、Hermes、AntiGravity:
/second-brain-distill。
硬边界
以下对象不进入本 Skill 的处理批次,也不得借本 Skill 删除:
- 当前仍在活动的会话、当前会话本身及任何正在写入的会话数据库。
- replay、evaluator、grader、optimizer、learning-loop、benchmark 或测试派生对话。
- 无法稳定识别父子关系、导出完整性或附件归属的会话。
- 含未识别凭据、权限或受监管数据,且尚无安全处置方案的会话。
原始对话和导出包不得提交到任何 Git remote。只有经过最小披露、去秘密、可审计的长期 owner 与 receipt 才能进入本地 authority 历史;private-remote 可再提交到私有 Vault 仓库,公开 Release remote 永远不得接收个人数据。
删除授权
删除必须有精确 allowlist。一个合规条目至少含:平台、稳定 conversation ID 或绝对路径、内容 SHA-256、附件清单、快照时间和用户授权来源。
- 用户明确指定批次并要求“完整榨取后删除”时,这一授权覆盖门禁通过后的 allowlist 条目,不必形式主义地重复询问。
- 若只说“清理旧对话”而没有可解析范围,先输出候选清单并询问,不擅自扩大到所有历史。
- 即使已授权,任一完整性、附件、秘密、写入或恢复门禁失败,也停止该条删除;不以部分成功掩盖失败。
这里的“删除”首先指从宿主活动存储中移除,从而释放正常会话与附件占用;平台归档若仍完整保留同等存储,不算完成删除。用户明确指定批次并要求“完整榨取后删除”时,在恢复门禁通过后,该授权已经覆盖对精确 allowlist 的物理删除,不必再次逐条询问;平台或文件系统支持系统废纸篓、可恢复删除时优先使用。只有用户只说“归档/整理”而没有要求删除,或产品只提供不可恢复删除且当前授权并未包含删除时,才停下确认。无论使用哪种机制,都必须如实报告活动存储是否释放、数据是否仍可恢复以及恢复位置。
完整榨取流程
1. 冻结批次
- 用平台导出、官方 CLI 或本地只读数据库快照获取原始内容;不要在活动数据库上边读边删。
- 建 manifest:每个父会话、子会话、消息数、时间范围、附件、字节数和 SHA-256。
- 按 durable value 分类:高价值主会话、普通工作会话、低价值噪声、派生测试会话。分类影响提炼深度,不自动产生删除权。
- 把当前活动、replay/evaluator 等禁止对象从 manifest allowlist 中剔除并记录原因。
2. 读取完整证据
不要只读标题、摘要或最后一条消息。逐会话覆盖:
- 用户原始目标、约束和后续纠正。
- Agent 的关键判断、工具调用证据和实际产物。
- 尝试过但失败的路径、失败原因与防复发条件。
- 已完成的决策、待办、未解决不确定性和外部依赖。
- 文件、图片、表格、代码、报告等附件的实际内容与版本关系。
- 子 Agent 结果与父会话如何采纳或否决它们。
3. 形成原子候选
把内容拆到最窄 owner:
- 通用偏好 → COMMON-RULES。
- Agent 分工 → 对应 profile。
- 可复用流程 → 对应 Second Brain Skill 或项目 Skill。
- 客观知识、洞见、个人事实 → canonical。
- 项目决策和失败教训 → 项目 authority。
- 长期目标的进展、证据或路线变化 → mountain。
- 仅有历史价值但不进入主图谱 → 日期化来源或审计 receipt。
- 无持久价值 → 明确
discarded-as-noise。
每个候选保留来源 conversation ID、消息定位或导出偏移、证据强度、隐私级别和目标 owner。查重后优先更新既有 owner;禁止“一次会话一张大卡”。
4. 处理附件
删除原始会话前逐个附件裁决:
- 唯一且有长期价值:先晋升到所属项目 Inbox/权威来源层,保留原文件名、SHA、来源会话和字节级验证。
- 已有相同权威副本:用 SHA 证明完全重复,receipt 指向现有 owner。
- 可再生临时产物:记录生成依据和丢弃理由。
- 未知或无法读取:阻断该会话删除,不猜测。
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.
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.
- 9d ago First seen · 122 lines · 123 tokens per session scan A ab497fa88b4e
second-brain-distill is a skill published in the GitHub repository YusenZhang0601/context-canopy (2 stars, last pushed 17d ago), licensed MIT. It adds 123 tokens to every session and 2,101 once invoked, about $0.0006 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.
Other skills, from other repositories
ori-memory
Persistent agent memory with learning retrieval. Knowledge graph on markdown files — capture insights, decisions, research, and learnings during work, then retrieve them weeks or months later. Use when knowledge is too valuable to lose but too much to inject into every prompt.
hipocampus-compaction
Build 5-level compaction tree (daily/weekly/monthly/root) with smart thresholds and fixed/tentative lifecycle. Run at session start when triggers are met, or via external scheduler.
hipocampus-core
3-tier agent memory system with 5-level compaction tree. Codex CLI version. Defines session start protocol, end-of-task checkpoints, and memory file management. MUST be followed every session.
hipocampus-search
Search memory using qmd (BM25 + optional vector) and compaction tree traversal. Use ROOT.md to decide whether to search memory or look externally. Always check memory before external lookups.
hipocampus-recall
Memory recall guide. Structured retrieval from hipocampus memory — ROOT.md triage, manifest-based LLM selection, qmd search fallback.
hipocampus-flush
Manual memory flush: dump current session context to daily raw log via subagent. Invoke with /hipocampus:flush. Run hipocampus:compaction afterwards for tree propagation and qmd reindex.