wiki-setup

A setup command for configuring a project wiki based on how large its knowledge base is. It chooses between simple text search and the qmd search tool.

In plain words
What is it for?
Choosing a small, medium, or large configuration; setting the search backend; checking for qmd; and installing or configuring it when needed.
Why use it?
It gives the wiki an appropriate search method instead of making every project use the same setup.

Command for Claude Code

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

Made for: Claude Code.

Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,236 The whole file, excluding the scripts and references it only reads on demand.
Security scan E 4 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.00016 $0.04236
Opus 5 $0.00008 $0.02118
Sonnet 5 $0.00003 $0.00847
Haiku 4.5 $0.00002 $0.00424

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

Security

Grade E, and why

wiki-setup scanned grade E with 4 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- apt: `sudo apt update && sudo apt install -y nodejs npm`

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

- Run: `curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash`

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- macOS: `~/.claude/settings.json`

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- Run: `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"`
.claude/commands/wiki-setup.md · 396 lines

How it starts

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

Wiki Setup

Guide the user through initial wiki configuration. This determines the search strategy and tooling.

Procedure

Step 1: Ask about project size

Present this to the user:

Welcome to wiki-knowledge-compiler setup!

How large is (or will be) the knowledge base you're building?

1. Small  — A handful of documents, personal notes, one project
2. Medium — Multiple projects, a research area, growing collection
3. Large  — Hundreds of sources, cross-domain, comprehensive

Enter 1, 2, or 3:

Step 2: Configure based on choice

If Small (1):

  1. Set .data/wiki.config.mdsize: small, backend: grep
  2. No additional tools needed
  3. Tell the user: ✓ Configured for small project. Search uses built-in Grep. Works well up to ~100 pages. Run /wiki-setup again if you outgrow it.

If Medium (2) or Large (3) — auto-install qmd:

These sizes use qmd for smarter search. Follow this sequence:

  1. Check if qmd is already installed by running which qmd (or where qmd on Windows).

  2. If qmd is already installed, skip ahead to step 6 (Configure qmd).

  3. If qmd is not installed, check for a JS runtime. Run these checks in order and use the first one found:

    • which bun → use bun
    • which npm → use npm
    • If one is found, skip to step 5 (Install qmd).
  4. If no JS runtime is found, install one automatically based on the OS. Detect the platform by running uname -s (or checking the environment on Windows):

    macOS (Darwin):

    • Check for Homebrew: which brew
    • If brew does not exist, install it first:
      • Tell the user: Installing Homebrew (macOS package manager)...
      • Run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
      • Verify: which brew
      • If brew still not found, check if it needs to be added to PATH (Apple Silicon installs to /opt/homebrew/bin/):
        • Run: eval "$(/opt/homebrew/bin/brew shellenv)" and try which brew again
      • If still fails: tell the user Could not install Homebrew. and fall back to Grep.
    • Now install Node: run brew install node
    • Verify: which npm

Read the full file on GitHub · 396 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 · 396 lines · 16 tokens per session scan E 198f1115ec47

Subscribe to this mod's changes

wiki-setup is a command published in the GitHub repository bradduy/wiki-knowledge-compiler (11 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 16 tokens to every session and 4,236 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it E with 4 findings (asks for root, downloads and executes remote code, reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.