Borrowing it
Nothing to install: this file belongs to nekottyo/obsidian-knowledge-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/nekottyo/obsidian-knowledge-mcp/main/CLAUDE.mdgit clone --depth 1 https://github.com/nekottyo/obsidian-knowledge-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/nekottyo/obsidian-knowledge-mcp/claude-md)<a href="https://agentmods.dev/instructions/nekottyo/obsidian-knowledge-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/nekottyo/obsidian-knowledge-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/nekottyo/obsidian-knowledge-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/nekottyo/obsidian-knowledge-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.01905 | $0.01905 |
| Opus 5.5 | $0.00762 | $0.00762 |
| Sonnet 5.5 | $0.00381 | $0.00381 |
| Haiku 4.5 | $0.00191 | $0.00191 |
Grade A, and why
obsidian-knowledge-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 — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
コマンド
npm run build # tsc
npm test # tsc してから dist/test/*.test.js を node --test で実行
node --test dist/test/chunker.test.js # 単一ファイル (先に npm run build が必要)
node --test --test-name-pattern "containment" dist/test/*.test.js # 単一テスト
npm run check # Biome の lint + format 検査 (書き込みなし)
npm run check:fix # 検査して安全な自動修正を適用
npm run format # format のみ適用
npm run lint # lint のみ
テストは src/ ではなく dist/ のビルド出力を実行する。npm test は毎回 tsc を挟むが、node --test を直接叩くときはビルドが古いままにならないよう注意する。
lint / format は Biome (biome.json) に集約している。vcs.useIgnoreFile を有効にしてあるので対象範囲は .gitignore に従う (dist/ と node_modules/ は自動で外れる)。check:fix で消えない指摘には --unsafe でしか直せないものが混ざる。当てるなら npx biome check --write --unsafe の後に必ず npm test まで通すこと。
動作確認とデータ投入には VAULT_ROOT / KNOWLEDGE_DIR と起動済みの ollama が要る (環境変数の一覧は README.md)。
VAULT_ROOT=/path/to/vault KNOWLEDGE_DIR=knowledge npm run dev-search -- "クエリ" --top-k 5
VAULT_ROOT=/path/to/vault KNOWLEDGE_DIR=knowledge npm run eval
アーキテクチャ
エントリポイントは 3 つ (src/index.ts の MCP サーバー、src/dev-search.ts の CLI、eval/run-eval.ts) あるが、いずれも src/search.ts の searchKnowledge() を共有する。検索ロジックを変えるときはこの 1 箇所を見ればよい。
searchKnowledge() は冒頭で必ず syncIndex() を呼ぶ。これが「検索した瞬間に必ず最新」を担保する設計の中核であり、インデックス更新は独立したバックグラウンド処理ではなく検索パスに埋め込まれている。同期は mtime/size の突合なので、変化が無ければ stat のコストしかかからない。
データの流れは chunker.ts (markdown → チャンク + frontmatter) → ollama.ts (チャンク → embedding) → store.ts (sqlite へ投入) の一方向。indexer.ts がこの 3 つを束ねてファイル走査と差分検知を担う。
変更時に壊しやすい結合
embedding 次元 — ollama.ts の EMBEDDING_DIM (1024) が store.ts の vec0 テーブル定義に文字列展開されている。EMBED_MODEL を次元の違うモデルへ変えるなら、この定数と既存 DB の両方を作り直す必要がある。次元不一致は投入時ではなく embedBatch() の検証で先に落ちる。
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 First seen · 71 lines · 1,905 tokens per session scan A b2b9aeabc367
obsidian-knowledge-mcp CLAUDE.md is an instructions file published in the GitHub repository nekottyo/obsidian-knowledge-mcp (0 stars, last pushed 9d ago), licensed MIT. It adds 1,905 tokens to every session, about $0.0076 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.
obsidian-knowledge-mcp CLAUDE.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| obsidian-knowledge-mcp CLAUDE.mdnekottyo/obsidian-knowledge-mcp | Instructions file | 0 | 9d ago | MIT | A | 1,905 | 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 |