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
/plugin marketplace add rohitg00/pro-workflow
/plugin install pro-workflow@pro-workflowWhat 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-workflow2Manually: put the files in place
.claude/commands/wiki.mdCall it with /wiki. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/wiki.mdCall it with /prompts:wiki. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/wiki.prompt.mdManually: put the files in place
.gemini/commands/wiki.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
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