Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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/:

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:

  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.

About

A boilerplate for building personal knowledge bases using LLMs. Based on a concept and pattern from Andrej Karpathy.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors