# How to Build a Karpathy-Style LLM Knowledge Wiki with Claude Code and Obsidian <!-- ref: @content/youtube/nate-herk/2026-04-05-sbonwymh3ay tags: [llm-knowledge-base, karpathy-llm-wiki, obsidian, claude-code, rag-vs-wiki, personal-knowledge-management, token-efficiency, linting] triggers: [need to organize markdown files, reduce token usage, create a personal wiki, automate knowledge ingestion] trigger_prompt: When you want to build a structured knowledge base that automatically organizes information from markdown files and reduces operational costs. version: 8 updated_at: 2026-11-21T21:47:15.297Z --> *Synthesized from Nate Herk | AI Automation on Nate Herk | AI Automation, 2026-04-05.* Nate Herk is an AI automation creator who builds practical agentic workflows and shares setup walkthroughs on his YouTube channel. ## Core Thesis Nate Herk demonstrates Andrej Karpathy's LLM wiki pattern: instead of a vector database, you give Claude Code a folder of markdown files and let it auto-organize them into an interlinked second brain. He shows the structure (a `raw/` folder for source documents, a `wiki/` folder for LLM-generated pages, plus an index, log, and CLAUDE.md), and argues this beats traditional RAG for personal-scale knowledge — one X user reportedly cut query token usage by 95% by switching to this method. ## Key Insights - Nate seeded the system by dropping 36 of his recent YouTube transcripts into Claude Code; the batch ingest took about 14 minutes and produced an Obsidian graph view with hub nodes for tools (Perplexity, Visual Studio Code, Nano Banana, n8n), techniques (the WAT framework, bypass permissions mode, human review checkpoint), and concepts (MCP servers, RAG, vibe coding) — all relationships built automatically. - The vault layout is intentionally minimal: a top-level vault, a `raw/` folder for source files, and a `wiki/` folder containing the generated markdown plus an `index.md`, a `log.md` (operation history), and a `CLAUDE.md` that explains the project schema. Karpathy's prompt is left vague on purpose so you can customize structure per project — Nate's YouTube vault uses subfolders (analysis, concepts, entities, sources), while his personal "Herk Brain" stays flat. - A single AI 2027 article ingest produced 23 wiki pages — 6 people, 5 organizations, 1 AI systems page, plus concept pages for technical alignment and geopolitical, and an analysis page — and took roughly 10 minutes; Claude Code asks clarifying questions about emphasis and granularity before chunking. - The "hot cache" is a `hot.md` file (~500 characters) that stores the most recent context so the agent can skip a full wiki crawl. Nate uses it in his Herk Brain vault wired to his "Herk 2" executive assistant, but skipped it in the YouTube vault where recency doesn't matter. - Karpathy recommends running periodic LLM "lints" over the wiki to find inconsistent data, fill gaps via web search, and surface candidate articles for new connections. - Wiki-graph beats semantic-search RAG at the hundreds-of-pages scale (zero infrastructure, free aside from tokens, deeper relational understanding via links rather than similarity), but standard RAG still wins at millions of documents as of April 2026. ## Actionable Takeaways 1. Install Obsidian from obsidian.md (free), open it, go to Manage Vaults, and create a new vault (e.g., "demo vault") on your desktop. 2. Open the vault folder in VS Code, run `claude` in the terminal, paste Karpathy's LLM-wiki gist prompt, then append: "You are now my LLM wiki agent. Implement this exact idea file as my complete second brain. Guide me step by step. Create the CLAUDE.md schema..." Claude Code will scaffold `raw/`, `wiki/` (with analysis, concepts, entities, sources subfolders), `index.md`, `log.md`, and `CLAUDE.md`. 3. Install the Obsidian Web Clipper Chrome extension. In its Options, change the default location from `clippings` to `raw` so clipped articles land in the ingest folder. 4. Tell Claude Code the project's purpose up front (e.g., "this vault is for AI research" vs. "this is my personal second brain") before the first ingest — this shapes the schema choices it makes. 5. After dropping a source into `raw/`, prompt: "I just threw an article into raw, please ingest it." Answer its questions about emphasis, focus, and granularity to steer chunking. 6. For agents that consume the vault (like an executive assistant), point their CLAUDE.md at the vault's `wiki/` path and instruct them to read the hot cache, index, and domain subindex first — and to skip the wiki entirely when the question doesn't need it. 7. Choose wiki-graph for hundreds of pages; switch to traditional semantic-search RAG, knowledge graphs, or LightRAG when you cross into millions of documents. 8. Schedule recurring LLM lints over the wiki to flag inconsistencies, impute missing data via web search, and propose new article candidates. ## Notable Quotes > "Normal AI chats are ephemeral, meaning the knowledge disappears after the conversation." — Nate Herk | AI Automation > "You literally just have a vault up top... a raw folder where you put all of the stuff. And then you've got a wiki folder." — Nate Herk | AI Automation > "When I changed over to this method, I actually saw a reduction in tokens that I was actually calling in this project." — Nate Herk | AI Automation --- *Related: `@content/web/github/2026-11-25-followups-scope-issue-112120` · `@content/web/github/2026-11-25-claude-code-v2-1-332` · `@content/web/claude-dev/2026-11-24-the-work-after-you-open-a-pr` · `@content/web/github/2026-11-24-builtin-ship-shadows-user-skill` · `@content/web/github/2026-11-23-claude-code-v2-1-331`* --- *You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).* *Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*