Hệ thống knowledge base cá nhân hoàn toàn tự động, vận hành bởi LLM. Dựa trên pattern LLM Wiki của Andrej Karpathy.
# Add to your Claude Code skills
git clone https://github.com/mduongvandinh/llm-wikiNo comments yet. Be the first to share your thoughts!
Based on votes and bookmarks from developers who liked this skill
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.
| | 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 |
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
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.
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" |
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.
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 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/.
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 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 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 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 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
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 | 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.
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
┌─────────────────────────────────────────────────┐
│ 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
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.
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"
---