/llm-wikiSet up or operate a general-domain LLM Wiki (Karpathy pattern) — a persistent, LLM-maintained markdown knowledge base for research, personal knowledge management, book reading, course notes, competitive analysis, or any non-product domain.
Use /llm-wiki for any general-domain knowledge management need that is not tied to building a product. It applies the Karpathy wiki pattern with a flat raw/ directory and page categories of wiki/topics/ and wiki/decisions/.
Trigger phrases (from SKILL.md):
"set up an LLM wiki""apply the Karpathy wiki pattern""build a persistent knowledge base""ingest into the wiki""create a topic page""draft a document from the wiki""lint the wiki"llm-wiki/ directory with raw/, wiki/, drafts/ layersInvoke as a slash command. The skill routes to Setup, Operate, or Repair automatically based on the state of llm-wiki/:
/llm-wiki
The skill determines which mode to run:
llm-wiki/ directory exists → runs Setup (Step 1): creates the full directory tree, copies templates, adapts schema.md to the project, and offers pointer injection into CLAUDE.md/AGENTS.md.llm-wiki/ exists and is complete (contains schema.md and full layer tree) → runs the requested Operation (Step 2): ingest, create topic page, draft, query, lint, archive, evolve schema, or watcher commands.llm-wiki/ exists but is incomplete → runs Repair (Step 1b): fills in missing pieces without overwriting existing files.Operations available once the wiki is set up:
ingest — read a source, update wiki pages, update index.md, append to log.mdcreate a topic page — synthesize a wiki/topics/<name>.mddraft a document — write a drafts/<name>.mdquery — read index.md, find pages, synthesize answer with citationslint — health-check the wiki (orphans, missing citations, contradictions)watcher on / watcher off — enable/disable and start/stop the filesystem watcher for raw/ (desired state persists across restarts)watcher — report watcher liveness plus the files that need ingesting, and offer to ingest them. Ingest state is owned by a script ledger (catalog.py) that diffs raw/ into new / changed / current / missing; the watcher is opt-in observability only.Illustrative example
Input:
/llm-wiki
Set up an LLM wiki for my machine learning research project.
Output / Result:
No llm-wiki/ directory found. Running Setup (Step 1).
Created:
llm-wiki/
karpathy-llm-wiki.md ← reference copy
schema.md ← adapted to project (docs/ and papers/ detected as external roots)
index.md
log.md
raw/
wiki/
overview.md
glossary.md
topics/
decisions/
drafts/
Detected external documentation roots:
| Path | Note |
|-----------|----------------------------------------------------------|
| docs/ | Read-only literature corpus — cite as docs/<f>. |
| papers/ | Research papers — read for context, never modify. |
Log entry appended: [2026-06-05] init | wiki created | schema.md, index.md, wiki/overview.md, wiki/glossary.md
Offer: Inject llm-wiki pointer into CLAUDE.md? (yes/no)
Illustrative example
Input:
/llm-wiki
Ingest this paper abstract into the wiki as a topic page on "attention mechanisms":
[paste of paper abstract on transformer attention]
Output / Result:
Running Operation: Ingest
1. Saved raw source to: llm-wiki/raw/attention-mechanisms-vaswani-2017.md
(Provenance header added: source = "pasted abstract", date = 2026-06-05)
2. Updated wiki page: llm-wiki/wiki/topics/attention-mechanisms.md
- Added section: "Scaled dot-product attention (Vaswani et al., 2017)"
- No conflicts detected with existing content.
3. Updated index.md: added entry for "attention mechanisms"
4. Appended to log.md:
## [2026-06-05] ingest | attention-mechanisms-vaswani-2017.md | wiki/topics/attention-mechanisms.md
Next recommended operation: query or lint to verify the wiki state.