LLM-Wiki-Boilerplate
A boilerplate for building personal knowledge bases using LLMs. Based on a concept and pattern from Andrej Karpathy.
LLM Wiki
A boilerplate for building personal knowledge bases using LLMs.
The concept and pattern are from Andrej Karpathy: gist.github.com/karpathy/442a6bf555914893e9891c11519de94f
Instead of retrieving from raw documents at query time (RAG), the LLM incrementally builds and maintains a persistent wiki — a structured, interlinked collection of markdown files. When you add a new source, the LLM reads it, extracts key information, and integrates it into the existing wiki: updating entity pages, revising topic summaries, flagging contradictions, and strengthening the evolving synthesis. The knowledge is compiled once and kept current, not re-derived on every query. The wiki keeps getting richer with every source you add and every question you ask.
Quick start
- Open this directory as an Obsidian vault.
- Drop a source document into
raw/. - Run
/ingest raw/your-file.mdin Claude Code. - Browse the results in
wiki/and the graph view.
Structure
raw/ # Your source documents — immutable, never modified by the LLM
wiki/ # LLM-maintained pages: entities, concepts, sources, queries
overview.md # High-level synthesis of everything in the wiki
entities/ # Pages for specific named things: people, orgs, places, products
concepts/ # Pages for ideas, themes, frameworks, topics
sources/ # One summary page per ingested source
queries/ # Filed answers to notable questions
index.md # Catalog of all wiki pages
log.md # Append-only operation log
CLAUDE.md # Schema and workflow instructions for the LLM
.claude/skills/ # Claude Code local skills (workflows)
Skills (slash commands)
This repo ships three Claude Code local skills in .claude/skills/:
| Command | What it does |
|---|---|
/ingest | Process a source from raw/ — creates a source page, updates entity/concept pages, overview, index, and log |
/query | Answer a question using wiki content with [[wikilink]] citations; offer to file non-trivial answers as query pages |
/lint | Audit the wiki for contradictions, orphans, stale claims, missing pages, index gaps, thin pages, and dead ends |
Skills are automatically available in any Claude Code session opened in this directory — no setup required.
Global wiki skill (optional)
.claude/wiki-global-skill.template.md is a template for creating a global Claude Code skill that lets you query this wiki from any directory. Fill in the placeholders and copy it to ~/.claude/skills/[project-name]-wiki/SKILL.md.
Forking for a new domain
Copy this repo, then:
- Update the "Adapting this template" section in
CLAUDE.mdwith domain-specific notes. - Fill in
wiki/overview.mdwith what the wiki is about. - Start ingesting sources with
/ingest.
How to Install
- Download the ZIP or clone the repository
- Open the folder as a vault in Obsidian (File → Open Vault)
- Obsidian will prompt you to install required plugins
Stats
Stars
1
Forks
0
License
Unlicense
Last updated 3mo ago
Categories
Tags