A Claude skill that implements Karpathy's LLM Wiki pattern — a persistent, Claude-maintained knowledge base for any project.
Instead of re-deriving knowledge every session, Claude builds and maintains a structured markdown wiki that grows with every source you add and every question you ask. Cross-referenced. Contradiction-aware. Always in sync with your project.
Based on the LLM Wiki pattern by Andrej Karpathy.
Most people's experience with LLMs and documents is retrieval: you ask, the model searches, it answers. Nothing accumulates. Ask a question that requires synthesizing five sources and the model pieces it together from scratch — every time.
The wiki pattern is different. Claude doesn't just retrieve — it maintains. When you add a source, Claude reads it, extracts key information, and integrates it into an existing wiki: updating entity pages, revising summaries, flagging contradictions. The knowledge is compiled once and kept current, not re-derived on every query.
The wiki is a persistent, compounding artifact. The cross-references are already there. The contradictions have been flagged. The synthesis reflects everything that's been read.
wiki/
├── index.md ← catalog of all pages (Claude reads this first)
├── log.md ← append-only operation log
├── sources/ ← one summary page per ingested document
├── entities/ ← people, projects, products, places
├── concepts/ ← ideas, themes, technical terms
└── queries/ ← saved answers to important questions
raw/
└── inbox/ ← drop new documents here for ingestion
Claude owns the wiki/ directory entirely. You own the curation, exploration, and questions. Claude handles the summarizing, cross-referencing, filing, and consistency maintenance.
Clones the skill with all reference files and domain templates:
git clone https://github.com/bellins14/wiki-skill ~/.claude/skills/wikiCopies only SKILL.md. The skill works standalone; reference files add richer behavior:
mkdir -p ~/.claude/skills/wiki
curl -sSL https://raw.githubusercontent.com/bellins14/wiki-skill/main/SKILL.md \
-o ~/.claude/skills/wiki/SKILL.mdIn a Claude Code session:
Install the wiki skill from github.com/bellins14/wiki-skill
After installation, open a project in Claude Code and run:
/wiki init
Claude will auto-detect your project context and set everything up.
| Command | Description |
|---|---|
/wiki init |
Initialize wiki (auto-detects context, minimal questions) |
/wiki ingest [doc?] |
Ingest a document from inline, file path, or raw/inbox/ |
/wiki query <question> |
Query the wiki; answer includes wiki citations |
/wiki lint |
Health check: orphans, contradictions, stale pages, gaps |
/wiki update |
Sync wiki with current project state (git log, file changes, decisions) |
Note: Only
/wikiis registered as a slash command. Subcommands are passed as arguments:/wiki init,/wiki ingest, etc.
/wiki init is designed to require zero configuration in most projects. Claude reads your existing files (README, CLAUDE.md, package.json, etc.) and infers everything it needs:
- Project name — from package.json, pyproject.toml, or README
- Domain — from file structure signals (notebooks → research, chapter files → reading, etc.)
- Language — from README and existing content
If context is insufficient, Claude asks a single question with a sensible default.
The skill appends a wiki configuration block to your project's CLAUDE.md:
- CLAUDE.md exists → appends at the end
- CLAUDE.md doesn't exist → runs
claude initfirst, then appends
The block is wrapped in <!-- wiki-skill:begin --> / <!-- wiki-skill:end --> markers so it can be found and updated during re-init without duplication.
/wiki update keeps the wiki consistent with your project as it evolves. It:
- Reads
git logfor recent commits (if git is available) - Checks for files modified since the last wiki log entry
- Scans recent conversation context for decisions and status changes
- Identifies what's changed but not yet reflected in the wiki
- Updates affected pages, reports what changed
Run it periodically or after a batch of significant work.
The skill ships with templates for four project types:
| Domain | Detected from |
|---|---|
| research | .ipynb, papers/, .bib, notebooks/ |
| reading | chapters/, books/, book-like markdown structure |
| personal | journal/, diary/, personal README tone |
| business | Everything else (default) |
Each domain pre-configures appropriate entity types, page templates, and wiki structure.
- Obsidian pairs well with this wiki — open the
wiki/directory as a vault to get the graph view, backlinks, and Dataview queries over page frontmatter. - Obsidian Web Clipper converts web articles to markdown. Drop clipped articles in
raw/inbox/and run/wiki ingest. - The
wiki/log.mdis grep-friendly:grep "^## \[" wiki/log.md | tail -10returns the last 10 operations. - Saved
/wiki queryanswers become first-class wiki pages — your explorations compound just like ingested sources. - The
wiki/directory is just a git repo of markdown files. Version history, branching, and collaboration come for free.
wiki-skill/
├── SKILL.md ← main skill (sufficient for minimal install)
├── references/
│ ├── commands.md ← extended command docs and edge cases
│ ├── setup.md ← setup flow and CLAUDE.md merge logic
│ ├── claude-md-template.md ← the wiki block appended to CLAUDE.md
│ └── domains/
│ ├── research.md ← research wiki templates
│ ├── reading.md ← reading/book wiki templates
│ ├── personal.md ← personal knowledge base templates
│ └── business.md ← business/general wiki templates
├── README.md
└── LICENSE
This skill is a direct implementation of the LLM Wiki pattern by Andrej Karpathy. The core ideas — persistent wiki over RAG, LLM as maintainer not just retriever, compounding knowledge artifacts — are all his.
MIT — see LICENSE.