Skip to content
Documentation
Command

/wiki-init

Interactive, conversational setup for a new knowledge base wiki. One question at a time, multiple choice when possible.

BOOST
From plugin
llm-wiki-compiler
32812 skills12 commands
Install
> /plugin marketplace add ussumant/llm-wiki-compiler
> /plugin install llm-wiki-compiler@llm-wiki-compiler

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/wiki-init

Context preview

What this command does when you run it.

Interactive, conversational setup for a new knowledge base wiki. One question at a time, multiple choice when possible.

Command definition

wiki-init.md

Initialize Knowledge Base Wiki

Interactive, conversational setup for a new knowledge base wiki. One question at a time, multiple choice when possible.

**Arguments:**

  • (none) — auto-detects whether this is a codebase or knowledge project (see Auto-Detection below)
  • `--codebase` — force codebase mode (skip auto-detection)
  • `--knowledge` — force knowledge mode (skip auto-detection)

Instructions

**Important:** Ask ONE question per message. Wait for the user's response before moving to the next question. Never batch multiple questions. Keep the tone conversational — like a knowledgeable colleague setting things up for you.

---

Auto-Detection (when no flag is provided)

Before asking any questions, scan the project root to determine the mode:

1. **Check for code manifest files:** `package.json`, `go.mod`, `Cargo.toml`, `pyproject.toml`, `requirements.txt`, `Gemfile`, `*.sln`, `Package.swift`, `pom.xml`, `build.gradle` 2. **Check for markdown-heavy directories:** `Knowledge/`, `docs/`, `notes/`, `content/`, `meetings/`, `research/`, or any directory with 10+ `.md` files

**Decision logic:**

  • **Manifest found, no markdown directories** → codebase mode
  • **Markdown directories found, no manifest** → knowledge mode
  • **Both found** → ask the user:
  I see both code files and markdown knowledge directories here.
  
  A) Codebase wiki — compile a wiki about this codebase's architecture, decisions, and patterns
  B) Knowledge wiki — compile a wiki from your markdown files (meetings, notes, research)
  • **Neither found** → ask the user what they want to compile

Then proceed to the appropriate mode below.

---

Codebase Mode (`--codebase` or auto-detected)

When codebase mode is selected, use this streamlined flow instead of the standard 10-step process.

Codebase Step 1: Check for existing config

Same as standard Step 1 — check for `.wiki-compiler.json` and ask to reconfigure or abort.

Codebase Step 2: Auto-detect everything

Scan the project root and build a complete picture in one pass:

1. **Detect project type** by looking for manifest files:

  • `package.json` → Node.js/TypeScript
  • `go.mod` → Go
  • `Cargo.toml` → Rust
  • `pyproject.toml` / `requirements.txt` → Python
  • `Gemfile` → Ruby
  • `*.sln` → .NET
  • `Package.swift` → Swift
  • `pom.xml` / `build.gradle` → Java/Kotlin
  • Multiple manifests in subdirectories → Monorepo

2. **Discover topic candidates:**

  • Monorepo: each directory with its own manifest = a topic
  • Single project: major subdirectories under `src/`, `lib/`, `app/`, or root = topics
  • Cross-cutting topics: `infrastructure` (if Docker/CI exists), `testing` (if test dirs exist), `deployment` (if k8s/deploy scripts exist)

3. **Count knowledge files** matching default patterns:

  • `README.md`, `CLAUDE.md`, `ARCHITECTURE.md`, `CONTRIBUTING.md`
  • `*.proto`, `*.graphql`, `openapi.*`
  • `ADR-*.md`, `docs/adr/*.md`
  • `docker-compose.yml`, `Dockerfile`
  • `CHANGELOG.md`, `.env.example`

4. **Auto-detect project name** from `package.json` `name` field, `go.mod` module name, directory name, or git remote.

Codebase Step 3: One confirmation prompt

Present everything in a single confirmation:

📚 I see a {project_type} project with {N} modules and {M} knowledge files.

  Topics: {topic1}, {topic2}, {topic3}, ...
  Sections: Purpose, Architecture, Talks To, API Surface, Data, Key Decisions, Gotchas
  Output: wiki/

A) Looks good — create config and compile now (recommended)
B) Customize — let me adjust topics, sections, or settings
C) Not now

If A: create config (Codebase Step 4) and immediately run `/wiki-compile`. If B: fall through to the standard interactive flow (Step 2 onwards) but with codebase defaults pre-filled. If C: exit.

Codebase Step 4: Create configuration

Write `.wiki-compiler.json`:

{
  "version": 2,
  "mode": "codebase",
  "name": "{auto_detected_name}",
  "sources": [
    { "path": "./", "exclude": ["node_modules/", "dist/", ".git/", "wiki/", "vendor/", "__pycache__/", ".build/", "target/", ".next/", "coverage/"] }
  ],
  "output": "wiki/",
  "service_discovery": "auto",
  "knowledge_files": [
    "README.md", "CLAUDE.md", "AGENTS.md", "ARCHITECTURE.md", "CONTRIBUTING.md",
    "*.proto", "*.graphql", "openapi.yaml", "openapi.json",
    "ADR-*.md", "docs/adr/*.md",
    "docker-compose.yml", "Dockerfile",
    ".env.example", "CHANGELOG.md"
  ],
  "deep_scan": false,
  "auto_update": "prompt",
  "article_sections": [
    { "name": "Purpose", "description": "What this module/service does and who depends on it", "required": true },
    { "name": "Architecture", "description": "Key files, structure, entry points" },
    { "name": "Talks To", "description": "Dependencies, communication patterns, inter-service calls" },
    { "name": "API Surface", "description": "Endpoints, exported functions, or interfaces exposed" },
    { "name": "Data", "description": "Tables, collections, queues, caches, state owned" },
    { "name": "Key Decisions", "description": "Why it was built this way, from ADRs and READMEs" },
    { "name": "Gotchas", "description": "Known issues, edge cases, failure modes" },
    { "name": "Sources", "description": "Backlinks to all contributing files", "required": true }
  ],
  "link_style": "markdown"
}

Codebase Step 5: Create output directory and compile

1. Create `wiki/`, `wiki/topics/`, `wiki/concepts/` directories 2. Create empty `wiki/.compile-state.json` 3. Create empty `wiki/log.md` 4. Run the wiki-compiler skill (all 6 phases including CONTEXT.md generation) 5. Show the first-compile summary with topic tree

Codebase Step 6: Done

📚 Wiki compiled — {N} topics from {M} files

  Topics created:
  ├── {topic1} ({count} sources) — {one-line description}
  ├── {topic2} ({count} sources) — {one-line description}
  └── {topic3} ({count} sources) — {one-line description}

  Concepts discovered:
  └── {concept1} — {description}

  Brows
Read more
Ships withllm-wiki-compiler

A Claude Code and Codex-compatible plugin that compiles knowledge into a topic-based wiki — from scattered markdown files or entire codebases. Reduce context costs by ~90% and give your agent a synthesized understanding of any project. Documentation

Get the whole plugin

Other commands on llm-wiki-compiler.