Karpathy LLM Wiki
Add a persistent, self-maintaining wiki knowledge base to a NanoClaw group, based on Karpathy's LLM Wiki pattern.
What it does
- Turns a NanoClaw group into a disciplined wiki maintainer
- Three-layer design: raw sources, generated wiki, schema
- Ingest, query, and lint operations for growing a knowledge base
- index.md catalog and append-only log.md for navigation
- One-source-at-a-time ingestion for deep integration
- Optional weekly or monthly wiki health checks
What you'll need
- NanoClaw installed and running
- A group to host the wiki (existing main group or a new dedicated one)
Install
/add-karpathy-llm-wiki How it works
The /add-karpathy-llm-wiki skill sets up a persistent knowledge base on a NanoClaw group, following the LLM Wiki pattern written by Andrej Karpathy. Instead of re-deriving answers from raw documents on every question the way RAG does, the agent incrementally builds and maintains a structured, interlinked markdown wiki that sits between you and your sources. Knowledge compiles once and stays current.
The system has three layers. Raw sources are the immutable documents you collect — articles, papers, PDFs, images, transcripts — which the agent reads but never edits. The wiki is the agent-owned collection of summaries, entity pages, concept pages, and syntheses, kept cross-referenced and consistent. The schema lives in the group’s CLAUDE.md and is what transforms the agent from a generic chatbot into a wiki maintainer.
Three operations run against it. Ingest drops a new source in and the agent reads it, discusses takeaways, and updates every affected page — a single source can touch 10 to 15 pages. Query searches the wiki and synthesizes cited answers that can be filed back as new pages. Lint periodically health-checks the wiki for contradictions, stale claims, orphan pages, and missing cross-references.
Setup
The skill is interactive and collaborative. It first has Claude Code read the full pattern and summarize it, then walks through:
- Choose a group — add the wiki to your main chat, create a dedicated group, or pick an existing one. A dedicated group is registered with
pnpm exec tsx setup/index.ts --step register. - Design together — decide the wiki’s domain, the source types you’ll add, and how much structure you want. Nothing is over-prescribed; the pattern leaves conventions open.
- Scaffold — create
wiki/andsources/directories withmkdir -p, seedwiki/index.mdandwiki/log.md, write a tailoredcontainer/skills/wiki/SKILL.md, and add a wiki section to the group CLAUDE.md wrapped in<!-- BEGIN karpathy-llm-wiki -->marker comments. - Check source handling — confirm the agent can process your planned formats, pulling in
/add-image-vision,/add-pdf-reader, or/add-voice-transcriptionif a capability is missing. - Optional lint schedule — set up weekly or monthly health checks via the
schedule_taskMCP tool, or skip and lint manually. - Restart — reload the service, then test by sending a source to the wiki group.
Every step is safe to re-run: directories use mkdir -p, existing wiki files are never clobbered, the container skill is preserved unless you opt to update it, and the CLAUDE.md section is replaced in place via its markers rather than duplicated.
Tips
- Ingest discipline is the point. When you hand the agent many files or a folder, it processes them one at a time — reading, discussing, and fully integrating each before the next. Batch-reading everything at once produces shallow, generic pages.
- URLs need full text, not summaries.
WebFetchreturns a summary, so for source ingestion the agent downloads the full document instead, e.g.curl -sLo sources/filename.pdf "<url>", or opens webpages withagent-browserto extract full content. - The
log.mdfile is append-only and grep-friendly — entries prefixed like## [2026-04-02] ingest | Titlemakegrep "^## \[" log.md | tail -5show recent activity. - The index-first approach works well at moderate scale (~100 sources, hundreds of pages) without any embedding-based RAG infrastructure.