wiki

wiki is a command for coding agents from hainamchung/agent-assistant. It costs 16 tokens per session (1,651 once invoked), scanned A, original, MIT.

A command for generating a structured, AI-readable wiki from a codebase, with different levels of documentation depth.

In plain words
What is it for?
Use it to create fast, comprehensive, or team-oriented project documentation, including indexes and knowledge graphs.
Why use it?
It reduces the manual effort needed to explain a codebase and preserve its structure and relationships for a team.

Command

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/hainamchung/agent-assistant/wiki
Clone the repo
git clone --depth 1 https://github.com/hainamchung/agent-assistant

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/hainamchung/agent-assistant/wiki.svg)](https://agentmods.dev/commands/hainamchung/agent-assistant/wiki)
Your own site
<a href="https://agentmods.dev/commands/hainamchung/agent-assistant/wiki"><img src="https://agentmods.dev/badge/commands/hainamchung/agent-assistant/wiki.svg" alt="Measured on agentmods" height="20"></a>
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 1,651 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.00016 $0.01651
Opus 5 $0.00008 $0.00826
Sonnet 5 $0.00003 $0.00330
Haiku 4.5 $0.00002 $0.00165

Measured yesterday against content hash 1554c95298b0, 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 yesterday.

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.md · 188 lines

How it starts

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

/wiki — Wiki Generation Suite

MISSION: Generate a comprehensive, AI-consumable .wiki documentation suite from a codebase. Uses the llm-wiki skill as the foundation engine. Three quality tiers: fast (essential), hard (comprehensive), team (Golden Triangle perfection).

$ARGUMENTS


🛑 PRE-FLIGHT (DO FIRST — BLOCKS ALL VARIANTS)

LOAD now (in order; path ./rules/ or ~/.{TOOL}/skills/agent-assistant/rules/):

  1. CORE.md — Identity, Laws, Routing
  2. PHASES.md — Phase Execution
  3. AGENTS.md — Tiered Execution
  4. TEAMS.md — Golden Triangle (for :team variant)
  5. WIKI.md — Wiki Awareness evaluation protocol
  6. ~/.{TOOL}/skills/llm-wiki/SKILL.md — Wiki engine commands

⛔ Do not run any wiki variant until all are loaded. Follow all rules in those files; they override any conflicting instructions.

Wiki Engine: All wiki generation is powered by @skills/llm-wiki/. The skill's scripts handle source ingestion, page compilation, index management, and knowledge graph generation. Read ~/.{TOOL}/skills/llm-wiki/SKILL.md before any wiki operation.


🔀 VARIANT SELECTION

Upon receiving a /wiki command, assess scope and select the appropriate variant:

Fast: /wiki:fast

When to use: Small-to-medium projects (< 20 source files), new codebase, or initial wiki bootstrap.

Triage:

  • Quick codebase scan
  • Essential entity extraction (functions, classes, modules)
  • Summary pages only
  • 3-5 page wiki output

Phases: 2 (Extract → Compile)

Hard: /wiki:hard

When to use: Medium-to-large projects, existing codebase needing thorough documentation, or when completeness is required.

Triage:

  • Deep codebase analysis (architecture, patterns, integration points)
  • Comprehensive entity extraction across all layers
  • All wiki page types (summaries, entities, concepts, comparisons, decisions)
  • 15-25 page wiki output

Phases: 5 (Deep Scout → Extract & Structure → Plan Wiki Generation → Execute Generation → Review & Refine)

Read the full file on GitHub · 188 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. yesterday First seen · 188 lines · 16 tokens per session scan A 1554c95298b0

Subscribe to this mod's changes

wiki is a command published in the GitHub repository hainamchung/agent-assistant (54 stars, last pushed 3mo ago), licensed MIT. It adds 16 tokens to every session and 1,651 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-09-03.