wiki-query
Skill3.7k starsChanged 8 days agoMITView on GitHub
Search and synthesize answers from the compiled Obsidian wiki, including cited and multi-hop answers. Use for questions about existing wiki knowledge or fast index-only lookups, and for challenge requests ("challenge this", "argue against X", "poke holes in my plan") that look for the vault's own evidence against a plan. Supports named-vault routing such as wiki-query @work; not for ingesting new sources.
- Reads credentials
41 other projects use a version of this, 3 of them edited.
Adopted by
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Most recently taken up by
- barakgut/llm-wikitheir own version, first seen Nov 1, 2026
- chobizzy/llm-wikiedited, first seen Nov 1, 2026
- wareagledusty/wiki-federation-starter-kittheir own version, first seen Nov 1, 2026
- ProduktEntdecker/enterprise-memory-startertheir own version, first seen Nov 1, 2026
- hmjBill/skillstheir own version, first seen Oct 29, 2026
- AgriciDaniel/claude-obsidiantheir own version, first seen Oct 25, 2026
Who's talking about Ar9av/obsidian-wiki
- @ar9av.bsky.social“github.com/Ar9av/obsidi...”Bluesky · Oct 8, 2026 · 1 likes
- @pythonhub.dev“obsidian-wiki Framework for AI agents to build and maintain a digital brain through Obsidian wiki using …”Bluesky · Jun 23, 2026 · 1 likes
- sudosubin/agents.nix“claude-code-marketplaces.github.ar9av.obsidian-wiki: 2026.10.4 → 2026.11.2”GitHub · Nov 4, 2026
- sudosubin/agents.nix“claude-code-plugins.github.ar9av.obsidian-wiki: 2026.10.4 → 2026.11.2”GitHub · Nov 4, 2026
- sudosubin/agents.nix“agent-skills.github.ar9av.obsidian-wiki: 2026.10.4 → 2026.11.2”GitHub · Nov 4, 2026
The biggest 5 of 27 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 27
Talked about on GitHub and Bluesky (27 times).
On GitHub · 25
- Nov 4, 2026claude-code-marketplaces.github.ar9av.obsidian-wiki: 2026.10.4 → 2026.11.2 — sudosubin/agents.nix0 reactions
- Nov 4, 2026claude-code-plugins.github.ar9av.obsidian-wiki: 2026.10.4 → 2026.11.2 — sudosubin/agents.nix0 reactions
- Nov 4, 2026agent-skills.github.ar9av.obsidian-wiki: 2026.10.4 → 2026.11.2 — sudosubin/agents.nix0 reactions
- Nov 2, 2026fix(deps): update dependency obsidian-wiki to v2026.10.4 — lkshrk/agent-stack0 reactions · 2 comments
- Nov 1, 2026chore(deps): update dependency pipx:obsidian-wiki to v2026.10.4 — lkshrk/agent-stack0 reactions · 2 comments
20 more on GitHub
- Oct 28, 2026claude-code-plugins.github.ar9av.obsidian-wiki: init at 2026.10.4 — sudosubin/agents.nix0 reactions
- Oct 28, 2026claude-code-marketplaces.github.ar9av.obsidian-wiki: init at 2026.10.4 — sudosubin/agents.nix0 reactions
- Oct 27, 2026agent-skills.github.ar9av.obsidian-wiki: 2026.10.3 → 2026.10.4 — sudosubin/agents.nix0 reactions
- Oct 21, 2026agent-skills.github.ar9av.obsidian-wiki: 2026.10.2 → 2026.10.3 — sudosubin/agents.nix0 reactions
- Oct 13, 2026agent-skills.github.ar9av.obsidian-wiki: 2026.10.1 → 2026.10.2 — sudosubin/agents.nix0 reactions
- Oct 3, 2026agent-skills.github.ar9av.obsidian-wiki: init at 2026.10.1 — sudosubin/agents.nix0 reactions
- Sep 27, 2026[Candidate] ar9av/obsidian-wiki/.skills/llm-wiki - llm-wiki — ProSkillsMD/proskills0 reactions · 2 comments
- Sep 27, 2026[Candidate] ar9av/obsidian-wiki/.skills/impl-validator - impl-validator — ProSkillsMD/proskills0 reactions · 2 comments
- Sep 27, 2026[Candidate] ar9av/obsidian-wiki/.skills/hermes-history-ingest - hermes-history-ingest — ProSkillsMD/proskills0 reactions · 2 comments
- Sep 26, 2026[Candidate] ar9av/obsidian-wiki/.skills/graph-colorize - graph-colorize — ProSkillsMD/proskills0 reactions · 2 comments
- Sep 26, 2026[Candidate] ar9av/obsidian-wiki/.skills/cross-linker - cross-linker — ProSkillsMD/proskills0 reactions · 2 comments
- Sep 26, 2026[Candidate] ar9av/obsidian-wiki/.skills/copilot-history-ingest - copilot-history-ingest — ProSkillsMD/proskills0 reactions · 2 comments
- Sep 26, 2026[Candidate] ar9av/obsidian-wiki/.skills/codex-history-ingest - codex-history-ingest — ProSkillsMD/proskills0 reactions · 2 comments
- Sep 26, 2026[Candidate] ar9av/obsidian-wiki/.skills/code-understand - code-understand — ProSkillsMD/proskills0 reactions · 2 comments
- Sep 26, 2026[Candidate] ar9av/obsidian-wiki/.skills/claude-history-ingest - claude-history-ingest — ProSkillsMD/proskills0 reactions · 1 comment
- Jul 12, 2026Add obsidian-wiki as a local workspace — aristoapp/awesome-second-brain0 reactions
- Jun 20, 2026feat: Obsidian-compatible wiki.md output from compiled graph — manhhailua/lorekeep0 reactions · 1 comment
- Jun 15, 2026Daily tribute 2026-06-15: obsidian-wiki by @_ar9av — Talonsturgill/signalsniper0 reactions
- May 15, 2026Tracking: AI workflow patterns & companion plugins — brenthaertlein/universal-skills0 reactions · 1 comment
- Apr 9, 2026wiki 生成质量提高 — nashsu/llm_wiki0 reactions · 2 comments
On Bluesky · 2
- Oct 8, 2026github.com/Ar9av/obsidi... — @ar9av.bsky.social1 likes and repost
- Jun 23, 2026obsidian-wiki Framework for AI agents to build and maintain a digital brain through Obsidian wiki using Karpathy's LLM Wiki pattern.… — @pythonhub.dev1 likes and repost · 1 reply
Used with
Projects with it also use wiki-init, wiki-review and 1 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
bozhouDevSkillwiki-init
Use when bootstrapping a new personal wiki for any knowledge domain — research, codebase documentation, reading notes, competitive analysis, or any long-term knowledge accumulation project.
Also in 7 projects that use this
justvinhhereSkillwiki-review
Use when the user runs /review, says "show pending changes", "what's uncommitted", or wants an audit of uncommitted wiki edits before they land in history. Narrates uncommitted changes, flags structural issues scoped to those changes, and commits them with a conventional subject. Fully automatic.
Also in 8 projects that use this
nathanadaySkillalmagest
Orient in the Almagest vault, say what waits for the user, do the work a request asks in a linked repository, and route any other request to the skill that owns it. Use for /almagest, what is going on, status, what waits for me, where do I work on X, work on X, fix this, implement, build, note this, remember to, publish my journal, what is in my journals, and any request when the right skill is not clear. Keeping part of this conversation is wiki-save; files to learn from are wiki-ingest.
Also in 3 projects that use this
Other versions41 projects use a version of this.
Word for word · 0
None found.
Edited · 3
- Ivy-Chen1999/llm-wiki-kit★ 2130% same
- chobizzy/llm-wiki★ 365% same
- 0xbadal/Skills★ 173% same
Wrote their own version · 38
- AgriciDaniel/claude-obsidian★ 16ksame name
- rohitg00/pro-workflow★ 2.9ksame name
- kfchou/wiki-skills★ 189same name
- bozhouDev/bozhou-skills★ 78same name
- vanillaflava/llm-wiki-skills★ 65same name
- cookyman74/llmwiki-harness★ 34same name
- CarbeneAI/Forge★ 9same name
- CodePhobiia/claude-roblox-game-studio★ 9same name
- crabin/llm-wiki★ 8same name
- Xipher-Labs/walter-os★ 8same name
28 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository43 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/agents.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/obsidian-wiki.mdcCursor rule
- claude-history-ingestSkill
- code-understandSkill
- codex-history-ingestSkill
- copilot-history-ingestSkill
- cross-linkerSkill
- daily-updateSkill
- graph-colorizeSkill
- hermes-history-ingestSkill
- impl-validatorSkill
- llm-wikiSkill
- memory-bridgeSkill
- obsidian-layout-adjustmentSkill
- openclaw-history-ingestSkill
- pi-history-ingestSkill
- session-brainSkill
- session-searchSkill
- skill-creatorSkill
- tag-taxonomySkill
- vault-skill-factorySkill
- wiki-agentSkill
- wiki-captureSkill
- wiki-context-packSkill
- wiki-dashboardSkill
- wiki-dedupSkill
- wiki-digestSkill
- wiki-exportSkill
- wiki-history-ingestSkill
- wiki-importSkill
- wiki-ingestSkill
- wiki-lintSkill
- wiki-narrateSkill
- wiki-rebuildSkill
- wiki-researchSkill
- wiki-setupSkill
- wiki-stage-commitSkill
- wiki-statusSkill
- wiki-switchSkill
- wiki-synthesizeSkill
- wiki-updateSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
35 rules. 0 are common, 12 are distinctive, and 23 are very specific to this project.
0
Common
Most of the 33 edited versions we read keep these.
12
Distinctive
This author's own choices. Worth a look.
23
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Never, even when a change seems obviously helpful:
- Very specific: line 16
create or edit pages under concepts/, entities/, skills/, references/, synthesis/, journal/, or projects/
- Distinctive: line 19
If the user's message contains a new finding, an action request ("save this", "ban X", "record that"), or anything implying a change, do …
- Very specific: line 27
Load QMD settings from the resolved config: before deciding retrieval strategy.
- Very specific: line 28
If $OBSIDIAN_VAULT_PATH/hot.md exists, read it first — it gives you instant context on recent activity.
- Very specific: line 29
Read $OBSIDIAN_VAULT_PATH/index.md to understand the wiki's scope and structure
- Distinctive: line 35
If the user's query includes phrases like "public only", "user-facing", "no internal content", "as a user would see it", or "exclude …
- Distinctive: line 52
Before opening any pages, query the compiled graph index:
- Very specific: line 66
index_only: if true, the top candidate's summary already answers the question — skip page reads - Very specific: line 83
If graph is non-null → the structural answer is complete.
- Very specific: line 84
If index_only: true → answer directly from candidates[0].summary.
- Very specific: line 85
If answer_type == "path" and path is non-empty → the connection is in path.
- Very specific: line 95
When temporal.excluded_historical is non-zero, say so if it is material to the answer — the user may be asking about the superseded state.
- Very specific: line 97
If the question is about the past ("what did we use in 2025", "before the migration"), re-run with --as-of YYYY-MM-DD to retrieve what held …
- Very specific: line 99
Use --include-historical when the user explicitly wants the whole history, or when you are tracing how a decision changed.
- Very specific: line 134
Use Grep to scan page frontmatter only for title, tag, alias, and summary matches.
- Very specific: line 140
Apply tier ordering within each rank bucket: when two candidates score equally, prefer tier: core over tier: supporting over tier: …
- Very specific: line 147
If you're in index-only mode, stop here.
- Very specific: line 165
If the selected transport is unavailable (no MCP tool, qmd not on PATH, or the command errors), skip QMD and continue with Step 3.
- Very specific: line 182
Keep operator-like or punctuation-heavy tokens such as no-sudo, ansible_become=false, and ~/.local/bin in the lex: line.
- Very specific: line 197
Use ${QMD_CLI:-qmd} get "#docid" to retrieve a ranked document by docid when CLI output provides one.
- Very specific: line 207
If QMD_PAPERS_COLLECTION is set and the user is asking about a topic likely covered by ingested papers (research, theory, background), run …
- Very specific: line 213
Use Grep -A 10 -B 2 "<query-term>" <candidate-file> to get just the lines around the match.
- Distinctive: line 215
If the section grep gives a clear answer, go straight to Step 5.
- Distinctive: line 219
Only when Steps 2 and 3 don't answer the question:
- Very specific: line 222
Follow at most one hop of [[wikilinks]] from those pages if the answer requires cross-references.
- Distinctive: line 224
Check "Open Questions" sections for known gaps.
- Distinctive: line 225
If you're still short, then fall back to a broad content grep across the vault.
- Distinctive: line 231
Run this step only for path/multi-hop queries (or when a relationship query returns no direct edge between the two pages).
- Very specific: line 237
Bounded BFS: If obsidian-wiki is installed, let the CLI do the walk over the wikilink graph first — it is exact and instant:
- Distinctive: line 246
Frontier cap: stop expanding a node once the visited set exceeds ~60 pages — report partial results rather than fanning out across the …
- Distinctive: line 265
If the wiki has contradictions, present both sides
- Distinctive: line 266
If the wiki doesn't cover something, say so explicitly
- Very specific: line 290
Read $OBSIDIAN_VAULT_PATH/.manifest.json and look up .projects.<name>.source_repo — this is the authoritative, machine-independent identity …
- Very specific: line 315
Use the counts tracked since Step 2.
“Common” is measured: kept by at least 6 in 10 of the 33 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Wiki Query — Knowledge Retrieval
You are answering questions against a compiled Obsidian wiki, not raw source documents. The wiki contains pre-synthesized, cross-referenced knowledge.
This skill is READ-ONLY
wiki-query answers questions. It MUST NOT create or modify any wiki content. The ONLY write it may perform is the single Step 6 append to log.md.
Never, even when a change seems obviously helpful:
- create or edit pages under
concepts/,entities/,skills/,references/,synthesis/,journal/, orprojects/ - modify
index.md,hot.md,_insights.md, or.manifest.json
If the user's message contains a new finding, an action request ("save this", "ban X", "record that"), or anything implying a change, do not perform it. Answer the question, PROPOSE the change, and route the user to the right skill:
- quick note / gotcha →
wiki-capture --quick - a full new page →
wiki-capture - a project-knowledge sync →
wiki-update
Before You Start
- Resolve config — follow the Config Resolution Protocol in
llm-wiki/SKILL.md(inline@nameoverride → walk up CWD for.env→ global config → prompt setup). For cross-project queries without@name, prefer the global config when present, even if it is a symlink to the vault.env. This givesOBSIDIAN_VAULT_PATHand any QMD variables. Works from any project directory. - Load QMD settings from the resolved config before deciding retrieval strategy. If
QMD_WIKI_COLLECTIONis set, treat QMD as available subject only to transport/tool checks below. If it is empty or unset, say briefly why QMD is being skipped before using grep/page reads. - If
$OBSIDIAN_VAULT_PATH/hot.mdexists, read it first — it gives you instant context on recent activity. If the user's question is about something ingested recently, hot.md may answer it before you even openindex.md. - Read
$OBSIDIAN_VAULT_PATH/index.mdto understand the wiki's scope and structure
Visibility Filter (optional)
By 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:
- Build a blocked tag set:
{visibility/internal, visibility/pii} - In the Index Pass (Step 2), skip any candidate whose frontmatter tags contain a blocked tag
- In Section/Full Read passes (Steps 3–4), do not read or cite any blocked page
- Synthesize the answer only from allowed pages — do not mention that excluded pages exist
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.
Retrieval Protocol
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.
Step 0: GraphRAG Pre-pass (fast index query — no page reads)
Before opening any pages, query the compiled graph index:
obsidian-wiki graph-query "$OBSIDIAN_VAULT_PATH" "<question>" --prettyOutput fields:
answer_type:direct|path|list|gap|impact|bridges|hubs|clusters|surprising— shapes what to do next. The last five are structural intents: the question is about the shape of the vault, and the answer comes back fully computed ingraph(see below) with no page reads at all.graph: present only for structural intents — the computed answer.nullotherwise.candidates: top-ranked pages by title/tag/summary match + degree, with scores and summariesshould_read: the pages most worth opening — start here instead of speculatively reading many filespath: for multi-hop queries, the shortest wikilink path between the two conceptsgod_nodes_relevant: hub pages related to your query terms — always useful contextindex_only: iftrue, the top candidate's summary already answers the question — skip page readstemporal:as_of,retrievable,excluded_historical— how many pages the event-time filter held back (see below)
Structural intents — these are answered entirely from the graph. The user's phrasing routes automatically:
| The user asks | answer_type | graph contains |
| "what breaks if I delete X" / "what depends on X" / "what links to X" | impact | direct_dependents, transitive_dependents, total |
| "which pages bridge my clusters" / "what would fragment my vault" | bridges | pages by betweenness, with label and connects_labels |
| "what's central" / "top hubs" / "my main topics" | hubs | pages by degree, with in/out split |
| "what clusters do I have" / "how is my wiki organised" | clusters | each cluster's label, size, cohesion, fragmented |
| "surprising connections" / "unexpected links" | surprising | cross-cluster links, rarest first |
Report the graph payload directly — do not re-derive it by reading pages. If a structural question names a page that can't be resolved, the CLI falls back to direct and graph is null.
Decision tree:
- If
graphis non-null → the structural answer is complete. Report it and stop; no page reads. - If
index_only: true→ answer directly fromcandidates[0].summary. Skip Steps 1–4, go to Step 5. - If
answer_type == "path"andpathis non-empty → the connection is inpath. Read only those pages. - Otherwise → open only
should_readpages (not all candidates). This replaces the speculative 5–10 page reads the old flow required.
The graph used here excludes vault bookkeeping files (
index.md,log.md,hot.md,_insights.md). They link to nearly every page, so including them made any two pages look ~2 hops apart and produced meaninglessA → index → Bpaths.
Event time. Pages may carry valid_from / valid_until / superseded_by
frontmatter. A page whose valid_until has passed is historical: it stays in
the vault and in the graph, but drops out of candidates by default, so "which X
do we use?" answers with what is true now rather than whatever was written first.
- When
temporal.excluded_historicalis non-zero, say so if it is material to the answer — the user may be asking about the superseded state. - If the question is about the past ("what did we use in 2025", "before the
migration"), re-run with
--as-of YYYY-MM-DDto retrieve what held then. - Use
--include-historicalwhen the user explicitly wants the whole history, or when you are tracing how a decision changed. - A returned candidate carrying
superseded_bynames its replacement — follow it rather than reporting the stale claim as current.
obsidian-wiki graph-query "$OBSIDIAN_VAULT_PATH" "<question>" --as-of 2025-06-01 --pretty
obsidian-wiki graph-query "$OBSIDIAN_VAULT_PATH" "<question>" --include-historical --prettyThe structural intents ignore this filter on purpose: deleting a page still breaks the historical pages that link to it, so a blast radius must not shrink just because a dependent is no longer current.
Fallback (if obsidian-wiki is not installed): proceed with Step 1 as normal using grep and index.md.
Step 1: Understand the Question
Classify the query type:
- Factual lookup — "What is X?" → Find the relevant page(s)
- Relationship query — "How does X relate to Y?" / "What contradicts X?" → Find both pages, their cross-references, and their
relationships:frontmatter blocks for typed edges - Path / multi-hop query — "How is X connected to Y?" / "What links X to Y?" / "Trace the chain from X to Z" / "What does X depend on transitively?" → X and Y don't link directly; the connection runs through intermediate pages. Use the multi-hop graph traversal in Step 4b.
- Synthesis query — "What's the current thinking on X?" → Find all pages that touch X, synthesize
- Gap query — "What don't I know about X?" → Find what's missing, check open questions sections
- Challenge query — "challenge this" / "argue against X" / "poke holes in my plan" / "what did I decide about X?" → The user is about to commit to something. Look for the vault's own evidence against it. See "Challenge queries" under Step 5.
Also decide the mode:
- Index-only mode — triggered by "quick answer", "just scan", "don't read the pages", "fast lookup". Stops at Step 3. Answers from frontmatter +
index.mdonly. - Normal mode — the full tiered pipeline below.
Step 2: Index Pass (cheap)
Build a candidate set without opening any page bodies:
- You've already read
index.mdabove — use it as the first filter. It lists every page with a one-line description and tags. - Use
Grepto scan page frontmatter only for title, tag, alias, and summary matches. A pattern like^(title|tags|aliases|summary):scoped to vault.mdfiles is far cheaper than content grep. - Collect the top 5–10 candidate page paths ranked by:
- Exact title or alias match
- Tag match
- Summary field contains the query term
index.mdentry contains the query term
- Apply tier ordering within each rank bucket: when two candidates score equally, prefer
tier: coreovertier: supportingovertier: peripheral. Read thetier:frontmatter field with the same cheap grep as other fields. Pages without atier:field are treated assupporting.
Track retrieval counts as you go (for the transparency report in Step 5/6):
candidates_seen— total distinct pages that matched any rank criterion above, before trimming to the top 5–10.candidates_used— how many of those you actually carried forward into Steps 3/4.dropped—candidates_seen − candidates_used, i.e. matches that existed but were never read. If this is non-zero, name the dropped pages (or the count if there are many) so the user knows retrieval wasn't exhaustive — this is not an error, just an honest accounting of what was left out.
If 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.
Step 2b: QMD Semantic Pass (optional — requires QMD_WIKI_COLLECTION in resolved config)
GUARD: If $QMD_WIKI_COLLECTION is empty or unset after config resolution, skip this entire step and proceed to Step 3. Mention the missing variable in your working update.
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, run QMD before reaching for Grep unless the question is already fully answered by hot.md or index.md metadata. QMD is especially preferred when the question is semantic, project-specific, asks for related context, or uses terms that may not appear verbatim in titles/frontmatter.
Choose the QMD transport from $QMD_TRANSPORT:
mcp(default): use the QMD MCP tool configured in the agent.cli: run the local qmd CLI. Use$QMD_CLIif set; otherwise useqmd.
For detailed CLI command selection, maintenance, and VM caveats, use the local
$qmd-cli skill when it is installed.
If the selected transport is unavailable (no MCP tool, qmd not on PATH, or the command errors), skip QMD and continue with Step 3.
For MCP transport:
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>For CLI transport, pick the command from $QMD_CLI_SEARCH_MODE:
Keep operator-like or punctuation-heavy tokens such as no-sudo, ansible_become=false, and ~/.local/bin in the lex: line. Rewrite the vec: line as plain natural language without hyphenated -term words; QMD treats -term as negation, and negation is not supported in vec/hyde queries.
quality(default): best relevance; slower on CPU.${QMD_CLI:-qmd} query $'lex: <key terms>\nvec: <question rephrased as a description>' -c "$QMD_WIKI_COLLECTION" -n 8 --filesbalanced: hybrid search without LLM reranking; use whenqualityis too slow.${QMD_CLI:-qmd} query $'lex: <key terms>\nvec: <question rephrased as a description>' -c "$QMD_WIKI_COLLECTION" -n 8 --no-rerank --filesfast: semantic-only recall, orsearchinstead when exact names, file paths, or error messages matter.${QMD_CLI:-qmd} vsearch "<question rephrased as a description>" -c "$QMD_WIKI_COLLECTION" -n 8 --files
Use ${QMD_CLI:-qmd} get "#docid" to retrieve a ranked document by docid when CLI output provides one.
The returned snippets or ranked files 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.
Fold QMD hits into the same candidates_seen count from Step 2 (dedupe by path — a page found by both frontmatter grep and QMD counts once).
Defensive filter: drop any _raw/ path from wiki-collection results. The wiki collection is supposed to index only compiled pages, but a misconfigured collection (see .env.example) can end up indexing _raw/ — including stale drafts sitting in _raw/_archived/ that were already superseded by a promoted page. Before using a QMD hit from $QMD_WIKI_COLLECTION, check its path: if it contains _raw/, discard it from the wiki-collection result set (it may still surface legitimately via $QMD_PAPERS_COLLECTION, cited as a raw source). This keeps a misconfigured collection degrading to "missing recall" rather than "silently citing a superseded draft as compiled knowledge." If you see _raw/ paths coming back from the wiki collection, mention it in your working update so the user knows their collection scope needs fixing (see .env.example QMD section).
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.
Step 3: Section Pass (medium cost — only if Steps 2/2b are inconclusive)
For each of the top candidates, pull the relevant section without reading the whole page:
- Use
Grep -A 10 -B 2 "<query-term>" <candidate-file>to get just the lines around the match. - This usually returns 15–30 lines per hit instead of 100–500.
- If the section grep gives a clear answer, go straight to Step 5.
Step 4: Full Read (expensive — last resort)
Only when Steps 2 and 3 don't answer the question:
Readthe top 3 candidates in full. When choosing which 3 to read, apply tier ordering: readcorepages beforesupporting, and skipperipheralpages unless they are the only match.- Follow at most one hop of
[[wikilinks]]from those pages if the answer requires cross-references. - For relationship queries ("How does X relate to Y?" / "What contradicts X?"): also read the
relationships:frontmatter block of the candidate pages. Each entry gives a typed, directional edge (extends,implements,contradicts,derived_from,uses,replaces,related_to). Surface these explicitly in your answer — "Page A contradicts Page B (typed edge)" is more useful than "Page A links to Page B". - Check "Open Questions" sections for known gaps.
- If you're still short, then fall back to a broad content grep across the vault. Tell the user you escalated — this is the expensive path and they should know.
Step 4b: Multi-hop Graph Traversal (typed edges)
Plain retrieval surfaces pages that mention the query terms. It cannot answer path / multi-hop queries — "How is X connected to Y?", "What does X depend on transitively?", "Trace the chain from X to Z" — when X and Y never appear on the same page. The answer lives in the shape of the typed-edge graph, not in any single page body. This is the step that walks it.
Run this step only for path/multi-hop queries (or when a relationship query returns no direct edge between the two pages). It is built entirely from frontmatter — never read page bodies here.
- Build the typed-edge adjacency (cheap). Grep every page's
relationships:block in one pass —Grep -A 20 "^relationships:" <vault>/**/*.md(frontmatter only). Each entry yields a directed, typed edgesource —type→ target. Add the reverse direction as a traversable edge too (mark it(reverse)), since "connected to" is symmetric even though the typed assertion is directional. Plain body[[wikilinks]]count as untypedrelated_toedges only if you need them to complete a path — prefer typed edges first. - Locate the endpoints. Resolve X (and Y, if the query names two) to page paths using the registry from Step 2. If an endpoint is ambiguous, pick the
tier: corecandidate and note the assumption. Bounded BFS. If
obsidian-wikiis installed, let the CLI do the walk over the wikilink graph first — it is exact and instant:obsidian-wiki graph-analyse "$OBSIDIAN_VAULT_PATH" --path "<X>" "<Y>" # two-endpoint: shortest chain + hop count obsidian-wiki graph-analyse "$OBSIDIAN_VAULT_PATH" --around "<X>" --depth 3 [--direction out|in] # one-endpoint: reachable pages by hop--pathfollows links in either direction unless--direction out;--around --direction inanswers "what depends on X" (its blast radius). Then decorate the returned chain with the typed edges from step 1 (the CLI sees[[wikilinks]], not relationship types). Otherwise, or to find alternate paths, walk manually:- Max depth 3 hops by default (the connection is rarely meaningful beyond that). Raise to 4 only if the user says "deep" / "however many hops it takes".
- Frontier cap: stop expanding a node once the visited set exceeds ~60 pages — report partial results rather than fanning out across the whole vault.
- For a two-endpoint query (X→Y): stop as soon as you find the shortest path; then continue briefly to surface up to 2 alternate paths if they exist.
- For a one-endpoint query (X transitively): collect all nodes reachable within the depth limit, grouped by hop distance.
Report the path(s) with edge types. Show the chain, not just the endpoints — the typed edges are the answer:
[[concepts/transformers]] —uses→ [[concepts/attention]] —derived_from→ [[concepts/rnn-seq2seq]] —contradicts (reverse)→ [[concepts/lstm]]State the hop count and whether any hop is a
(reverse)traversal or an untypedrelated_tofallback (those chains are weaker — flag them). If no path exists within the depth limit, say so explicitly: "No typed-edge path from X to Y within 3 hops — they are in disconnected regions of the graph." That is itself a useful finding (a graph gap).
Cost guard: this step reads only frontmatter via grep. If the adjacency grep returns nothing (no page uses relationships: yet), report that the graph has no typed edges to traverse and suggest running cross-linker to populate them, then fall back to ordinary one-hop retrieval.
Step 5: Synthesize an Answer
Compose your answer from wiki content:
- Cite specific wiki pages using
[[page-name]]notation - Note which step the answer came from ("found in summary" vs "grepped section" vs "full page read") — helps the user understand confidence
- If the wiki has contradictions, present both sides
- If the wiki doesn't cover something, say so explicitly
- Suggest which sources might fill the gap
Page trust annotations: For every page cited in your answer, check its lifecycle frontmatter and compute is_stale = (today − updated) > 90 days. Annotate risky pages inline so the user knows which citations to verify:
| Condition | Annotation |
lifecycle: archived | (ARCHIVED: superseded by [[target]]) — use the successor instead |
lifecycle: disputed | (DISPUTED, marked <lifecycle_changed>: <lifecycle_reason or "reason unspecified">) |
is_stale + lifecycle: verified | (VERIFIED but stale: last updated <updated>) — reader should re-verify before relying |
is_stale (other lifecycle) | (stale: last updated <updated>) |
Examples in a synthesized answer:
[[concept-page]] (stale: last updated 2026-01-15) — Original claim was X.
[[verified-page]] (VERIFIED but stale: last updated 2025-09-10) — Reader should reverify before relying.
[[disputed-page]] (DISPUTED, marked 2026-04-30: contradicted by [[new-source]]) — Earlier said Y, now uncertain.
[[old-page]] (ARCHIVED: superseded by [[new-page]]) — Use the successor.Pages with no lifecycle field (legacy pages predating the schema) are treated the same as draft — annotate if stale, skip otherwise. Never fabricate a lifecycle_reason; if the field is absent, omit the reason from the annotation.
Surface the project source location (project-scoped queries). When the cited pages are project-scoped — their path is under projects/<name>/..., or their frontmatter carries a source_path/source_repo field — resolve where the actual code lives so a proposed fix can name real files and a follow-up turn can edit them:
- Read
$OBSIDIAN_VAULT_PATH/.manifest.jsonand look up.projects.<name>.source_repo— this is the authoritative, machine-independent identity (e.g.github.com/owner/name). It is what you report. - Resolve a local checkout root by trying these in order and stopping at the first that exists:
.projects.<name>.source_cwd_hint(a~-relative hint), then a legacy.projects.<name>.source_cwd(an absolute path, older manifests only), then the page'ssource_pathfrontmatter. Expand~in any candidate and confirm the directory actually exists before using it. A legacy absolute path is used only as a local convenience — never reported as the project's identity.
Report the Source code: line using source_repo. When a local checkout resolved in step 2, append the concrete path so the reader can act on it (e.g. <repo> — local checkout at ~/code/name/public/lib/anticheat.js). When the query implies a code fix is wanted and a local checkout exists, name the specific files to edit and offer to implement it as an explicit, separate next step — but never edit during the query itself (see the READ-ONLY guard above). If no local checkout resolves, report the repo and say the code is not checked out on this machine.
Challenge queries. The job is to argue with the user using their own notes, not to be agreeable. Run the normal retrieval on the idea's topic, then search further for:
- earlier decisions on the same question, especially ones that went the other way (
synthesis/,projects/, pages with "decision", "decided", "chose", "rejected", "won't do"); - things that failed or were rolled back: post-mortems, "gotcha", "broke", "reverted",
lifecycle: disputedorarchivedpages,contradictsrelationships; - open questions and constraints the idea would run into.
Lead the answer with the strongest counter-evidence, each point quoted or closely paraphrased with its [[page]] and date, e.g. "[[synthesis/rust-rewrite]] (2025-11-02) says the rewrite was abandoned over build times. What is different now?" Then list what the vault says in favour, if anything. End with one or two questions the user should answer before going ahead. If the vault holds nothing against the idea, say so plainly. Never invent an objection the notes don't support: an empty challenge is a useful answer.
Step 6: Log the Query
This is the only write this skill performs — do not edit anything else, and do not append to log.md by hand:
obsidian-wiki memory log QUERY \
query="the user's question" result_pages=<N> \
mode=<normal|index_only|filtered> escalated=<true|false> \
candidates_seen=<N> candidates_used=<N> dropped=<N>The command takes the memory lock and appends one parseable line; it never touches index.md or hot.md.
Use the counts tracked since Step 2. If a count wasn't tracked (e.g. index-only mode never built a full candidate set), write 0 rather than omitting the field — the log format should stay parseable.
Answer Format
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]
Retrieval: N candidates seen, M read, D dropped (untouched matches, if any: [[page-d]], [[page-e]])
Source code:
<source_repo>(local checkout at~/code/<name>) — to implement, the relevant files are…. (Say the word and I'll switch out of query mode to make the change.)
The Source code line is optional — include it only for project-scoped queries where you resolved a source_repo (see Step 5). Report the repository, not a machine absolute path; add the local checkout path only when it actually exists on this machine.
The Retrieval line is always included — it's the transparency report from the counts tracked since Step 2 (mirrors the candidates_seen/candidates_used/dropped fields logged in Step 6). In index-only mode, report the counts from the frontmatter scan; if D is 0, drop the parenthetical rather than writing an empty list.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

