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 instructions/ddmanyes/second-brain-mcp/claude-mdgit clone --depth 1 https://github.com/ddmanyes/second-brain-mcpWrote 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/instructions/ddmanyes/second-brain-mcp/claude-md)<a href="https://agentmods.dev/instructions/ddmanyes/second-brain-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/ddmanyes/second-brain-mcp/claude-md.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.01164 | $0.01164 |
| Opus 5 | $0.00582 | $0.00582 |
| Sonnet 5 | $0.00233 | $0.00233 |
| Haiku 4.5 | $0.00116 | $0.00116 |
Grade A, and why
second-brain-mcp CLAUDE.md 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 yesterday.
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 — 50 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Second Brain MCP Server
本地 Claude Code:操作 SOP 見 AGENTS.md,vault 目錄結構與工具清單在同一文件。 遠端 MCP 連入:呼叫
get_agent_instructions()工具可取得 AGENTS.md 完整內容。 CLAUDE.md 位置:second-brain/CLAUDE.md(由 Claude Code 在此目錄啟動時自動載入)。
執行(開發)
uv run --with "mcp[cli]" --with "markitdown[all]" python -m mcp_second_brain
部署(改完碼要做的事)
⚠️ 線上服務跑的是「安裝好的 wheel」,不是這個 checkout(lcdda-start-remote.sh 明寫
"The live service imports the installed wheel")。只改 repo + 重啟服務不會生效:
~/.venvs/second-brain/bin/pip install --force-reinstall --no-deps ~/git-repos/second-brain
launchctl kickstart -k gui/501/com.user.second-brain-remote
launchctl kickstart -k gui/501/com.user.lcdda-remote
- 三個 server(sb
:9100/ lcdda:9104/ lcdda-harvest:9106)共用同一個 venv, 一次pip install全部改到——要嘛全部重啟,要嘛新舊碼並存。 AGENTS.md也是 wheel 的一部分(pyproject.toml的force-include),所以改手冊 同樣要重新打包才會送到遠端 agent。tests/test_wheel_packaging.py會驗產物內容。- 這個落差曾讓
get_agent_instructions()靜默回傳 placeholder 數個月都沒被發現, 見 CHANGELOG「wheel never packaged AGENTS.md」。
架構(中央活腦)
- Index backend 可插拔:
store/,由SB_DB_BACKEND選postgres(中央,pgvector+pg_trgm,多機並發)或duckdb(預設/離線 fallback)。markdown 是正本,index 可由sync_all重建。 - 正式拓樸:單一中央 HTTP server(launchd
com.user.second-brain-remote,streamable-http綁 Tailscale IP:9100,SB_DB_BACKEND=postgres)+ Docker Postgres(sb-pg,僅127.0.0.1:5432)。 - 連線:client 走
http://<tailscale-ip>:9100/mcp,帶 headerX-API-Key(server 設SB_API_KEY/SB_API_KEYS時強制)。Postgres 永不對外,只 server 同機 localhost 連。 - 排程:
second-brain-pg-sync(StartCalendarInterval每逢:00、:30incremental,防脫節)、second-brain-pg-backup(每日 pg_dump)。 - 寫入紀律:所有寫入經中央 server(單一寫者);client 端 Obsidian 唯讀,避免 Drive 衝突副本。
- 測試:Postgres 測試對
sb_test(fixture 會DELETE全表,絕不可指向sb_personal/sb_lab,test_postgres_store.py有硬 guard)。 - 詳見 MIGRATION_PLAN_POSTGRES.md 與 AGENTS.md 的 Connection Topology 段。
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.
- yesterday Changed · +18 lines · +326 tokens per session 94d22d3ded61
- 5d ago First seen · 32 lines · 838 tokens per session scan A b7f11ca3695c
second-brain-mcp CLAUDE.md is an instructions file published in the GitHub repository ddmanyes/second-brain-mcp (3 stars, last pushed yesterday), licensed MIT. It adds 1,164 tokens to every session, about $0.0058 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 instructions, from other repositories
aeon CLAUDE.md
Claude Code instructions for aeonfun/aeon, covering aeon, how aeon works, strategy, voice and soul file hierarchy (read in this order).
cognirepo CLAUDE.md
Claude Code instructions for ashlesh-t/cognirepo, covering claude.md, key rules, session start sequence (run in this order), behavioral confirmation rule and personas (cognirepo-402, cognirepo-403).
wayland-core copilot-instructions.md
Copilot instructions for FerroxLabs/wayland-core, covering ijfw rules, output discipline, memory routing, context discipline and cross-audit.
mcp-structured-memory CLAUDE.md
Claude Code instructions for nmeierpolys/mcp-structured-memory, a project described as: Structured Memory MCP Server.
inkwell-memory CLAUDE.md
Instructions for veronchenko/inkwell-memory, covering claude.md — inkwellmemory, layout, multi-tenant mode (inkwellmultitenant=1), conventions and testing.
RNR-Enhanced-Cognee AGENTS.md
AGENTS.md instructions for vincentspereira/RNR-Enhanced-Cognee, covering rnr enhanced cognee implementation for codex, critical requirements, 1. ascii-only output (no unicode encoding), 2. dynamic categories (no hardcoded categories) and 3. standard memory mcp interface.