{"slug": "how-to-build-an-ai-second-brain-with-obsidian-and-claude-code-the-llm-wiki", "title": "How to Build an AI Second Brain with Obsidian and Claude Code: The LLM Wiki Method", "summary": "Andrej Karpathy's LLM Wiki method proposes building a personal knowledge base optimized for AI reading and maintenance. A guide explains how to implement this using Obsidian for local Markdown storage and Claude Code for AI-driven updates, enabling a living knowledge base that can be queried and maintained by language models.", "body_md": "# How to Build an AI Second Brain with Obsidian and Claude Code: The LLM Wiki Method\n\nLearn how to build an AI-maintained knowledge base using Obsidian and Claude Code, inspired by Andrej Karpathy's LLM Wiki architecture.\n\n## The Problem with Personal Knowledge Management (And Why AI Changes Everything)\n\nIf you’ve ever tried to build an AI second brain, you know the frustration. You capture notes religiously, tag everything carefully, build elaborate folder structures — and then never actually use any of it. The information sits there, inert, while you still open a new browser tab whenever you need to remember something.\n\nAndrej Karpathy, former head of AI at Tesla and one of the most respected researchers in the field, proposed a different approach. He called it the LLM Wiki: a personal knowledge base that’s not just stored but actively maintained and queried by a language model. Instead of a passive archive, it becomes a living document that an AI can read, update, and reason over.\n\nThis guide walks you through how to build that system using Obsidian as your knowledge layer and Claude Code as the AI brain that maintains it.\n\n## What the LLM Wiki Method Actually Is\n\nKarpathy’s core insight is simple: most knowledge management systems are optimized for humans to write into but are terrible for AI to read from. They’re full of inconsistent formatting, buried context, and implicit connections that only make sense to the person who wrote them.\n\nThe LLM Wiki approach flips this. You design the knowledge base so that a language model can navigate, update, and synthesize it effectively — which, as a side effect, also makes it more useful for you.\n\nThe key principles:\n\n**Flat, atomic notes**— Each note covers one concept clearly and completely. No giant dump files.** Explicit linking**— Connections between ideas are written out, not implied.** Consistent structure**— Every note follows the same template so an LLM can parse it reliably.** AI-maintained freshness**— You don’t manually update everything. Claude Code reads your inputs and propagates updates across related notes.\n\n## Seven tools to build an app. Or just Remy.\n\nEditor, preview, AI agents, deploy — all in one tab. Nothing to install.\n\nThe result is a knowledge base that a language model can actually use as context — meaning you can query it directly, have Claude summarize what you know about a topic, or ask it to identify gaps in your understanding.\n\n## Why Obsidian Is the Right Foundation\n\nObsidian works here for a few specific reasons that aren’t about hype.\n\n### It’s Just Files\n\nYour entire Obsidian vault is a folder of Markdown files on your local machine. This matters enormously when you’re working with Claude Code. There’s no API to authenticate against, no proprietary format to parse. Claude Code can read, write, and reorganize Markdown files directly. Your vault is just a directory — and that makes it immediately accessible to any AI agent with file system access.\n\n### Bidirectional Links Are Machine-Readable\n\nObsidian’s `[[wiki-link]]`\n\nsyntax is plain text. A language model can parse it, follow it, and generate new links in the same format without any special tooling. When Claude Code processes your notes, it can legitimately traverse the graph — reading a note, following its links, and building a coherent picture of related concepts.\n\n### Local-First Means No Rate Limits or Sync Costs\n\nEverything stays on disk. You’re not pushing gigabytes of notes to a cloud service on every sync. Claude Code operates directly on the file system, which keeps things fast and cheap. You only pay for the Claude API calls themselves, not for storage or transfer.\n\n### The Graph View Is a Debugging Tool\n\nWhen you’re building an AI-maintained knowledge base, the Obsidian graph view becomes useful for something it was always marketed for but rarely used: spotting orphaned notes, unexpected clusters, and missing connections. It’s a visual sanity check on whether your AI’s edits are making structural sense.\n\n## Setting Up Claude Code for Your Vault\n\nClaude Code is Anthropic’s agentic coding environment. It runs in your terminal with access to your local file system, and it can read, write, and execute code directly. For knowledge base maintenance, this is exactly what you need.\n\n### Prerequisites\n\nBefore you start, you need:\n\n**Obsidian** installed with a vault set up (any existing vault works, or create a new one)**Claude Code** installed via npm:`npm install -g @anthropic-ai/claude-code`\n\n- An\n**Anthropic API key** with access to Claude 3.5 Sonnet or Claude 3 Opus - Basic familiarity with your terminal\n\n### Granting File System Access\n\nWhen you launch Claude Code from within your vault directory, it operates with access to that directory. Start a Claude Code session from your vault root:\n\n```\ncd ~/Documents/ObsidianVault\nclaude\n```\n\nClaude Code will ask what you want to work on. From here, you can point it directly at your notes.\n\n### Creating Your Base Template\n\nBefore Claude Code can maintain your vault consistently, it needs a template to follow. Create a file called `_template.md`\n\nin your vault root:\n\n```\n---\ntitle: \ncreated: \nupdated: \ntags: []\nrelated: []\n---\n\n## Summary\n[One paragraph explaining what this concept is]\n\n## Key Points\n- \n\n## Connections\n[Links to related notes and why they're related]\n\n## Open Questions\n[What I don't know yet about this topic]\n\n## Sources\n[Where this information came from]\n```\n\n### Everyone else built a construction worker.\n\nWe built the contractor.\n\nOne file at a time.\n\nUI, API, database, deploy.\n\nThis structure is deliberately designed for LLM consumption. The `## Connections`\n\nsection forces explicit relationship documentation. The `## Open Questions`\n\nsection is where Claude Code can flag uncertainty rather than hallucinating answers.\n\n## Building the Workflow Step by Step\n\n### Step 1: Define Your Knowledge Intake Sources\n\nThe first decision is where your raw inputs come from. Common options:\n\n**Daily notes**— A running log of things you read, learn, or think about** Clippings**— Articles or excerpts you save manually** Meeting notes**— Unstructured text from conversations** Voice memos**— Transcripts from tools like Whisper\n\nFor this workflow, we’ll use daily notes as the primary intake mechanism. Each day you write a freeform note about what you learned. Claude Code processes it nightly.\n\n### Step 2: Write a Processing Prompt\n\nCreate a file called `_processing-instructions.md`\n\nin your vault. This is the system prompt you’ll give Claude Code for each processing run:\n\n```\n# Processing Instructions\n\nYou are maintaining a personal knowledge base in Obsidian. \n\nWhen given a daily note:\n1. Extract distinct concepts, people, tools, or ideas mentioned\n2. Check if a note already exists for each one (search the vault)\n3. If a note exists, update it with new information from the daily note\n4. If no note exists, create one using _template.md\n5. Add [[links]] between related notes\n6. Update the `updated` frontmatter field on any modified notes\n7. Do NOT invent information. If something is unclear, add it to ## Open Questions\n\nAlways preserve existing content unless explicitly correcting an error.\n```\n\nThis prompt is your contract with the agent. Be specific. Vague instructions produce inconsistent edits.\n\n### Step 3: Run Your First Processing Session\n\nOpen a Claude Code session in your vault and give it a starting prompt:\n\n```\nRead _processing-instructions.md, then process the daily note at Daily/2025-01-15.md. \nShow me what files you plan to create or modify before making any changes.\n```\n\nThe “show me before making changes” step is critical when you’re starting out. Claude Code will lay out its plan — which notes it intends to create, which it intends to update, what links it plans to add. Review this before approving.\n\nAfter a few sessions, you’ll develop a feel for where it makes good decisions and where it needs more guidance. Refine your `_processing-instructions.md`\n\naccordingly.\n\n### Step 4: Build a Querying Layer\n\nOnce your vault has a few weeks of processed notes, you can start querying it. Open Claude Code and try prompts like:\n\n```\nRead all notes tagged with \"machine-learning\" and give me a summary of \nwhat I currently know about this topic, including gaps identified in \nany ## Open Questions sections.\n```\n\nOr:\n\n```\nI'm preparing for a meeting about retrieval-augmented generation. \nSearch my vault for relevant notes and synthesize what I know about \nthis topic, citing the specific notes you're drawing from.\n```\n\nThis is where the system pays off. Instead of manually searching your notes, you’re asking an AI to reason over your personal knowledge graph and give you a coherent briefing.\n\n### Step 5: Set Up a Maintenance Routine\n\nThe system needs a regular processing cycle to stay useful. A simple approach:\n\n**Daily**— At the end of the day, run Claude Code on your daily note** Weekly**— Run a “gap analysis” pass where Claude Code scans for notes that should be connected but aren’t** Monthly**— Run a “staleness check” where Claude Code flags notes that haven’t been updated in 60+ days and may need review\n\n- ✕a coding agent\n- ✕no-code\n- ✕vibe coding\n- ✕a faster Cursor\n\nThe one that tells the coding agents what to build.\n\nYou can automate the daily run with a simple shell script triggered by a cron job:\n\n``` bash\n#!/bin/bash\ncd ~/Documents/ObsidianVault\nTODAY=$(date +%Y-%m-%d)\nclaude --print \"Read _processing-instructions.md, then process Daily/$TODAY.md. \nApply all changes without asking for confirmation.\" >> logs/processing-$TODAY.log 2>&1\n```\n\nThe `--print`\n\nflag runs Claude Code non-interactively and outputs results to your log file.\n\n## Advanced Techniques for a Smarter Knowledge Base\n\n### Versioned Frontmatter for Change Tracking\n\nAdd a `version`\n\nfield to your template frontmatter. Instruct Claude Code to increment it on each update. This gives you a lightweight audit trail — you can see at a glance how many times a note has been revised and whether it’s been recently maintained.\n\n### Confidence Scoring\n\nAdd a `confidence: high/medium/low`\n\nfield to your frontmatter. Tell Claude Code to set this based on the quality of sources in the note and whether there are unresolved Open Questions. When you query your vault, you can filter for high-confidence notes on a topic to avoid acting on uncertain information.\n\n### Synthesis Notes\n\nBeyond atomic concept notes, create a category of “synthesis notes” — larger notes where Claude Code is explicitly asked to combine information across multiple atomic notes and draw connections. These are useful for topics where you’ve accumulated a lot of fragmented knowledge that you want integrated.\n\nPrompt example:\n\n```\nCreate a synthesis note for \"transformer-architecture\" that integrates \neverything across notes tagged with \"transformers\", \"attention-mechanism\", \nand \"llm-architecture\". Identify the three most important relationships \nbetween these concepts.\n```\n\n### Contradiction Detection\n\nInstruct Claude Code to flag contradictions between notes. When it updates a note with new information that contradicts existing content, it should add a `⚠️ Contradiction:`\n\ncallout rather than silently overwriting. This keeps you in the loop on evolving understanding.\n\n## Where MindStudio Fits Into This Architecture\n\nThe Obsidian + Claude Code setup described above is powerful but requires manual initiation. You’re running terminal commands, managing cron jobs, and keeping your processing instructions up to date. For many people, that friction is enough to derail the habit.\n\nThis is where [MindStudio](https://mindstudio.ai) addresses a real gap. MindStudio is a no-code platform for building AI agents and automated workflows, and it’s particularly well-suited for wrapping knowledge management pipelines in reliable automation.\n\n### Scheduling Knowledge Capture Without Cron\n\nInstead of managing shell scripts and cron jobs, you can build a MindStudio agent that runs on a schedule, pulls in your daily inputs (from email, Slack, a web form, or a connected tool), calls the Claude API with your processing prompt, and writes the results back to your vault via a file sync integration.\n\nMindStudio has 1,000+ pre-built integrations — including Google Drive, Notion, and webhook endpoints — so you can connect your intake sources without writing glue code.\n\n### Multi-Model Processing Pipelines\n\nOne underappreciated benefit of MindStudio is that it gives you access to 200+ AI models out of the box. For a knowledge base pipeline, you might use a fast, cheap model (like Claude Haiku or GPT-4o mini) for initial extraction and tagging, then route complex synthesis tasks to Claude 3.5 Sonnet. MindStudio handles the routing logic visually, without you having to manage multiple API keys.\n\n### Triggered Knowledge Capture\n\n### Built like a system. Not vibe-coded.\n\nRemy manages the project — every layer architected, not stitched together at the last second.\n\nYou can set up a MindStudio agent that triggers on an email. Forward any article or document to a specific address, and the agent automatically extracts key concepts, formats them to your vault template, and saves them as a new Obsidian note via Google Drive sync. No manual processing required.\n\nFor teams, this extends further — a shared MindStudio workflow means multiple people can contribute to a shared knowledge base without everyone needing Claude Code set up locally.\n\nYou can try MindStudio free at [mindstudio.ai](https://mindstudio.ai) — most simple agents take under an hour to build with the visual editor.\n\n## Common Mistakes and How to Avoid Them\n\n### Mistake 1: Starting With Too Many Notes\n\nIf you dump an existing, chaotic vault into this workflow, Claude Code will produce inconsistent results and you’ll get overwhelmed by the processing output. Start fresh, or process one section of your vault at a time.\n\n### Mistake 2: Trusting Claude Code Blindly\n\nAlways review the first few processing runs before running in “auto-approve” mode. Claude Code makes mistakes — it creates unnecessary duplicate notes, adds spurious connections, or misunderstands a concept. Your processing instructions need to be tight enough to catch these cases.\n\n### Mistake 3: Notes That Are Too Large\n\nIf individual notes run to thousands of words, you’ll run into context window issues when Claude Code tries to read and update multiple related notes in one session. Keep atomic notes under 500 words. If a topic is complex, split it into multiple linked notes.\n\n### Mistake 4: Ignoring the Open Questions Section\n\nThe `## Open Questions`\n\nsection is the most valuable part of this system and the most neglected. Review it regularly. These are the gaps in your knowledge that Claude Code has flagged — they’re your learning agenda.\n\n### Mistake 5: Over-Automating Early\n\nFully automated pipelines are the goal, but get the manual workflow right first. Run Claude Code interactively for a few weeks before automating. You’ll learn what your processing instructions actually need to say.\n\n## Frequently Asked Questions\n\n### What is the LLM Wiki method?\n\nThe LLM Wiki method is a knowledge management approach originally proposed by Andrej Karpathy. It involves structuring a personal knowledge base in a way that language models can navigate and maintain it — using flat Markdown files, explicit linking, consistent templates, and AI-powered updates. The goal is a knowledge base that an AI can actively reason over, not just search through.\n\n### Can I use a different AI model instead of Claude Code?\n\nYes. The Obsidian vault structure described here is model-agnostic — it’s just Markdown files. You can use any AI with file system access (including local models via Ollama) to process and update the notes. Claude Code is recommended because it’s particularly reliable for multi-file edits and has strong instruction-following in agentic tasks, but the architecture doesn’t require it.\n\n### How much does this cost to run?\n\nThe main cost is Claude API usage. A typical daily processing run (one daily note, 5–10 related notes updated) uses roughly 10,000–30,000 tokens with Claude 3.5 Sonnet, which costs approximately $0.03–$0.09 per run at current pricing. Monthly costs for a personal knowledge base are usually under $5. If you use a faster model like Claude Haiku for routine passes, costs drop significantly.\n\n### Is my data private with this setup?\n\n## Other agents ship a demo. Remy ships an app.\n\nReal backend. Real database. Real auth. Real plumbing. Remy has it all.\n\nYour Obsidian vault stays local on your machine. The only data sent externally is what you pass to the Claude API — specifically, the content of the notes Claude Code reads during each session. Anthropic has an API data privacy policy that covers this. If privacy is a hard requirement, you can run a local model like Llama 3 via Ollama instead of the Claude API, keeping everything entirely on-device.\n\n### How is this different from just using ChatGPT or Claude to answer questions?\n\nThe key difference is persistence. When you ask ChatGPT a question, you get an answer but nothing is retained for future sessions. The LLM Wiki method maintains a structured knowledge graph that grows over time and reflects your specific understanding of topics. When you query it, the AI is reasoning over *your* accumulated knowledge — not just its training data.\n\n### Do I need to know how to code to set this up?\n\nYou need to be comfortable running terminal commands and editing text files. You don’t need to write code from scratch. The shell script for automation is copy-pasteable and minimal. If you want the no-code version of this workflow, the MindStudio approach described above handles the automation layer without requiring a terminal.\n\n## Key Takeaways\n\n- The LLM Wiki method treats your knowledge base as a living document that an AI maintains, not just a passive archive.\n- Obsidian’s plain Markdown format makes it ideal for AI-assisted knowledge management — it’s just files, with no proprietary format to work around.\n- Claude Code can read, update, and cross-link your notes directly from the terminal, with processing instructions you control.\n- A consistent note template (with Summary, Key Points, Connections, and Open Questions sections) is what makes AI maintenance reliable.\n- Start manually, review Claude Code’s edits carefully, and automate incrementally once you trust the output.\n- For teams or fully automated pipelines, MindStudio can wrap this workflow in a scheduled agent with no-code tooling.\n\nThe difference between a knowledge base you use and one you abandon usually comes down to whether you can extract value from it without effort. Building an AI-maintained system with Obsidian and Claude Code is one of the more practical ways to close that gap. Start with a single daily note, run one processing session, and see what comes out — the architecture will make more sense in practice than in theory.", "url": "https://wpnews.pro/news/how-to-build-an-ai-second-brain-with-obsidian-and-claude-code-the-llm-wiki", "canonical_source": "https://www.mindstudio.ai/blog/ai-second-brain-obsidian-claude-code-llm-wiki/", "published_at": "2026-07-14 00:00:00+00:00", "updated_at": "2026-07-14 17:59:53.028495+00:00", "lang": "en", "topics": ["artificial-intelligence", "large-language-models", "ai-tools", "ai-agents", "developer-tools"], "entities": ["Andrej Karpathy", "Obsidian", "Claude Code", "Tesla"], "alternates": {"html": "https://wpnews.pro/news/how-to-build-an-ai-second-brain-with-obsidian-and-claude-code-the-llm-wiki", "markdown": "https://wpnews.pro/news/how-to-build-an-ai-second-brain-with-obsidian-and-claude-code-the-llm-wiki.md", "text": "https://wpnews.pro/news/how-to-build-an-ai-second-brain-with-obsidian-and-claude-code-the-llm-wiki.txt", "jsonld": "https://wpnews.pro/news/how-to-build-an-ai-second-brain-with-obsidian-and-claude-code-the-llm-wiki.jsonld"}}