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

  1. Open this directory as an Obsidian vault.
  2. Drop a source document into raw/.
  3. Run /ingest raw/your-file.md in Claude Code.
  4. 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/:

CommandWhat it does
/ingestProcess a source from raw/ — creates a source page, updates entity/concept pages, overview, index, and log
/queryAnswer a question using wiki content with [[wikilink]] citations; offer to file non-trivial answers as query pages
/lintAudit 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:

  1. Update the "Adapting this template" section in CLAUDE.md with domain-specific notes.
  2. Fill in wiki/overview.md with what the wiki is about.
  3. Start ingesting sources with /ingest.

Related

How to Install

  1. Download the ZIP or clone the repository
  2. Open the folder as a vault in Obsidian (File → Open Vault)
  3. Obsidian will prompt you to install required plugins

Stats

Stars

1

Forks

0

License

Unlicense

Last updated 3mo ago

Categories

Tags

obsidianobsidian-vaultobsidian-vault-templatesecond-brain