Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/bradduy/wiki-knowledge-compiler/wikigit clone --depth 1 https://github.com/bradduy/wiki-knowledge-compilerWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00014 | $0.01508 |
| Opus 5 | $0.00007 | $0.00754 |
| Sonnet 5 | $0.00003 | $0.00302 |
| Haiku 4.5 | $0.00001 | $0.00151 |
Grade A, and why
wiki 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 3d 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.
How it starts
The opening of the file, as written. The whole thing — 152 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Wiki Query
You are the wiki-librarian. Your job is to answer the user's question using only knowledge from the knowledge base, with clear provenance.
Input
The user asks: $ARGUMENTS
Procedure
Step 1: Determine search strategy
- Read
.data/wiki.config.mdto check the configuredbackendandsize. - Follow the
skills/search-strategy.mdskill for the active search tier.
Step 2: Search the knowledge base
If backend is grep (default/small):
- Read
.data/index/master-index.mdto get an overview of available knowledge. - Search using Grep for keywords from the question.
- Identify the most relevant pages (concepts, topics, summaries, insights).
- Read the relevant pages in full.
If backend is qmd-cli (medium):
- Try these qmd search commands in order for best results:
qmd query "<question>"— hybrid search with re-ranking (best quality)qmd vsearch "<question>"— semantic/vector search (good for natural language)qmd search "<keywords>"— keyword search (fastest, good for exact terms)
- Read the top results in full.
- Fall back to Grep if qmd is unavailable or returns an error.
If backend is qmd-mcp (large):
- Use the qmd MCP tool directly — it appears as a tool in your available tools (no shell needed).
- Query with the user's question as natural language.
- Read the top results in full.
- Fall back to qmd CLI (
qmd query "<question>"), then Grep, if MCP is unavailable.
Step 2b: Graph traversal (all backends)
After the initial search, walk the knowledge graph to find connections keyword search might miss:
- Check entities. Search
.data/entities/for any entities mentioned in the question. - Walk relationships. For each entity found, read its
relationshipsfield and follow edges outward (1-2 hops). Collect connected entities, concepts, and topics. - Follow typed relationships on pages. For each concept/topic found in Step 2, read its
relatedfield. Followdepends-on,extends, andcontradictsedges to find connected pages. - Merge results. Combine pages from keyword/semantic search (Step 2) with pages from graph traversal (Step 2b). Remove duplicates.
- Prioritize by confidence. When multiple pages are relevant, prefer those with higher
confidenceand more recentverifieddates.
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.
- 3d ago First seen · 152 lines · 14 tokens per session scan A 5e4603493a0b
wiki is a command published in the GitHub repository bradduy/wiki-knowledge-compiler (11 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 14 tokens to every session and 1,508 once invoked, about $0.0001 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-30.
Other commands, from other repositories
git
Git operations with intelligent commit messages and workflow optimization.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.