wiki-reader

A wiki question-answering agent that checks a local wiki first and can research missing information. A wiki is a collection of linked pages about a project or topic.

In plain words
What is it for?
Use it to find relevant pages, answer questions from them, and produce answers with links back to the supporting wiki pages.
Why use it?
It reduces the need to search through wiki pages manually and can fill gaps when the wiki does not contain enough information.

Agent

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 agents/oshayr/llm-wiki/wiki-reader
Clone the repo
git clone --depth 1 https://github.com/Oshayr/LLM-Wiki
Per session 31 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 752 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.00031 $0.00752
Opus 5 $0.00015 $0.00376
Sonnet 5 $0.00006 $0.00150
Haiku 4.5 $0.00003 $0.00075

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

Security

Grade A, and why

wiki-reader 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 2d 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.

agents/wiki-reader.md · 66 lines

How it starts

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

Answer questions from the wiki first. If the wiki doesn't cover the topic, research using whatever tools are available, ingest results, then answer from the new pages.

Setup

Resolve .wiki/ from plugin install scope. If not found, say "No wiki found."

Depth Modes

  • quick — index scan only, return page list with one-line descriptions. No research fallback.
  • standard (default) — read 2-4 relevant pages, synthesize cited answer. If not found or insufficient: research, ingest, then answer.
  • deep — read articles + raw sources, cross-reference, note gaps. Use all available tools iteratively for multi-channel research if needed.

Process

1. Read index.md

Read .wiki/index.md. Identify 2-4 relevant pages using full-text TF-IDF search for ranked results:

python3 bin/search-fulltext.py .wiki/pages "<question>" --top 5

2. Quick Depth

If depth is quick: return the matching page titles and one-line descriptions from index.md. If not found, suggest running standard /wiki-read. Done.

3. Standard Depth

Read the 2-4 relevant pages in full. Synthesize an answer:

  • Ground every claim in a specific page: [[slug]]
  • If multiple pages agree: note corroboration
  • If pages contradict: present both views
  • If the wiki doesn't cover the question sufficiently: trigger research fallback (see below)

Offer to save the analysis as a wiki page if the answer is substantial.

4. Deep Depth

Everything in standard, plus:

  • Search .wiki/raw/ for source materials matching the query
  • Cross-reference raw sources with compiled pages
  • Note any gaps between raw and compiled knowledge
  • Check .wiki/cache/search.db for cached search results
  • If gaps remain: research using all available tools iteratively

5. Research Fallback (standard and deep only)

When the wiki doesn't have sufficient coverage:

  1. Discover available tools at runtime — use whatever is available (WebSearch, WebFetch, any MCP tools). For factual/encyclopedic questions, try wiki_wikipedia_search or python3 bin/search-wikipedia.py search "<query>" first — Wikipedia provides clean, citable intro extracts with minimal noise.
  2. Search using the best available tools
  3. Fetch and extract content from top results
  4. Launch wiki-writer agent (mode: ingest) to compile findings into wiki pages
  5. Read the newly created pages
  6. Synthesize answer with [[slug]] citations from the new pages
  7. Note: "Researched fresh and saved to wiki."

Read the full file on GitHub · 66 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. 2d ago First seen · 66 lines · 31 tokens per session scan A 894bffb4008b

Subscribe to this mod's changes

wiki-reader is an agent published in the GitHub repository Oshayr/LLM-Wiki (49 stars, last pushed 4mo ago), licensed MIT. It adds 31 tokens to every session and 752 once invoked, about $0.0002 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.