Answer questions by searching the compiled Obsidian wiki. Use this skill when the user asks a question about their knowledge base, wants to find information across their wiki, asks "what do I know about X", "find everything related to Y", or wants synthesized answers with citations from their wiki pages. Also use when the user wants to explore connections between topics in their wiki. Works from any project. Includes an index-only fast mode triggered by "quick answer", "just scan", "don't read the pages", "fast lookup" — returns answers from page summaries and frontmatter without reading page bodies.
You are answering questions against a compiled Obsidian wiki, not raw source documents. The wiki contains pre-synthesized, cross-referenced knowledge.
~/.obsidian-wiki/config to get OBSIDIAN_VAULT_PATH (works from any project). Fall back to .env if you're inside the obsidian-wiki repo.$OBSIDIAN_VAULT_PATH/index.md to understand the wiki's scope and structureBy default, all pages are returned regardless of visibility tags. This preserves existing behavior — nothing changes unless the user asks for it.
If the user's query includes phrases like "public only", "user-facing", "no internal content", "as a user would see it", or "exclude internal", activate filtered mode:
{visibility/internal, visibility/pii}Pages with no visibility/ tag, or tagged visibility/public, are always included.
In filtered mode, note the filter in the Step 6 log entry: mode=filtered.
Follow the Retrieval Primitives table in llm-wiki/SKILL.md. Reading is the dominant cost of this skill — use the cheapest primitive that answers the question and escalate only when it can't. Never jump straight to full-page reads.
Classify the query type:
Also decide the mode:
index.md only.Build a candidate set without opening any page bodies:
index.md above — use it as the first filter. It lists every page with a one-line description and tags.Grep to scan page frontmatter only for title, tag, alias, and summary matches. A pattern like ^(title|tags|aliases|summary): scoped to vault .md files is far cheaper than content grep.index.md entry contains the query termIf you're in index-only mode, stop here. Answer from summary: fields, titles, and index.md descriptions only. Label the answer clearly: "(index-only answer — page bodies not read; facts below are from page summaries and may miss nuance)". Then skip to Step 5.
QMD_WIKI_COLLECTION in .env)GUARD: If $QMD_WIKI_COLLECTION is empty or unset, skip this entire step and proceed to Step 3.
No QMD? Skip to Step 3 and use
Grepdirectly on the vault. QMD is faster and concept-aware but the grep path is fully functional. See.env.examplefor setup.
If QMD_WIKI_COLLECTION is set and the index pass didn't produce clear candidates — or the question requires semantic matching rather than exact terms — use QMD before reaching for Grep:
mcp__qmd__query:
collection: <QMD_WIKI_COLLECTION> # e.g. "knowledge-base-wiki"
intent: <the user's question>
searches:
- type: lex # keyword match — good for exact names, file paths, error messages
query: <key terms>
- type: vec # semantic match — good for concepts, patterns, "what is X like"
query: <question rephrased as a description>
The returned snippets act as pre-read section summaries. If they answer the question fully, skip Step 3 and go straight to Step 4 (reading only the pages QMD ranked highest). If not, use the ranked file list to guide which files to grep or read in Step 3.
Also search papers when the question may have source material in _raw/:
If QMD_PAPERS_COLLECTION is set and the user is asking about a topic likely covered by ingested papers (research, theory, background), run a parallel search against the papers collection. Cite raw sources separately from compiled wiki pages in your answer.
For each of the top candidates, pull the relevant section without reading the whole page:
Grep -A 10 -B 2 "<query-term>" <candidate-file> to get just the lines around the match.Only when Steps 2 and 3 don't answer the question:
Read the top 3 candidates in full.[[wikilinks]] from those pages if the answer requires cross-references.Compose your answer from wiki content:
[[page-name]] notationAppend to log.md:
- [TIMESTAMP] QUERY query="the user's question" result_pages=N mode=normal|index_only|filtered escalated=true|false
Structure answers like this:
Based on the wiki:
[Your synthesized answer with [[wikilinks]] to source pages]
Pages consulted: [[page-a]], [[page-b]], [[page-c]]
Gaps: [What the wiki doesn't cover that might be relevant]