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-doctorgit 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-doctor)<a href="https://agentmods.dev/skills/yusenzhang0601/context-canopy/second-brain-doctor"><img src="https://agentmods.dev/badge/skills/yusenzhang0601/context-canopy/second-brain-doctor/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-doctor"><img src="https://agentmods.dev/badge/skills/yusenzhang0601/context-canopy/second-brain-doctor.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.00117 | $0.02356 |
| Opus 5 | $0.00059 | $0.01178 |
| Sonnet 5 | $0.00023 | $0.00471 |
| Haiku 4.5 | $0.00012 | $0.00236 |
Grade A, and why
second-brain-doctor 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 10d 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 — 150 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Second Brain - Doctor(检查接入、注入和同步状态)
用真实证据判断当前 Agent 是否接到了同一个“我”。默认只读:不要自动修复、写 LOG、重建派生文件、修改宿主配置、提交 Git 或更新 receipt。发现 drift 后把修复路由给 second-brain-attach 或 second-brain-sync。
显式调用
- Codex:
$second-brain-doctor,或从/skills选择。不要把字面量/second-brain-doctor报告为 Codex 原生命令。 - Claude、Hermes、AntiGravity:
/second-brain-doctor。
状态词
每项只使用:
PASS:用当前命令或内容证据证明符合 contract。DRIFT:authority 可读,但投影、版本或哈希不一致。BLOCKED:已知阻点使检查或能力不可用。UNKNOWN:没有足够证据,不猜测。NOT-APPLICABLE:当前宿主确实不使用该表面。
不要把“文件存在”提升为 PASS,也不要用旧 receipt 代替实时检查。
检查顺序
1. 识别现场
记录当前设备、宿主、版本、会话是否为 fresh session、Vault 路径和 MCP 路径。优先使用宿主官方版本/配置查询;不要输出可能含 token 的完整进程命令行或配置文件。
2. Vault authority
检查:
- 根
AGENTS.md、90-System/SCHEMA.md、ONTOLOGY.md、WORKFLOWS.md、INDEX.md可读。 90-System/.capture.lock是否存在;存在只报告,不删除。90-System/Personal-AI/COMMON-RULES.md可读且是唯一通用 owner。- 当前
90-System/Personal-AI/AGENTS/<agent-id>.md可读且保持独立角色。 03-Personal/Profile/个人AI协作体系.md与山脉 owner 可按权限最小读取。- 实时 compiler、lint 和图谱检查结果。只读 Doctor 使用
--check,不使用--write-derived。
3. 七个 Skills
以 Vault 90-System/Personal-AI/SKILLS/ 为 authority,验证七个精确 ID:
second-brain-attachsecond-brain-syncsecond-brain-learnsecond-brain-distillsecond-brain-climbsecond-brain-doctorsecond-brain-help
逐个检查 frontmatter、宿主发现状态和 authority SHA。符号链接应解析到 owner;物理副本应与记录哈希一致。少一个就不是完整接入。检查宿主显示名带 Second Brain - 和中文注释。
4. 薄 MCP
调用 MCP 初始化与工具列表,再安全调用读取工具。预期能力包括:
get_common_rulesget_agent_profileget_mountain_contextlist_second_brain_skillsread_second_brain_skill- 既有知识搜索、捕捉和条目读取能力
验证 MCP 版本、Vault root、allowlist 越界拒绝、读取内容与 authority SHA。MCP 不应成为语义裁决器,不应调用外部推理 API、持有独立数据库或启动守护进程。只握手成功但无法读取 owner 应标为 DRIFT 或 BLOCKED。
5. 活动规则质量
把 COMMON、当前 Agent profile、受影响 Skill 和项目实际注入入口作为一个活动规则集审计:
- 每项行为是否只有一个正确 owner;common、profile、Skill 与项目文件之间的同义正文应标为
DRIFT,必要的短投影不算第二 owner。 - 是否仍有被较强证据纠错、缩限、替代、迁移或退役的旧规则留在活动注入链;历史只应由 Git、LOG、receipt 或不可变来源承担。
- 是否存在只增不减的日期流水、tombstone、失效兼容正文或可无损合并的重复规则。长度只触发语义审查,不单独决定状态;除非有可验证宿主限制,不使用任意行数或字节上限判定健康。
- 最近一次 Learn/Sync 是否记录了转换类型、旧/新预期行为、同步目标,以及正向新行为和负向旧行为退出证据。
- 项目级规则是否进入该项目真正自动加载的
AGENTS.md、CLAUDE.md、GEMINI.md或既有受管投影;只写 canonical、MCP 可读或自然语言指针不能证明项目行为已注入。
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.
- 10d ago First seen · 150 lines · 117 tokens per session scan A a4a0d361eb17
second-brain-doctor is a skill published in the GitHub repository YusenZhang0601/context-canopy (2 stars, last pushed 18d ago), licensed MIT. It adds 117 tokens to every session and 2,356 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.