wiki

A command that answers questions using only the project's wiki and includes where the information came from. It selects a search method based on the wiki configuration.

In plain words
What is it for?
Searching the knowledge base with text or semantic search, reading relevant pages, and producing answers with source references.
Why use it?
It helps you find answers in project documents without relying on unsupported information or manually searching every page.

Command for Claude Code

Part of the wiki-knowledge-compiler plugin — 7 commands, 4 agents, 1 hook shipped together

Install

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.

agentmods
npx agentmods add commands/bradduy/wiki-knowledge-compiler/wiki
Clone the repo
git clone --depth 1 https://github.com/bradduy/wiki-knowledge-compiler

Made for: Claude Code.

Or install wiki-knowledge-compiler, the plugin that ships this one along with the rest of its 7 commands, 4 agents, 1 hook.

Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,508 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce 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

Measured 3d ago against content hash 5e4603493a0b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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.

.claude/commands/wiki.md · 152 lines

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

  1. Read .data/wiki.config.md to check the configured backend and size.
  2. Follow the skills/search-strategy.md skill for the active search tier.

Step 2: Search the knowledge base

If backend is grep (default/small):

  1. Read .data/index/master-index.md to get an overview of available knowledge.
  2. Search using Grep for keywords from the question.
  3. Identify the most relevant pages (concepts, topics, summaries, insights).
  4. Read the relevant pages in full.

If backend is qmd-cli (medium):

  1. 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)
  2. Read the top results in full.
  3. Fall back to Grep if qmd is unavailable or returns an error.

If backend is qmd-mcp (large):

  1. Use the qmd MCP tool directly — it appears as a tool in your available tools (no shell needed).
  2. Query with the user's question as natural language.
  3. Read the top results in full.
  4. 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:

  1. Check entities. Search .data/entities/ for any entities mentioned in the question.
  2. Walk relationships. For each entity found, read its relationships field and follow edges outward (1-2 hops). Collect connected entities, concepts, and topics.
  3. Follow typed relationships on pages. For each concept/topic found in Step 2, read its related field. Follow depends-on, extends, and contradicts edges to find connected pages.
  4. Merge results. Combine pages from keyword/semantic search (Step 2) with pages from graph traversal (Step 2b). Remove duplicates.
  5. Prioritize by confidence. When multiple pages are relevant, prefer those with higher confidence and more recent verified dates.

Read the full file on GitHub · 152 lines

Changes

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.

  1. 3d ago First seen · 152 lines · 14 tokens per session scan A 5e4603493a0b

Subscribe to this mod's changes

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.