llm-wiki
An autonomous knowledge base that grows as you work.
LLM Wiki is a Claude Code plugin that captures research, ideas, and decisions into an interlinked wiki with semantic search, automatic research, and a Wikipedia-style web UI. Knowledge compounds over time — the more you use it, the smarter it gets.
Inspired by Andrej Karpathy's LLM Wiki pattern: raw sources are immutable, the LLM maintains the wiki layer, and a schema governs behavior.
Core Features
Knowledge Management
- Automatic capture — saves research, ideas, decisions, and findings to the wiki as you work
- Smart retrieval with research-on-miss — checks wiki first, automatically researches and ingests if not found
- Full-text search — TF-IDF keyword search with content-aware scoring and snippet extraction
- Block references & transclusion —
[[page#heading]] links and ![[page#section]] embeds
- Backlink panel with automatic unlinked mention detection
- Frontmatter query language — Dataview-like queries:
SELECT title, type FROM pages WHERE confidence = "high"
- Intelligent freshness — 9-tier staleness system from
live (15 min) to permanent (never expires)
Research-on-Miss
- Automatic research —
/wiki-read researches topics not in the wiki using available tools
- Tool discovery — works with whatever tools the user has (WebSearch, WebFetch, Wikipedia API, MCP tools)
- Auto-ingestion — saves findings to wiki with proper citations
Web UI Features
- Wikipedia-style browsable website with 4 themes (light, dark, terminal, wikipedia)
- Interactive knowledge graph (Cytoscape.js) with multiple layouts, clustering, and neighborhood highlighting
- Canvas/whiteboard view for spatial page arrangement
- Split-pane markdown editor with live preview and AI assist
- Live research — click any red link to auto-research the topic
- Spaced repetition review interface (FSRS-based scheduling)
- Content gap analysis dashboard
- WebSocket chat sidebar with RAG-augmented Q&A
Maintenance & Health
- Self-maintaining — lints broken links, merges duplicates, upgrades confidence, flags stale content
- Daily notes and journal workflows
- Smart caching with adaptive TTL and stale-while-revalidate
- Circuit breakers for external API resilience
- Git integration with auto-commit, attribution, and undo
How It Works
The wiki operates in a simple cycle: when you ask a question, it first checks its knowledge base. If found, it returns a cited answer. If not found, it automatically researches the topic, ingests the findings, and provides an answer—all without breaking your workflow.
sequenceDiagram
User->>wiki-reader: /wiki-read "What is X?"
wiki-reader->>wiki-index: Check knowledge base
alt Found in wiki
wiki-index-->>wiki-reader: Page exists
wiki-reader->>User: Cited answer from wiki
else Not found
wiki-index-->>wiki-reader: No results
wiki-reader->>search-orchestrator: Research needed
search-orchestrator->>search-channel: Fan out queries (web, academic, code, docs)
search-channel->>research-processor: Raw search results
research-processor->>wiki-writer: Processed findings
wiki-writer->>wiki-pages: Create/update page
wiki-writer->>User: Cited answer with new page
end
Quick Start
Installation
-
Install the plugin:
claude plugin install ./llm-wiki
Or copy manually:
cp -r llm-wiki .claude/plugins/
-
Restart Claude Code — dependencies install automatically on first session.
First Commands
Start using the wiki immediately with any of these:
| Command | Purpose |
|---|
/wiki-write https://example.com/article | Ingest a web page |
/wiki-read "What is transformer attention?" | Ask — researches if not in wiki |
/wiki-serve | Browse the wiki at localhost:8420 |
/wiki-maintain | Health check and optimization |
Dependencies
Core dependencies (fastapi, uvicorn, mcp, etc.) are installed automatically via the plugin's SessionStart hook. For optional enhanced features:
pip install trafilatura # fallback content extraction
pip install numpy sqlite-vec # vector search and caching
Skills Reference
/wiki-write — Add or Update Content