Skip to main content
command CX Codex

wiki — Claude Code command: what it does, how to install

wiki is a Claude Code command that builds and maintains persistent research wikis. It stores markdown files, indexes them in SQLite FTS5, and retrieves context via BM25.

MIT ★ 2,966 updated 2026-09-29

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add rohitg00/pro-workflow
/plugin install pro-workflow@pro-workflow
Open on GitHub

What wiki does

The wiki command scaffolds markdown knowledge bases and manages them with subcommands like init, page, ask, and reindex. Page contents live in ~/.pro-workflow/wikis/ or inside project directories, while SQLite FTS5 stores shadow indexes in ~/.pro-workflow/data.db. When a new session starts, the tool automatically pulls the top three matching records.

Standard BM25 queries run locally without external credentials. Advanced features like vector embeddings and hybrid retrieval depend on an OpenAI or Voyage API key configured through the providers MCP server. The command also compiles interactive single-file HTML viewers and tracks auto-research seeds.

What it helps with

  • persist research context and notes across agent sessions
  • query structured documentation using SQLite FTS5 and BM25
  • render standalone HTML knowledge bases with link graphs
  • queue and execute automated research loops on specific topics

Example prompts for the agent

  • /wiki init agent-memory --title "Agent Memory" --flavor research
  • /wiki ask "what is episodic memory" --wiki agent-memory
  • /wiki view agent-memory --theme dark

How to install wiki

1Plugin marketplace

/plugin marketplace add rohitg00/pro-workflow
/plugin install pro-workflow@pro-workflow

2Manually: put the files in place

.claude/commands/wiki.md

Call it with /wiki. For all projects use ~/.claude/commands/

Questions about wiki

How to install wiki in Claude Code?

Run /plugin marketplace add rohitg00/pro-workflow and then /plugin install pro-workflow@pro-workflow in Claude Code.

What does the wiki command do?

It manages persistent markdown wikis, indexes documents into SQLite FTS5, and provides local BM25 or hybrid search across agent sessions.

What is required to run wiki?

Basic BM25 search works locally without credentials. Generating embeddings or running hybrid retrieval requires an OpenAI or Voyage API key routed through the providers MCP server.

Source text

wiki.md · MIT
---
description: Build, query, and maintain persistent research wikis
---

# /wiki — Persistent Research Wikis

Build, query, and maintain long-lived knowledge bases. Each wiki = markdown folder + SQLite FTS5 shadow index. Survives sessions, indexes auto-load on `SessionStart`.

## Subcommands

| Subcommand | Action |
|------------|--------|
| `/wiki init <slug> --title "X" [--flavor research] [--scope global\|project]` | Scaffold + register a new wiki |
| `/wiki list [--scope global\|project]` | List registered wikis |
| `/wiki info <slug>` | Show wiki metadata + page count |
| `/wiki page <slug> <rel-path> [--title "X"] [--type concept\|paper\|...]` | Upsert a markdown page into the FTS index |
| `/wiki reindex <slug>` | Walk `wiki/` and re-index all `*.md` |
| `/wiki ask "<query>" [--wiki <slug>] [--limit N]` | BM25 search over wiki pages |
| `/wiki related <slug> <rel-path>` | Find adjacent pages by reusing title+summary as query |
| `/wiki show <slug> <rel-path>` | Print a page from the index |
| `/wiki seed <slug> "<query>" [--depth 0]` | Enqueue a research seed |
| `/wiki research <slug> [--max-pages 5] [--budget-usd 0.50] [--fetchers web,arxiv,github]` | Run the auto-research loop |
| `/wiki seeds <slug> [--status pending\|active\|done\|failed]` | List queued seeds |
| `/wiki cancel <slug>` | Mark all pending/active seeds as failed |
| `/wiki status` | Cross-wiki seed counts + kill-switch state |
| `/wiki embed [<slug>] [--limit N]` | Compute embeddings for indexed pages (needs an explicitly configured OpenAI or Voyage key) |
| `/wiki hybrid "<query>" [--wiki <slug>]` | Hybrid retrieval: BM25 + vector + RRF |
| `/wiki council "<query>" --wiki <slug>` | Run llm-council; persist transcript as a wiki page |
| `/wiki survey --bundle <path> --wiki <slug>` | Generate literature survey from a research_bundle.json |
| `/wiki view <slug> [--out path] [--theme dark\|light]` | Render a single-file HTML viewer for the wiki (pages + sources + seeds + link graph + search) |

