wiki-query

wiki-query is a command for coding agents from deepfounder-ai/llm-wiki. It costs 28 tokens per session (584 once invoked), scanned A, original, MIT.

A chat command for asking questions against an LLM Wiki, a collection of saved knowledge pages. It selects relevant pages and can optionally save the answer back to the wiki.

In plain words
What is it for?
Finding relevant wiki pages, answering questions from them in the current chat, citing the pages used, and suggesting a source to ingest when information is missing.
Why use it?
It lets developers reuse information already stored in the wiki and clearly reports when those pages do not contain enough evidence.

Command

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the llm-wiki plugin — 2 commands, 1 agent, 3 hooks 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/deepfounder-ai/llm-wiki/wiki-query
Clone the repo
git clone --depth 1 https://github.com/deepfounder-ai/llm-wiki

Or install llm-wiki, the plugin that ships this one along with the rest of its 2 commands, 1 agent, 3 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for wiki-query

README.md
[![agentmods](https://agentmods.dev/badge/commands/deepfounder-ai/llm-wiki/wiki-query.svg)](https://agentmods.dev/commands/deepfounder-ai/llm-wiki/wiki-query)
Your own site
<a href="https://agentmods.dev/commands/deepfounder-ai/llm-wiki/wiki-query"><img src="https://agentmods.dev/badge/commands/deepfounder-ai/llm-wiki/wiki-query.svg" alt="Measured on agentmods" height="20"></a>
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 584 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.1 $0.00028 $0.00584
Opus 5 $0.00014 $0.00292
Sonnet 5 $0.00006 $0.00117
Haiku 4.5 $0.00003 $0.00058

Measured 5d ago against content hash 93fe6c58d01c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

wiki-query 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 5d 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.

commands/wiki-query.md · 49 lines

How it starts

The opening of the file, as written. The whole thing — 49 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/wiki-query

Answer $ARGUMENTS using the wiki. Work in the current session (don't dispatch to a sub-agent for the query itself — the user wants the answer here, with access to the conversation context).

Steps

  1. Use the index already in context. The SessionStart hook injects a block listing pages in the global (and local, if present) wiki. Scan it for pages whose title or tags match the question.

  2. If no index block is in context (fresh session without the hook, or the wikis were empty at start), rebuild and read the caches manually:

    bash ${CLAUDE_PLUGIN_ROOT}/scripts/build-index.sh --path ~/.claude/wiki
    

    Then Read ~/.claude/wiki/.wiki/index.cache.json, and if ./wiki/ exists, also Read ./wiki/.wiki/index.cache.json.

  3. Pick 1–3 relevant pages by title+tag match. Read them in full (~/.claude/wiki/pages/<slug>.md or ./wiki/pages/<slug>.md).

  4. Answer the user's question in chat. Cite the pages you used by slug (e.g. "From prompt-caching and claude-sdk-basics: …"). If the wiki does not have enough information:

    • Say so plainly. Do not hallucinate.
    • Suggest the user ingest a specific URL or file with /wiki-ingest.
  5. Log the query (append one line to ~/.claude/wiki/.wiki/log.jsonl, and the local log if you used it):

    {"ts":"<ISO-UTC>","op":"query","scope":"global","slugs":["prompt-caching"],"action":"read"}
    
  6. At the end of your answer, ask:

    Save this answer as a new wiki page? (y/N) If the user replies y (or obviously affirmative), dispatch to wiki-curator via the Agent tool with subagent_type: "wiki-curator" and a prompt explaining: this is a type: session ingest, here is the question and your answer, decide update-vs-create, standard procedure.

Style

  • Be direct. Synthesise across pages if more than one applies; don't dump their contents verbatim.
  • If the question is ambiguous, ask one clarifying question first before hunting for pages.

Read the full file on GitHub · 49 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. 5d ago First seen · 49 lines · 28 tokens per session scan A 93fe6c58d01c

Subscribe to this mod's changes

wiki-query is a command published in the GitHub repository deepfounder-ai/llm-wiki (13 stars, last pushed 4mo ago), licensed MIT. It adds 28 tokens to every session and 584 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.