qmd
What it does
This skill teaches an agent how to search a personal notes vault with QMD, a semantic search tool. It is for finding past decisions, meetings, and people without reading every file.
When to use it
- βWhen a user asks about a past decision, incident, meeting, or person recorded in their notes.
- βWhen an agent needs to find relevant notes before reading whole files.
- βWhen a user asks what their vault says about a topic.
Skill link
https://github.com/breferrari/obsidian-mind/blob/main/.claude/skills/qmd/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βWhat did we decide last quarter about the pricing change? Search my vault for it.β
5 new skills a week. 1 minute to read.
How it works
The agent uses the QMD search tools first when they are available, then the command line version, and reads files directly only as a last resort. It returns relevant snippets without reading whole files.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
QMD β Vault Semantic Search
Before reading vault files directly, search with QMD first. It returns relevant snippets without burning context on full file reads.
Tool Surfaces β Preference Order
Pick the highest surface available and stop. All three read the same SQLite store (see Named Index), so they return the same results; the choice is about interface ergonomics and context cost.
- MCP tools (preferred when registered) β
mcp__qmd__query,mcp__qmd__get,mcp__qmd__multi_get,mcp__qmd__status. If these appear in your tool menu, the MCP server is live and pre-scoped to this vault. Call them directly β no--indexargument needed, no shell involved, typed arguments. This is the intended path during a session. - CLI fallback β
qmd --index <name> query|search|vsearch|get|multi-get. Use when the MCP server isn't registered (older vault clones, Windows install drift, disabled in.mcp.json), or for one-off shell checks outside a session. Always pass--index <name>. - Grep / Glob / Read β last resort, only when QMD is not installed at all. These burn context on full file reads and don't rank by relevance.
Never fall through surfaces without cause β if MCP is registered, calling the CLI in a Bash tool is just a slower path to the same result.
Named Index (This Vault)
This vault uses a named QMD index so queries, updates, and context strings stay scoped to this vault β not blended with any other vault that shares the machine. Every QMD command in this document passes --index <name>.
The name resolves the same way on all three surfaces (CLI, MCP, SessionStart hook), so they always point at the same SQLite store:
qmd_indexinvault-manifest.json, when set β an explicit pin.- Otherwise the vault folder name, slugified. The template ships
qmd_indexempty so every install gets its own store without being asked a question.
Pin the field if you want a name that survives renaming the vault folder, or want to keep a store you already built.
Read the resolved name before running commands rather than assuming either branch:
INDEX=$(node -e '
const ok = (s) => typeof s === "string" && /^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(s);
const m = JSON.parse(require("fs").readFileSync("vault-manifest.json", "utf8"));
if (m.qmd_index && !ok(m.qmd_index)) {
process.stderr.write("qmd_index is set to an invalid name: " + JSON.stringify(m.qmd_index) + "\n");
process.exit(1);
}
const slug = require("path").basename(process.cwd()).normalize("NFKD").toLowerCase()
.replace(/[^a-z0-9._-]+/g, "-").replace(/-{2,}/g, "-").replace(/^[^a-z0-9]+|[-._]+$/g, "");
const name = [m.qmd_index, slug, m.template].find(ok);
if (!name) { process.stderr.write("no usable qmd index name β set qmd_index in vault-manifest.json\n"); process.exit(1); }
process.stdout.write(name);
') || exit 1
qmd --index "$INDEX" query "..."
The value is used as both a CLI argument and a filesystem path (~/.cache/qmd/<name>.sqlite), so an invalid pin must fail here rather than propagate β hence the explicit check instead of m.qmd_index || slug.
In-session, substitute the resolved value directly in your commands β it is stable across the vault's lifetime unless the folder is renamed.
Commands
Each operation lists the MCP call first, then the CLI equivalent. Prefer MCP when available.
Search (pick one per query)
- Hybrid (best quality) β
mcp__qmd__querywithsearches=[{type:"lex", query:"..."}, {type:"vec", query:"..."}]and anintentarg. CLI:qmd --index <name> query "..." --json -n 10. Use for complex or conceptual queries. - Keyword (fast BM25) β
mcp__qmd__querywithsearches=[{type:"lex", query:"..."}]. CLI:qmd --index <name> search "..." --json -n 10. Use for exact terms, names, ticket numbers, dates. - Semantic only β
mcp__qmd__querywithsearches=[{type:"vec", query:"..."}]. CLI:qmd --index <name> vsearch "..." --json -n 5. Use for exploratory queries where you don't know the exact words.
Retrieve
- By path β
mcp__qmd__getwithpatharg. CLI:qmd --index <name> get "path/to/file.md". - By docid β
mcp__qmd__getwith#abc123syntax. CLI:qmd --index <name> get "#docid". - Batch by glob β
mcp__qmd__multi_getwithpatternarg. CLI:qmd --index <name> multi-get "org/people/*.md" --json -l 40.
Index Management (CLI only β MCP exposes read surfaces)
- `qmd --index <name> up
FAQ
Why search before reading files?
The skill says search returns relevant snippets without using context on full file reads.
What if QMD is not installed?
The skill says to fall back to file search tools, which are slower and do not rank by relevance.
Which tool order does it prefer?
The QMD tools first, then the command line, then grep, glob, and read.
Details
Original description by the author
Search the vault using QMD semantic search. Use PROACTIVELY before reading files. Preference order: (1) MCP tools β mcp__qmd__query, mcp__qmd__get, mcp__qmd__multi_get, mcp__qmd__status β if they appear in your tool menu, use them first; (2) CLI `qmd --index <name> ...` as fallback; (3) Grep/Glob only when QMD is not installed. Trigger proactively for past decisions, incidents, people, meetings, architecture, patterns, or any vault content β and after creating/editing notes to check for duplicates and related content.
repo: breferrari/obsidian-mind
Popularity
- GitHub stars
- 5.5k
- Ranking position
- #14842
- License
- MIT
- Updated
- 10/17/2026
Comments
- β¦
More skills from this repository
excalidraw-diagram
5.5kHelps your agent turn text into Excalidraw diagrams, saved as Obsidian notes, standard Excalidraw files, or animated versions.
mermaid-visualizer
5.5kHelps your agent turn text into clean Mermaid diagrams, such as flowcharts, architectures, and comparisons, that display in Obsidian and GitHub.
Similar skills
graincrawl
394kLets your agent search your saved Granola meeting notes and transcripts, check how fresh they are, and count them over a period.
notcrawl
394kLets your agent search a saved copy of your Notion workspace, look up pages and databases, and export pages to Markdown files.
knowledge-entities
394kHelps your agent identify people, companies, and projects, then write sourced profile pages for them in your Knowledge vault.