## Routes to skills

For `embed`, `hybrid`, `council`, `survey`, and `research` in a plugin session, use `run_provider_task` from the `providers` MCP server. Task names are `embeddings`, `council`, `survey`, and `research`. Pass the corresponding runner arguments, such as `{"task":"embeddings","args":["search","<query>","--mode","hybrid"]}` or `{"task":"embeddings","args":["all","<slug>"]}`. Plain `ask` and BM25-only search stay local and require no credentials. See [provider configuration](../references/provider-configuration.md).

- `init / list / info / page / reindex` → `wiki-builder`
- `ask / related / show / hybrid` → `wiki-query` (+ `embed-wiki.js` for hybrid)
- `seed / research / seeds / cancel / status` → `wiki-research-loop`
- `council` → `llm-council`
- `survey` → `survey-generator`
- `view` → `wiki-viewer`
- `embed` → `scripts/embed-wiki.js`

## Storage

- **Global** (default): `~/.pro-workflow/wikis/<slug>/`
- **Project**: `<project>/.claude/wikis/<slug>/` via `--scope project`

Both indexed in `~/.pro-workflow/data.db`.

## Flavors

`research`, `paper`, `domain`, `product`, `person`, `organization`, `project`, `codebase`, `incident`. See wiki-builder skill for layout per flavor.

## Examples

```
/wiki init agent-memory --title "Agent Memory" --flavor research
/wiki page agent-memory wiki/concepts/episodic-memory.md --type concept
/wiki ask "what is episodic memory" --wiki agent-memory
/wiki related agent-memory wiki/concepts/episodic-memory.md
```

## Auto-research (Phase 3.3.1+)

Loop is opt-in per-wiki via `wiki.config.md`:

```yaml
auto_research:
  enabled: true
  max_pages_per_run: 5
  max_depth: 3
  budget_usd: 0.50
```

Phase 3.3.0 ships the index + manual page workflow. Loop driver lands next.

## Cited recall

Every answer that uses a wiki hit must cite as:

```
[wiki:<slug>] <Title> — `<rel_path>`
```

No paraphrase without citation.

## Related

- `/learn` (and `learn-rule`) accepts `--wiki <slug>` to scope a learning rule to one wiki.
- SessionStart auto-loads top-3 wiki hits when prompt matches indexed content.

© Rohit Ghumare · MIT · rohitg00/pro-workflow

Similar slash commands

All slash commands for Agent setup: memory, context, orchestration →

From the same set83

The whole set →
context-optimizer context-optimizer controls token consumption and frees context in Claude Code. Use it when agent sessions slow down, forget instructions, or approach budget limits. CX Codex +1 ★ 2,966repo stars deslop deslop trims unnecessary code from the current branch diff and checks SKILL.md files. Run it before committing or reviewing a skill for release. CX Codex +1 ★ 2,966repo stars wiki-builder wiki-builder is a Claude Code skill that creates a structured knowledge base from Markdown pages and an FTS5 index in SQLite. It persists between sessions and is queryable by the agent. CX Codex +1 ★ 2,966repo stars token-efficiency token-efficiency cuts conversational fluff, caps tool executions per task, and stops Claude Code from repeatedly editing working implementations. CX Codex +1 ★ 2,966repo stars wiki-viewer wiki-viewer writes a pro-workflow wiki out as a single HTML file with pages, sources, claims, a seed queue, a link graph and search. Useful for handing research state to someone else. CX Codex +1 ★ 2,966repo stars llm-council llm-council runs multi-model deliberation in three stages: parallel drafts, anonymous peer rankings, and final synthesis by a designated chairman. CX Codex +1 ★ 2,966repo stars design-engineering The design-engineering skill guides interface animation choices and UI reviews. Use it when refining a component, transition, modal, or other interactive state. CX Codex +1 ★ 2,966repo stars permission-tuner The permission-tuner skill reads permission prompts and auto mode denials from your session logs, then suggests permission rules and autoMode entries to reduce interruptions. CX Codex +1 ★ 2,966repo stars

Project sponsors

Companies that keep this analytics open