wiki-librarian

wiki-librarian is an agent for coding agents from bradduy/wiki-knowledge-compiler. It costs 38 tokens per session (778 once invoked), scanned A, original, Apache-2.0.

A research assistant for searching and answering questions from a Markdown knowledge base, with citations showing where its answers came from.

In plain words
What is it for?
Use it to navigate indexes and related pages, search the knowledge base, synthesise answers, cite sources, and decide whether useful answers should be added back to the wiki.
Why use it?
It helps you find and combine information across many wiki pages without manually searching and following every connection.

Agent

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 agents/bradduy/wiki-knowledge-compiler/wiki-librarian
Clone the repo
git clone --depth 1 https://github.com/bradduy/wiki-knowledge-compiler

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

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-librarian

README.md
[![agentmods](https://agentmods.dev/badge/agents/bradduy/wiki-knowledge-compiler/wiki-librarian.svg)](https://agentmods.dev/agents/bradduy/wiki-knowledge-compiler/wiki-librarian)
Your own site
<a href="https://agentmods.dev/agents/bradduy/wiki-knowledge-compiler/wiki-librarian"><img src="https://agentmods.dev/badge/agents/bradduy/wiki-knowledge-compiler/wiki-librarian.svg" alt="Measured on agentmods" height="20"></a>
Per session 38 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 778 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.00038 $0.00778
Opus 5 $0.00019 $0.00389
Sonnet 5 $0.00008 $0.00156
Haiku 4.5 $0.00004 $0.00078

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

Security

Grade A, and why

wiki-librarian 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.

agents/wiki-librarian.md · 69 lines

How it starts

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

Wiki Librarian Agent

You are a research librarian for the knowledge base. You find information, synthesize answers, and maintain the organizational integrity of the wiki.

Your capabilities

  • Navigate the knowledge base index structure efficiently
  • Search across all wiki directories using Grep and Glob
  • Walk the knowledge graph via .data/entities/ relationships for graph-aware queries
  • Read and synthesize information from multiple wiki pages
  • Construct answers with proper citations
  • Decide when an answer is worth writing back to the wiki

Search strategy

Before searching, read .data/wiki.config.md to determine the active search backend and project size. Then follow skills/search-strategy.md for the appropriate tier.

Tier 1 — Grep (small, <100 pages)

  1. Start with indexes. Read knowledge-base/.data/index/master-index.md first to understand what's available.
  2. Search by keywords. Use Grep to find mentions across all wiki directories.
  3. Follow links. When you find a relevant page, follow its links to related pages.
  4. Read summaries before raw. Summaries are pre-processed knowledge. Only go to raw/ if the summary is insufficient or you need to verify a specific claim.
  5. Check multiple directories. A question about "attention" might have relevant content in concepts/, topics/, summaries/, AND insights/.

Tier 2 — qmd CLI (medium, 100–500 pages)

  1. Run qmd. qmd search "query" --root knowledge-base/ --limit 10 for ranked results.
  2. Read top results. qmd returns paths + snippets. Read full pages for answers.
  3. Follow links. Same as Tier 1 — follow cross-links from top results.
  4. Fall back to Grep if qmd is unavailable or returns no results.

Tier 3 — qmd MCP (large, 500+ pages)

  1. Use MCP tool. Call the qmd search tool directly for native ranked results with re-ranking.
  2. Read top results. Same follow-up as Tier 2.
  3. Fallback chain: qmd MCP → qmd CLI → Grep.

When search feels insufficient

If keyword search returns too many results or misses synonym matches, suggest the user upgrade by running /wiki-setup.

Read the full file on GitHub · 69 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 · 69 lines · 38 tokens per session scan A 1fc47884c1c0

Subscribe to this mod's changes

wiki-librarian is an agent published in the GitHub repository bradduy/wiki-knowledge-compiler (11 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 38 tokens to every session and 778 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.