obsidian-llm-wiki: Command for Claude Code

.claude/commands/search-vault.md

search-vault is a command for Claude Code from mickeytony0215-png/obsidian-llm-wiki. It costs 32 tokens per session (1,820 once invoked), scanned A, original, MIT.

A read-only search tool for a knowledge vault, such as a collection of Markdown notes. It can search note text and metadata, follow links between notes, find unlinked notes, show vault statistics, and optionally search by meaning.

In plain words
What is it for?
Use it to find notes by tags or other metadata, locate papers and concepts, see which notes link to a page, find orphaned notes, search full text, review vault statistics, or find related ideas when the wording differs.
Why use it?
It removes the need to remember exact words or manually inspect every note and link. Because it is read-only, searching does not change the vault.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is mickeytony0215-png/obsidian-llm-wiki's own configuration. It tells Claude Code how to work on obsidian-llm-wiki itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything obsidian-llm-wiki configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python .claude/scripts/search_vault.py structured --status reviewed_with_notes.

Reuse

Borrowing it

Nothing to install: this file belongs to mickeytony0215-png/obsidian-llm-wiki. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/mickeytony0215-png/obsidian-llm-wiki/main/.claude/commands/search-vault.md
Clone the repo
git clone --depth 1 https://github.com/mickeytony0215-png/obsidian-llm-wiki

Made for: Claude Code.

Wrote 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.

agentmods badge for search-vault

README.md
[![agentmods](https://agentmods.dev/badge/commands/mickeytony0215-png/obsidian-llm-wiki/search-vault/github.svg)](https://agentmods.dev/commands/mickeytony0215-png/obsidian-llm-wiki/search-vault)
Your own site
<a href="https://agentmods.dev/commands/mickeytony0215-png/obsidian-llm-wiki/search-vault"><img src="https://agentmods.dev/badge/commands/mickeytony0215-png/obsidian-llm-wiki/search-vault/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.

agentmods 80×15 button for search-vault

Your own site · 80×15
<a href="https://agentmods.dev/commands/mickeytony0215-png/obsidian-llm-wiki/search-vault"><img src="https://agentmods.dev/badge/commands/mickeytony0215-png/obsidian-llm-wiki/search-vault.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,820 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00032 $0.01820
Opus 5 $0.00016 $0.00910
Sonnet 5 $0.00006 $0.00364
Haiku 4.5 $0.00003 $0.00182

Measured 12d ago against content hash 30723d840526, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

search-vault 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 12d 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.

.claude/commands/search-vault.md · 210 lines

How it starts

The opening of the file, as written. The whole thing — 210 lines — stays where its author put it; the contents beside it link to each section on GitHub.

A read-only query layer for the vault. Six modes covering frontmatter filters, full-text grep, link-graph analysis, and optional semantic search. Never modifies files.

This repo ships the command spec only. The Python backend is intentionally not bundled. Fork users either reimplement .claude/scripts/search_vault.py following this spec, or replace the six modes with their preferred tooling (Obsidian Dataview queries, shell scripts, etc.). The command file below describes the intended interface and behaviour.

Use cases

  • Find papers matching a metadata filter (e.g. reviewed_with_notes, 2024, a specific tag).
  • Find inbound references to a given page (who cites this concept or paper?).
  • Find orphan pages with zero inbound wikilinks — complements /lint-wiki.
  • Full-text search (ripgrep) with structured markdown output.
  • Vault statistics: review-status distribution, year histogram, tag frequency.
  • Semantic search when the exact wording is unknown — finds concept-level matches via BM25 + vector + LLM rerank (requires qmd).

Architecture

/search-vault
      |
      v
  .claude/scripts/search_vault.py         <- fork users implement this
      |
      +- structured   -> frontmatter parser (stdlib only)
      +- content      -> ripgrep (fallback: Python regex)
      +- orphan       -> scan all [[wikilinks]], build link graph
      +- inbound      -> backlinks for a target page
      +- stats        -> frontmatter aggregations
      +- semantic     -> qmd CLI (optional external dependency)

Usage

1. Structured query (frontmatter filters)

python .claude/scripts/search_vault.py structured --status reviewed_with_notes
python .claude/scripts/search_vault.py structured --tag <domain-tag> --year 2024
python .claude/scripts/search_vault.py structured --type ppt-draft

Common flag combinations:

  • --status disputed — list every paper flagged as disputed
  • --status unreviewed — the pending-review queue
  • --tag <concept> — same-topic papers
  • --year 2025 — this year's papers

Read the full file on GitHub · 210 lines

Changes

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.

  1. 12d ago First seen · 210 lines · 32 tokens per session scan A 30723d840526

Subscribe to this mod's changes

search-vault is a command published in the GitHub repository mickeytony0215-png/obsidian-llm-wiki (2 stars, last pushed 2mo ago), licensed MIT. It adds 32 tokens to every session and 1,820 once invoked, about $0.0002 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.