Some new notes for my Obsidian System - I just copy and pasted this into my Claude Code in Obsidian and said help me do this but customized to me.
Andrej Karpathy outlined a simple yet powerful pattern for building a personal knowledge base (often called a "second brain") using LLMs like Claude Code and Obsidian as the frontend. He shared it in an April 2026 GitHub gist titled "LLM Wiki," which went viral. The core insight: instead of relying on retrieval-augmented generation (RAG) that re-discovers knowledge from raw documents every time you ask a question, have the LLM incrementally compile and maintain a persistent, interlinked wiki of Markdown files. This creates compounding knowledge—syntheses, cross-references, and resolutions of contradictions—that gets richer over time.
Key Principles
The LLM acts as the "programmer" or librarian: it reads raw sources, extracts insights, integrates them into the wiki (updating existing pages as needed), and handles all the tedious work like linking, summarizing, and bookkeeping.
You (the human) focus on sourcing material, asking good questions, and guiding the process. You rarely edit the wiki manually.
Obsidian serves as the "IDE": a local Markdown-based note-taking app where you browse the wiki in real time (with graph views, backlinks, canvases, etc.). The LLM makes edits, and you see changes instantly.
No complex vector databases or external RAG pipelines needed at moderate scale—everything stays in plain Markdown files.
It works for personal notes, research deep-dives, book companions, business context, competitive analysis, etc. Separate vaults can be used for different domains to keep things focused.
Three-Layer Architecture
Raw sources (immutable layer): A folder (e.g., raw/) containing original documents—articles, PDFs, transcripts, web clips, images, etc. The LLM reads from here but never modifies these files. They're your source of truth. Tools like the Obsidian Web Clipper help quickly add web content as Markdown, with a hotkey to download images locally.
Wiki (compiled, owned by the LLM): A directory (e.g., wiki/) of Markdown files the LLM creates and maintains. This includes:
Entity pages (people, concepts, topics).
Summaries and syntheses.
Comparisons, connections, and updates that flag contradictions or incorporate new info.
Cross-references via wikilinks.
Schema / Config (rules layer): A key file like CLAUDE.md, agents.md, or similar that defines conventions for the LLM. It includes:
How to structure pages.
Workflows for ingestion, querying, and maintenance.
Identity/rules for the agent (e.g., "always update existing pages before creating new ones," "flag contradictions").
This file is read first in sessions to keep the LLM disciplined.
Additional helper files often include:
index.md: A catalog of all wiki pages with short descriptions (updated on every change; the LLM reads this first for navigation).
log.md (or a logs folder): Chronological record of ingests, queries, and lint runs.
Core Workflows (Operations)
Ingest: Drop a new source into raw/. Tell the LLM (e.g., via Claude Code) to process it. The LLM reads it, discusses key takeaways if you want, creates/updates relevant wiki pages, adds links, resolves any conflicts with existing knowledge, and updates the index/log. One source might touch multiple pages. You can do this one-by-one (for involvement) or in batches.
Query: Ask questions. The LLM searches the wiki (starting with the index), synthesizes answers with citations/links, and can output in various formats (tables, canvases, etc.). Valuable query results can be filed back into the wiki as new pages so they compound.
Lint/Maintain: Periodically instruct the LLM to audit the wiki—check for contradictions, stale info, orphan pages, missing links, or gaps. It can suggest new sources or questions to explore. This keeps the knowledge base healthy.
Many implementations add CLI-style commands in Claude Code (e.g., /ingest, /query, /lint) or hooks that automatically load context (like reading CLAUDE.md and index.md at session start and summarizing/updating at the end).
Practical Setup Tips (Common Across Community Adaptations)
Create an Obsidian vault (one per topic/domain recommended).
Set up the folder structure inside it: raw/, wiki/, plus config files.
Paste Karpathy's gist instructions (or a refined CLAUDE.md/agents.md) into Claude Code, point it at the vault folder, and let it help initialize or evolve the system.
Use Obsidian plugins or "skills" (e.g., for native wikilinks, callouts, and canvases) so the LLM can write in Obsidian-friendly Markdown.
Start small: Add a few sources, ingest them, explore the graph view in Obsidian, and iterate on the schema with the LLM.
Tools like Claude Code (terminal or desktop) act as the agent; alternatives like Cursor or other coding LLMs work too.
This setup turns scattered notes into a "living" second brain that evolves with you. It's not about hoarding information but about building synthesized, connected knowledge that the LLM can reliably draw on without re-deriving everything each time. Many people have created starter kits, GitHub repos with skills, and video guides based on the gist to make setup even faster (often in under an hour).