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 | $0.00953 | $0.00953 |
| Sonnet 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 8d 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.
- 8d 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 1mo ago), licensed MIT. It adds 1,905 tokens to every session, about $0.0095 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
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
deepseek-harness AGENTS.md
AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.