Borrowing it
Nothing to install: this file belongs to ddmanyes/second-brain-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/ddmanyes/second-brain-mcp/master/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/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/instructions/ddmanyes/second-brain-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/ddmanyes/second-brain-mcp/claude-md.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.01164 | $0.01164 |
| Opus 5.5 | $0.00466 | $0.00466 |
| Sonnet 5.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 2mo 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 — 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.
- 2mo ago Changed · +18 lines · +326 tokens per session 94d22d3ded61
- 2mo 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 (6 stars, last pushed 1mo ago), licensed MIT. It adds 1,164 tokens to every session, about $0.0047 per session on Opus 5.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.
second-brain-mcp CLAUDE.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| second-brain-mcp CLAUDE.mdddmanyes/second-brain-mcp | Instructions file | 6 | 1mo ago | MIT | A | 1,164 | Claude Code |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |