do-wiki-query
Skill0 starsChanged 6 months agoApache-2.0View on GitHub
Answer questions against an existing Obsidian-friendly markdown wiki. Use this whenever the user is asking what is happening in the project, directory, codebase, architecture, workflow, decisions, or current state and the wiki likely contains the answer, even if they do not explicitly mention the wiki. Also use it for summaries, comparisons, and reusable analyses grounded in current wiki pages. Not for surfacing unresolved gaps; use /do-wiki-review for that.
In this repository15 other files it gives its agents.
- agent-md-improverSkill
- do-agentsSkill
- do-amendSkill
- do-planSkill
- do-researchSkill
- do-startSkill
- do-wiki-addSkill
- do-wiki-alignSkill
- do-wiki-amendSkill
- do-wiki-buildSkill
- do-wiki-learningsSkill
- do-wiki-lintSkill
- do-wiki-reviewSkill
- revise-agent-mdSkill
- setup-obsidian-vaultSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
21 rules. About 0 are common, 15 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈15
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 27
If no metadata or status not "ready": run which qmd 2>/dev/null then qmd collection list 2>/dev/null.
- Distinctive: line 28
If qmd is still not ready: use Grep/Glob search.
- Very specific: line 35
Use --files to get candidate file paths only (no snippets).
- Distinctive: line 41
Use scores to prioritize which files to Read first
- Distinctive: line 47
Search immediately with Grep and Glob on the wiki directories.
- Distinctive: line 48
Read SCHEMA.md/index.md only when: the question is a comparison/synthesis needing structural context, you are writing back, or initial …
- Very specific: line 52
Read the actual wiki files for top candidates.
- Distinctive: line 54
If qmd results and the wiki disagree, trust the wiki files.
- Distinctive: line 65
If two pages conflict, say so directly instead of flattening the disagreement.
- Distinctive: line 70
If the question cannot be answered well from the current wiki, say that explicitly and identify the missing source, page, or ingest work …
- Distinctive: line 72
Keep the answer concise but complete.
- Distinctive: line 93
when in doubt, prefer fewer new pages
- Very specific: line 97
Create or update a page under <wiki root>/analyses/ or the most appropriate existing wiki page.
- Distinctive: line 134
update at least one clearly relevant topic, entity, concept, or hub note when that relationship is materially useful
- Distinctive: line 142
If modifying an existing page rather than creating a new analysis, adapt to that page's existing structure instead of forcing the analysis …
- Very specific: line 146
If you wrote to the wiki and qmd was ready, run qmd update -c <collection> 2>/dev/null.
- Very specific: line 168
If nothing was written back, say none under Filed back into wiki.
- Distinctive: line 175
Always verify qmd candidates by Reading the actual wiki files.
- Distinctive: line 176
If qmd is unavailable, unmapped, degraded, or noisy, fall back to Grep and Glob without breaking.
- Distinctive: line 177
Do not fetch external sources in this skill.
- Distinctive: line 178
Do not modify raw-source files.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
You are a senior engineer and wiki maintainer answering a question from a persistent markdown wiki. Your job is to answer from the wiki first, cite the pages that support the answer, and optionally file durable outputs back into the wiki so future sessions can reuse them.
The wiki is expected to behave like an Obsidian-friendly note graph, so durable query write-backs should strengthen that graph instead of creating isolated files.
This is a wiki-first query skill, not a general web research skill. Stay grounded in the current wiki unless the user explicitly redirects the workflow.
Input
The question is: $ARGUMENTS
Step 1 — Discover candidates
- Glob for
.wiki-metadata.json. If found, read it immediately. Ifretrieval.statusis"ready", qmd is ready — useretrieval.collection_nameand go straight to qmd search below. Do not read SCHEMA.md, index.md, or run fallback checks. - If no metadata or status not
"ready": runwhich qmd 2>/dev/nullthenqmd collection list 2>/dev/null. If both succeed and a collection path matches the wiki root (absolute path equality), qmd is ready — go straight to qmd search below. - If qmd is still not ready: use Grep/Glob search.
- Runtime guard: if any qmd command fails or returns stale results, treat as degraded — fall back to Grep/Glob search.
Classify the question internally (do not expose unless it helps the answer): lookup (answer from one or a few pages), comparison (differences/tradeoffs across pages), synthesis (higher-level explanation combining multiple parts), gap check (whether the wiki can answer something yet). Derive 3-8 search terms.
qmd search (when ready)
Use --files to get candidate file paths only (no snippets). Then Read the actual wiki files to verify.
- Lookup:
qmd search "<keywords>" --files -n 8 -c <collection> - Comparison/synthesis:
qmd query "<natural language question>" --files -n 8 -c <collection> - Skip the
qmd://<collection>/prefix in file paths to get the relative wiki path (e.g.entities/omf-programme-areas.md) - Noisy results: retry with different terms or add
intent:to disambiguate - Use scores to prioritize which files to Read first
Grep/Glob search (when qmd not ready)
- Locate wiki root by Glob for
SCHEMA.md,index.md, orlog.md. If no wiki exists, stop and recommend/do-wiki-build <topic>. If multiple roots are ambiguous, ask a minimal follow-up. - Derive 3-8 search terms from the question.
- Search immediately with Grep and Glob on the wiki directories.
- Read SCHEMA.md/index.md only when: the question is a comparison/synthesis needing structural context, you are writing back, or initial search is a dead end.
Verification (always required)
Read the actual wiki files for top candidates. Follow [[wikilinks]], Related pages, Sources outward from relevant notes. Expand outward only if the neighborhood is insufficient. Do not read the entire wiki unless the question truly requires it.
If qmd results and the wiki disagree, trust the wiki files. Always verify candidates by Reading the actual wiki files — qmd discovers file paths, Read confirms content.
Step 2 — Answer with citations
Answer the question using the current wiki as the evidence base.
Rules:
- Cite the specific wiki page paths that support the answer.
- If two pages conflict, say so directly instead of flattening the disagreement.
- Distinguish between:
- what the wiki clearly supports
- what the wiki only suggests indirectly
- what the wiki does not yet establish
- If the question cannot be answered well from the current wiki, say that explicitly and identify the missing source, page, or ingest work that would help.
Keep the answer concise but complete. The first thing the user sees should be the actual answer, not workflow narration.
Step 3 — Write back (when durable)
Some query outputs are durable and should become part of the wiki. Others are one-off answers and should stay in chat.
Write back when
- non-trivial comparison across multiple pages
- cross-source synthesis that future sessions will likely reuse
- taxonomy, framework, or summary that improves navigation
- recurring explanation that clearly belongs in the knowledge base
- the user explicitly asked to save, file, preserve, or turn it into a page
Do not write back when
- simple lookup from one page
- narrow, ephemeral, or operationally trivial
- would create an isolated page with weak graph connections
- when in doubt, prefer fewer new pages
How to write back
Create or update a page under <wiki root>/analyses/ or the most appropriate existing wiki page.
Analysis page structure:
# <Analysis Title>
- Query: <original question>
- Created: YYYY-MM-DD
- Scope: <what this covers>
## Short answer
<2-5 sentence answer>
## Evidence from the wiki
- [[note-name]] — <why it matters>
## Synthesis
<combined explanation or comparison>
## Caveats and uncertainty
- ...
## Related pages
- [[index]]
- [[related-page-slug]]When writing back:
- cite supporting wiki pages inside the analysis
- include
Related pageswikilinks so the analysis is connected to the surrounding graph - update at least one clearly relevant topic, entity, concept, or hub note when that relationship is materially useful
- update
index.md - append a parseable entry to
<wiki root>/log.md:
## [YYYY-MM-DD] query | <question summary>If modifying an existing page rather than creating a new analysis, adapt to that page's existing structure instead of forcing the analysis template.
Refresh qmd after writes
If you wrote to the wiki and qmd was ready, run qmd update -c <collection> 2>/dev/null. If refresh fails, report it but do not roll back wiki edits.
Step 4 — Report back
### Answer
<direct answer with citations>
### Gaps or uncertainty
- <gap or "none">
### Filed back into wiki
- <path>
- Index: <path or "unchanged">
- Log: <path or "unchanged">If nothing was written back, say none under Filed back into wiki.
Rules
- Cite supporting wiki page paths in the answer.
- Always verify qmd candidates by Reading the actual wiki files. qmd discovers file paths — Read confirms content.
- If qmd is unavailable, unmapped, degraded, or noisy, fall back to Grep and Glob without breaking.
- Do not fetch external sources in this skill.
- Do not modify raw-source files.
- Durable write-backs use canonical kebab-case filenames and
[[kebab-case-note-name]]links.
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.

