llm-wiki

Build Karpathy's LLM Wiki with Claude Code. Two-layer cache architecture (L1/L2). Supports Logseq and Obsidian.
graph TB
subgraph "Every Session — Auto-loaded"
L1[L1: Claude Memory]
L1R[Rules & Gotchas]
L1I[Identity & Preferences]
L1C[Credentials]
L1 --> L1R
L1 --> L1I
L1 --> L1C
end
subgraph "On Demand — /llm-wiki query"
L2[L2: Wiki]
L2P[Projects & History]
L2W[Workflows & Processes]
L2K[Research & Learning]
L2 --> L2P
L2 --> L2W
L2 --> L2K
end
NEW[New Knowledge] --> ROUTE{Quick rule?}
ROUTE -->|Yes| L1
ROUTE -->|No| L2
USER[User Query] --> CLAUDE[Claude Code]
CLAUDE --> L1
CLAUDE -->|Deep question| L2
What is this?
Your wiki after a few ingests — interconnected knowledge pages in Logseq's graph view.
In April 2026, Andrej Karpathy published a gist called "LLM Wiki" that got 5,000+ stars in days. The idea: let an LLM maintain a structured, cross-referenced wiki for you. Feed it raw sources, it extracts facts, links them together, and keeps everything consistent. The wiki becomes a persistent, compounding artifact instead of a graveyard of stale notes.
Everyone loved the concept. Almost nobody built one. The gist describes what to build, not how to wire it up with real tools, real files, and real workflows. llm-wiki is the implementation. It uses Claude Code as the LLM brain and either Logseq or Obsidian as the wiki UI, with a two-layer cache architecture that turned out to be the key insight Karpathy's gist does not mention.
Why use this?
- 5-minute setup. Install the plugin, run
/llm-wiki setup, and you have a schema, namespaces, and git tracking. No manual design needed.
- Claude becomes your wiki maintainer.
/llm-wiki ingest updates 5-15 pages with cross-references from a single source.
- L1/L2 architecture. Auto-loaded rules in memory (L1) + deep knowledge in the wiki (L2). No other tool has this.
- Built-in quality checks.
/llm-wiki lint finds orphan pages, stale content, broken refs, and credential leaks.
- Logseq + Obsidian. Use whichever you already have. No tool switch required.
Quick Start
As a Claude Code plugin (recommended)
This repository is its own plugin marketplace. Add the marketplace MehmetGoekce/llm-wiki and
install the plugin llm-wiki from it, as the Claude Code documentation describes in
Discover and install plugins.
Claude Code asks for one value, the Wiki root: your Logseq graph or Obsidian vault. The directory
may be empty or not exist yet. Then, in any project:
/llm-wiki setup
/llm-wiki ingest "your first source"
/llm-wiki query "what do I know about X?"
/llm-wiki lint
/llm-wiki setup asks which tool you use and which namespaces you want, then creates the Schema,
Dashboard, hub pages, Access-Log and llm-wiki.yml. The wiki starts sparse and gets denser with
every ingest. New releases reach you through the plugin; nothing to copy.
Tested with Claude Code 2.1.296.
Without the plugin
Keep a local copy of this repository, for example a clone in ~/llm-wiki. In the project that
should use the skill, copy SKILL.md to .claude/commands/wiki.md. In that copy, replace every
occurrence of two placeholders with absolute paths, using your editor's search and replace:
${user_config.wiki_path} (the "Wiki root:" line): your Logseq graph or Obsidian vault
${CLAUDE_PLUGIN_ROOT} (the setup workflow): your local copy of the repository, so that setup
finds templates/
Then run /wiki setup in that project. The copy is invoked as /wiki <command>, stays at the
version you copied, and needs the clone to stay where it is. The plugin is the recommended path.
The rest of this README writes /llm-wiki <command>. With a copied skill, type /wiki <command>.
Moving from a copied skill to the plugin
Install the plugin, enter your existing wiki directory as Wiki root, and delete the copied
.claude/commands/wiki.md from your project. The wiki itself needs no change.
Coming from v1.6.0