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/yusenzhang0601/context-canopy/second-brain-attachnpx skills add YusenZhang0601/context-canopy --skill second-brain-attachgit 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-attach)<a href="https://agentmods.dev/skills/yusenzhang0601/context-canopy/second-brain-attach"><img src="https://agentmods.dev/badge/skills/yusenzhang0601/context-canopy/second-brain-attach.svg" alt="Measured on agentmods" 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.00111 | $0.01986 |
| Opus 5 | $0.00056 | $0.00993 |
| Sonnet 5 | $0.00022 | $0.00397 |
| Haiku 4.5 | $0.00011 | $0.00199 |
Grade A, and why
second-brain-attach 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.
How it starts
The opening of the file, as written. The whole thing — 123 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Second Brain - Attach(接入并注入新 Agent)
把一个陌生 Agent 接到同一个个人 AI 基底上。你负责执行宿主原生操作、留下证据并自检;本 Skill 只固化流程,不启动安装服务,不引入数据库、守护进程、外部推理 API 或规则编译器。
显式调用
- Codex:使用
$second-brain-attach;也可通过/skills选择本 Skill。不要声称 Codex 原生支持字面量/second-brain-attach。 - Claude、Hermes、AntiGravity:使用
/second-brain-attach。 - 其他宿主:使用其原生 Skill 选择器,并报告真实调用方式。
Authority
优先通过 MCP 的 get_common_rules、get_agent_profile、list_second_brain_skills 和 read_second_brain_skill 读取;MCP 尚未接通时,从本地 Vault 读取:
90-System/Personal-AI/COMMON-RULES.md:跨 Agent 通用规则唯一 owner。90-System/Personal-AI/AGENTS/<agent-id>.md:该 Agent 的角色、能力边界和差异化配置唯一 owner。03-Personal/Profile/个人AI协作体系.md:用户与 AI 的长期协作身份。90-System/Personal-AI/SKILLS/:七个规范 Skill 的唯一 owner。- 根
AGENTS.md:Vault 写入边界、门禁与指令层级。
宿主配置只是投影,缓存或宿主记忆只是候选,不得反向冒充 authority。更高优先级指令与用户当前明确要求始终优先。
输入与停止条件
确认或可靠发现以下信息:目标宿主、目标设备、Vault 本地路径、MCP 源码路径、宿主 Skill 目录和身份文件。只有会 materially 改变权限、隐私或账号的未知项才询问用户。
遇到以下情况立即停止写入并报告证据:
- Vault 的
90-System/.capture.lock已存在。 - 已选择远端写入,但 Git/GitHub 写身份无法证明为用户授权账号。
- 将要覆盖不属于 Second Brain 管理块的宿主规则。
- 配置中出现 token、密码、私钥或恢复凭据,且操作会复制、打印或提交它们。
- 安装需要修改代理/TUN、系统保护或第三方账号权限,但本次未获明确授权。
接入流程
1. 发现而不是假定
- 识别宿主和版本,读取其真实 Skill、全局规则与 MCP 配置机制。
- 搜索现有 Second Brain Skill、MCP 和身份投影,区分“首次安装”“修复”“升级”。
- 优先复用宿主原生注册机制。不要改造 Agent、fork Agent 或修改其 vendor 源码。
- 区分公开分发仓库与个人 authority。公开 Release clone 只能作为模板或只读
upstream,不得接收个人画像、历史、规则或山脉的 push。 - 在写入个人信息前确认 authority 模式:
local-only不做任何远端写入;private-remote使用用户自己控制且已验证为 private 的唯一origin。创建私有仓库或改变远端需要用户授权;未获授权时保留 local-only,不把远端缺失伪装成跨设备同步已完成。
2. 建立可恢复基线
- 检查 Vault lock,并运行根
AGENTS.md规定的只读 compiler 基线。 - 对将修改的宿主配置逐文件备份到 Vault 外,保持原权限;只记录路径、大小和 SHA-256,不记录秘密值。
- 检查 Git 工作树、当前分支、远端、authority 模式和认证身份。不要在脏工作树里吞掉用户变化,也不要把公开分发
origin当成个人 authority remote。
3. 注册七个 Skills
使宿主发现以下规范 Skill,名称不可改写:
second-brain-attachsecond-brain-syncsecond-brain-learnsecond-brain-distillsecond-brain-climbsecond-brain-doctorsecond-brain-help
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.
- 6d ago First seen · 123 lines · 111 tokens per session scan A e2228f9f6169
second-brain-attach is a skill published in the GitHub repository YusenZhang0601/context-canopy (2 stars, last pushed 14d ago), licensed MIT. It adds 111 tokens to every session and 1,986 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.