LLM Wiki
A personal knowledge base that builds and maintains itself.
Drop articles, notes, PDFs, or Reddit threads into a folder. Your AI reads everything, builds a structured wiki with cross-references, detects contradictions between sources, and keeps it all up to date โ automatically.
You just read and ask questions.
Inspired by Andrej Karpathy's LLM Wiki pattern. Extended with auto-discovery, Reddit scanning, GitHub tracking, and ready-made variants for common use cases.
Why not just use RAG?
| Traditional RAG | LLM Wiki |
|---|
| Knowledge | Re-retrieved fresh every query | Compiled once, maintained continuously |
| Cross-references | None | Built and maintained automatically |
| Contradictions | Not detected | Flagged immediately on ingest |
| Compounding | Flat | Grows richer over time |
| Infrastructure | Vector DB + embeddings | Just folders + markdown |
Quick Start
Option A โ Start with a ready-made variant (recommended)
Don't configure from scratch. Pick a variant that matches your use case โ config, schema, and demo data are pre-tuned:
git clone https://github.com/mduongvandinh/llm-wiki.git my-wiki
cd my-wiki
# Install skill (Claude Code only โ other tools skip this)
cp -r skills/llm-wiki ~/.claude/skills/llm-wiki
# Pick your variant:
/llm-wiki setup book-companion # ๐ Reading companion
/llm-wiki setup competitive-intel # ๐ฏ Track competitors
/llm-wiki setup job-search # ๐ผ Job search research
Option B โ Start from scratch
git clone https://github.com/mduongvandinh/llm-wiki.git my-wiki
cd my-wiki
cp config.example.yaml config.yaml
# Edit config.yaml: set your topics, keywords, feeds
Then drop content into raw/articles/ and run your first cycle.
Variants
Pre-configured templates for specific use cases. One command setup, includes demo data.
| Variant | Use Case | Key Command |
|---|
| ๐ | book-companion | Build a companion wiki as you read โ characters, timeline, factions, lore auto-extracted | book-summary ยท demo |
| ๐ฏ | competitive-intel | Track competitors, detect pricing/feature changes, generate battlecards | competitive-brief "Linear" |
| ๐ผ | job-search | Research target companies, prep interview 1-pagers | interview-prep "Stripe" |
โ See all variants โ
Using with Your AI Tool
LLM Wiki works with any AI coding assistant. The wiki is just folders and markdown โ the AI reads CLAUDE.md (or AGENTS.md) to understand the schema and rules, then operates on files.
Claude Code
The primary supported tool. Has a slash command skill for the best experience.
Install the skill:
cp -r skills/llm-wiki ~/.claude/skills/llm-wiki
Commands:
/llm-wiki setup book-companion # Set up a variant
/llm-wiki run # Full cycle: discover โ ingest โ lint
/llm-wiki ingest # Process new files in raw/
/llm-wiki query "What is X?" # Ask questions against the wiki
/llm-wiki discover # Auto-find new sources from the web
/llm-wiki lint # Health check: contradictions, orphans, gaps
/llm-wiki status # Overview of wiki state
/llm-wiki digest # Daily brief: new sources, insights, changes
/llm-wiki book-summary # Structured book summary (book-companion variant)
/llm-wiki competitive-brief "Name" # Battlecard for a competitor
/llm-wiki interview-prep "Company" # Interview prep 1-pager
Auto-run:
/loop 1h /llm-wiki run # Runs every hour in current session
/loop 2h /llm-wiki run # Every 2 hours
Cursor
Cursor reads AGENTS.md from the project root automatically. No installation needed.
Open the project in Cursor, then chat:
Follow AGENTS.md. Run full cycle: discover new sources, ingest into wiki, then lint.
Follow AGENTS.md. Ingest everything new in raw/ and update the wiki.
Follow AGENTS.md. Query the wiki: what do we know about [topic]?
Follow AGENTS.md. Run competitive-brief for "Linear" and save to outputs/.
GitHub Copilot (VS Code)
Copilot reads .github/copilot-instructions.md automatically when you open the project. No installation needed.
Open project in VS Code, then use Copilot Chat:
Read CLAUDE.md then run discover, ingest, and lint for this wiki.
Based on the wiki schema in CLAUDE.md, ingest the new files in raw/articles/.
Query the wiki: summarize everything we know about [topic].
Note: Copilot Chat doesn't support background loops. Run manually or use system scheduler.
Windsurf (Codeium)
Windsurf reads AGENTS.md or .windsurfrules from the project root.
Chat in Windsurf:
Read AGENTS.md. Run the full llm-wiki cycle: discover โ ingest โ lint.
Read AGENTS.md. I've added new files to raw/articles/. Please ingest them into the wiki.
Gemini CLI
Gemini CLI reads GEMINI.md from the project root (or falls back to AGENTS.md).
Create GEMINI.md (copy from AGENTS.md):
cp AGENTS.md GEMINI.md
Then run:
gemini "Read GEMINI.md and run full cycle: discover, ingest, lint"
gemini "Read GEMINI.md and query the wiki: what do we know about [topic]?"
Codex CLI (OpenAI)
Codex reads AGENTS.md from the project root.
codex "Read AGENTS.md and run full cycle: discover โ ingest โ lint"
codex "Read AGENTS.md and ingest new files in raw/"
codex "Read AGENTS.md and query: summarize the wiki on [topic]"
Aider
Aider works best with explicit file references.
aider --message "Read CLAUDE.md to understand the schema. Run ingest on all new files in raw/articles/. Update wiki/ accordingly." CLAUDE.md raw/articles/*.md
Continue.dev
Add CLAUDE.md to Continue's context, then chat:
@CLAUDE.md Ingest the new articles in raw/ and update the wiki with entities, concepts, and cross-references.
Tool Comparison
| Tool | Config File | Skill/Slash Command | Auto-loop | Best For |
|---|
| Claude Code | CLAUDE.md | โ
/llm-wiki | โ
/loop | Full experience, all features |
| Cursor | AGENTS.md | โ chat only | โ | IDE-integrated workflow |
| GitHub Copilot | .github/copilot-instructions.md | โ chat only | โ | VS Code users |
| Windsurf | AGENTS.md | โ chat only | โ | VS Code alternative |
| Gemini CLI | GEMINI.md | โ chat only | via cron | Google ecosystem |
| Codex CLI | AGENTS.md | โ chat only | via cron | OpenAI preference |
| Aider | CLAUDE.md | โ explicit | via cron | Terminal-only |
All tools use the same raw/, wiki/, outputs/ folder structure. The AI config file tells each tool how to operate โ same content, different filenames.
Auto-Run Without Claude Code
For tools without /loop, use your system scheduler.
Windows โ Task Scheduler (run once as Admin):
powershell -ExecutionPolicy Bypass -File "scripts/setup-scheduler.ps1"
macOS / Linux โ crontab:
# Claude Code (headless)
0 */2 * * * cd /path/to/my-wiki && claude --print "/llm-wiki run" >> outputs/auto-run.log 2>&1
# Codex
0 */2 * * * cd /path/to/my-wiki && codex "Read AGENTS.md and run full cycle" >> outputs/auto-run.log 2>&1
# Gemini CLI
0 */2 * * * cd /path/to/my-wiki && gemini "Read GEMINI.md and run full cycle" >> outputs/auto-run.log 2>&1
How It Works
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ YOU (read & ask) โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโค
โ wiki/ โ outputs/ โ wiki-viewer.html โ
โ (Obsidian) โ (reports) โ (browser view) โ
โโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโค
โ LLM (writes & maintains) โ
โโโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโค
โ discover โ ingest โ query โ lint โ
โ (find) โ (process)โ (answer) โ (health check) โ
โโโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโค
โ raw/ โ config.yaml โ CLAUDE.md โ
โ (sources) โ (settings) โ (schema/rules) โ
โโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโ
Main flow: discover โ raw/ โ ingest โ wiki/ โ query โ outputs/
Self-improvement loop: lint finds gaps โ discover finds sources โ ingest fills them โ wiki grows richer
Core Workflows
discover โ Searches the web for new sources based on your topics in config.yaml. Can scan Reddit for pain points, track GitHub trending repos, follow RSS feeds, and snowball from references found in existing sources.
ingest โ Reads each new file in raw/. Extracts entities, concepts, and key claims. Creates wiki pages. Adds cross-references. Flags contradictions with existing content. One source typically creates 5โ15 wiki pages.
query โ Reads wiki/INDEX.md, finds relevant pages, synthesizes an answer with citations. Valuable answers are automatically saved as synthesis pages.
lint โ Scans the entire wiki for: contradictions, orphan pages, broken links, stale claims, and knowledge gaps. Updates .discoveries/gaps.json so discover knows what to find next.
Adding Sources
Drop a file manually
Create a markdown file in raw/articles/ with frontmatter, then run ingest:
---
title: "Article Title"
url: "https://example.com/article"
author: "Author Name"
discovered: 2026-04-14
topic: "your topic"
---
Article content here...
For book notes (book-companion variant), add chapter: N:
---
title: "Dune Chapter 5 Notes"
chapter: 5
book: "Dune"
---
For competitor data (competitive-intel variant), add competitor: "Name":
---
title: "Linear โ Pricing Page"
competitor: "Linear"
---
Obsidian Web Clipper
- Install Obsidian Web Clipper browser extension
- See an interesting article โ click clip โ save to
raw/articles/
- Run ingest
Auto-discovery
Configure config.yaml with topics, Reddit subreddits, GitHub orgs, and RSS feeds โ the discover command handles the rest.
Viewing Your Wiki
Obsidian (recommended): File โ Open vault โ select your wiki folder โ Graph View shows connections
Browser: Open wiki-viewer.html โ mobile-first dark theme dashboard with graph view
Any markdown editor: All wiki pages are plain .md files
Folder Structure