How to Build an AI Second Brain with Claude Code and Obsidian
Andrej Karpathy recently talked about building a personal wiki to think with LLMs. The idea is simple: give the AI your context, your history, your thinking. Then reason with it.
But what if you went further?
What if Claude Code could read and write to your Obsidian vault directly? Not as a chatbot. Not as a search interface. As a persistent, context-aware AI that actually knows your goals, tracks your decisions, and reasons over everything you've ever written.
This is the AI Second Brain. And it's practical to build today.
Table of Contents
- Why Most AI Knowledge Tools Miss the Point
- The Core Architecture: Claude Code Plus Obsidian
- Setting Up the System
- How It Actually Works in Practice
- Real Use Cases Beyond Note-Taking
- What This Enables That Chat Doesn't
- Limitations and Gotchas
Why Most AI Knowledge Tools Miss the Point
Most AI knowledge management tools are glorified search bars. You upload documents. You ask questions. The AI retrieves snippets and generates answers.
That's useful. But it's not a second brain.
A second brain isn't about retrieval. It's about synthesis. It remembers your goals from three months ago. It connects ideas across different projects. It notices when you contradict yourself. It tracks decisions and surfaces context you forgot existed.
Karpathy's personal wiki concept gets closer. By maintaining structured notes that LLMs can read, you give the AI durable context. But most people stop there. They copy-paste context into ChatGPT manually. The AI forgets everything after the conversation ends.
The missing piece: persistent memory plus active reasoning.
Analogy: Imagine a family law attorney preparing for a custody case. She has years of case notes, mediation transcripts, financial disclosures, and prior rulings scattered across dozens of folders. Now imagine an AI partner that has absorbed all of it, recalls every detail on demand, and spots patterns across cases she would have missed on her own. That is what an AI second brain does. It turns scattered knowledge into something you can actually reason with, whether you are navigating complex legal matters or building your next product.
The Core Architecture: Claude Code Plus Obsidian
Here's the stack:
Layer 1: Obsidian as Storage
Obsidian stores everything as plain markdown files. Your notes. Your goals. Your meeting logs. Your project context. Everything lives in one vault.
Layer 2: Claude Code as Reasoning
Claude Code can read files, write files, and execute commands. It accesses your vault directly. It doesn't just retrieve. It reasons. It writes. It updates.
Layer 3: You as Director
You set the goals. You define the structure. You decide what matters. The AI executes and synthesizes.
Setting Up the System
Here's the practical setup:
Step 1: Structure Your Obsidian Vault
Create these core folders:
/goals, Current objectives and priorities/context, Background on projects, people, decisions/daily, Daily logs and reflections/projects, Active work with status and blockers/archive, Completed work and historical context
Each folder uses a consistent template. Goals have deadlines and success metrics. Projects have status fields. Daily notes follow the same structure.
Step 2: Give Claude Code Access
Point Claude Code at your vault directory. Simple command:
code /path/to/obsidian-vault
Claude can now read any file, search across notes, and write updates.
Step 3: Define Your System Prompt
This is critical. You need a persistent prompt that tells Claude:
- Where to find your goals
- How to read your context
- When to update notes versus create new ones
- What decisions require your input
Example structure:
You are my AI second brain. You have access to my Obsidian vault.
Priorities:
1. Read /goals/current.md before every session
2. Update /daily/YYYY-MM-DD.md with key decisions
3. Cross-reference /context when answering questions
4. Never delete. Only append or create.
Your role: Synthesize. Connect. Remember. Reason.
Step 4: Build Habits Around It
This only works if you use it consistently. Three habits:
- Morning review , Ask Claude to summarize yesterday and surface priorities
- Decision logging , Tell Claude about key decisions so it updates context
- Weekly synthesis , Ask Claude to connect threads across the week
How It Actually Works in Practice
Let's say you're working on a new product feature. You have scattered thoughts across meetings, Slack messages, and random notes.
Instead of manually hunting for context, you ask Claude:
"What have I decided about the API redesign, and what's still open?"
Claude reads:
- Your project file in
/projects/api-redesign.md - Meeting notes from the past two weeks
- Your goals document
- Related technical context
It synthesizes:
"You decided on REST over GraphQL on March 12. You're still debating authentication flow. Your goal is to ship by end of Q2, but the team flagged performance concerns in the March 18 standup."
Then it asks: "Want me to update the project file with next steps?"
You say yes. Claude appends the synthesis to the project note. Now that context is durable.
Real Use Cases Beyond Note-Taking
| Use Case | What Claude Does |
|---|---|
| Decision tracking | Logs key choices with reasoning and date |
| Goal alignment | Surfaces when work drifts from stated priorities |
| Meeting prep | Reads past context and generates talking points |
| Weekly reviews | Synthesizes wins, blockers, and patterns |
| Onboarding teammates | Generates context docs from your notes |
| Contradiction detection | Notices when current plan conflicts with past decisions |
The power isn't any single feature. It's the persistence. Claude remembers. Every conversation builds on the last.
What This Enables That Chat Doesn't
Standard ChatGPT workflow:
- You ask a question
- You paste context manually
- You get an answer
- Context disappears when you close the tab
AI Second Brain workflow:
- You ask a question
- Claude reads your vault automatically
- Claude answers with full historical context
- Claude updates your notes so the answer is durable
- Next time, that context is already there
The difference compounds. After a month, Claude knows your entire project history. After six months, it's reasoning over hundreds of decisions and thousands of notes.
You stop re-explaining. You stop forgetting. You stop losing context.
Limitations and Gotchas
This is not magic. A few realities:
- Garbage in, garbage out , If your notes are messy, Claude can't fix that. Structure matters.
- Token limits exist , Claude can't read your entire vault at once. You need smart retrieval strategies.
- Privacy concerns , Your vault is now readable by an API. Use local models if that's a dealbreaker.
- It requires discipline , If you don't log decisions, Claude can't remember them.
- Cost adds up , Heavy usage means API costs. Budget accordingly.
But even with limits, this is the closest we've gotten to a true AI second brain.
The Real Shift Here
Most people use AI as a tool. Ask a question, get an answer, move on.
This approach flips that. The AI becomes a persistent layer on top of your thinking. It doesn't replace memory. It extends it.
Karpathy's wiki concept pointed the direction. Claude Code plus Obsidian makes it real.
You end up with an AI that knows your context, remembers your goals, and reasons over everything you've written. Not because it's smarter. Because it has access to durable memory and the ability to act on it.
That's the second brain. And it's worth building.
Conclusion
The AI Second Brain isn't about better search. It's about persistent context, active reasoning, and durable memory.
Claude Code gives you the reasoning engine. Obsidian gives you the storage layer. Your discipline gives you the structure.
Combine them, and you stop losing context. You stop re-explaining. You stop forgetting.
You think with the AI. Not just at it.
Start small. Structure your vault. Give Claude access. Build the habit. The rest compounds.