Obsidian + Claude Code: The Shared Memory Stack I Actually Use
My notes used to be where ideas went to die. Obsidian was my beautiful, over-organized graveyard. Claude Code was my brilliant intern who forgot everything after every shift. Then I wired them together and stopped taki
My notes used to be where ideas went to die.
Obsidian was my beautiful, over-organized graveyard. Claude Code was my brilliant intern who forgot everything after every shift.
Then I wired them together and stopped taking notes entirely. My stack started taking them for me.
This is not another "second brain" aesthetic post. This is the duct-taped, actually-working memory system that runs my dev life.
The problem: two brains, zero memory
Here is what was happening before:
Obsidian knew everything I had thought. Old meeting notes, half-baked ideas, that snippet from 2022 I swear I would need later. Local, fast, mine. But dumb. It couldn't do anything.
Claude Code could do everything I wanted. Write code, refactor, ship features, run tests. But it had the memory of a goldfish on espresso. Every new session was "Hi, who are you and what is this codebase?"
I was the human API between them. Copying context from Obsidian into Claude. Copying what Claude did back into Obsidian. I was a very expensive clipboard.
So I stopped being the clipboard.
The stack: stupidly simple
Three pieces. No vector database, no fancy SaaS, no $20/month AI wrapper that will die in 6 months.
1. Obsidian Vault as the Source of Truth
My vault lives at ~/vault. It's just Markdown. No database, no lock-in. Structure:
/00-inbox/ -> auto-fetched stuff lands here
/01-projects/ -> active builds, each with a CLAUDE.md
/02-memory/ -> the Memory Tree - people, decisions, bugs
/03-docs/ -> docs Claude actually reads
2. Claude Code with CLAUDE.md
Every project has a CLAUDE.md that Claude reads on startup. It's not a prompt. It's the operating manual.
Mine looks like this:
# Project: numbpilled-api
- Stack: Bun + Hono + Postgres
- Never run rm -rf, always use trash-cli
- Before coding, read /02-memory/decisions.md
- After coding, append what you did to /00-inbox/changelog.md
3. The Glue: A 20-line script that syncs them
Claude Code writes to Markdown. Obsidian reads Markdown. That's it. That's the integration.
I have a hook that runs after every Claude session:
echo "- $(date): $CLAUDE_TASK - files: $FILES_CHANGED - lesson: $LEARNED" >> ~/vault/00-inbox/changelog.md
No TokenJuice. No embeddings. Just files.
How it actually works in real life
Morning:
I open Obsidian. In 00-inbox there is already a summary from last night. Claude finished the auth refactor at 11pm, wrote what it changed, what broke, what it learned. I didn't ask it to. It just does because CLAUDE.md told it to.
During work:
I don't prompt Claude with "here is the context." I prompt it with "read /02-memory/decisions.md and fix the billing bug like we did last time."
It knows. Because it wrote that file last week.
Example workflow that feels like cheating:
I say: /clear then "implement rate limiting, same pattern as the other routes"
Claude does this, without me pasting anything:
- Opens
02-memory/patterns/rate-limiting.md- which it created - Reads the existing implementation
- Applies it to the new route
- Writes a new entry:
03-docs/rate-limiting.md - added to /api/numbpilled, limit 100/min
My Obsidian graph now has a new node. I did not make it.
The magic moment:
Last Tuesday I searched Obsidian for "why did we choose Hono over Express?" The answer was there. Not written by me. Written by Claude three weeks ago after I asked it to compare frameworks. It had appended its reasoning to 02-memory/decisions.md.
My AI remembered why I made a decision better than I did.
Why this beats every "AI second brain" tool
Most tools try to be smart. This stack tries to be inspectable.
It's just files. If Claude hallucinates, I open the Markdown and delete the line. No black-box vector DB to re-index.
It compounds. Every session makes the next one smarter. My
CLAUDE.mdfiles are getting better without me editing them. Claude improves its own manual.It works offline. My vault is local. My memory is local. When the API is down, I still have my brain.
It kills context switching. I live in Obsidian. Claude lives in the terminal. They meet in the middle as Markdown. I never copy-paste between them anymore.
I used to spend 6 hours a week on "knowledge management." Now I spend zero. The system manages itself.
The setup, if you want to steal it
Day 1 - Make Claude write your memory:
Create ~/vault/02-memory/decisions.md and add this to your CLAUDE.md:
After every significant task, append 2-3 bullets to ~/vault/02-memory/decisions.md: what you did, why, what to avoid next time.
That's it. After a week, you'll have a decision log you never wrote.
Day 2 - Make Obsidian your prompt library:
Create ~/vault/03-docs/prompts/ and save your best prompts as Markdown files. Then tell Claude: "Your prompt patterns live in ~/vault/03-docs/prompts/, use them."
No more prompt graveyard in your notes app.
Day 3 - Close the loop:
Add a hook in Claude Code settings to auto-append session summaries to your inbox folder. Now your vault updates while you sleep.
You don't need 118 integrations. You need 3 files that talk to each other.
The uncomfortable truth
We don't need smarter models. We need dumber storage.
ChatGPT has memory like a clingy ex - it remembers everything you wish it would forget and forgets what actually matters. Claude Code had no memory at all.
Obsidian fixed that. Not because it's smart, but because it's dumb in the right way. It's just text files on your SSD. You can read them. You can edit them. You can delete them.
The future of personal AI isn't a better chatbot. It's a vault that writes itself.
I stopped building a second brain. I started growing one. And it finally knows more about my codebase than I do.
Steal my exact stack?
I packaged the whole thing - the vault template with Memory Tree structure, all my CLAUDE.md files, the auto-sync hooks, and the 7 prompt patterns that actually write good docs - into a cloneable kit.Get Obsidian + Claude Code: The Shared Memory Stack here: https://numbpilled.gumroad.com/l/obsidian-claude
P.S. It also includes the script that makes Claude write its own changelog, so you never have to write "what I did today" again.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.