To build a second brain with Claude Code and Obsidian, open Claude Code in the folder Obsidian already uses, add a CLAUDE.md file that tells Claude how your notes are organized, and let it read and write the markdown directly. Obsidian stays your view of the notes; Claude Code does the filing, linking and answering. An Obsidian MCP server is optional.
How to use Obsidian as a second brain?
Keep every note as a markdown file in one Obsidian folder, capture anything worth keeping into an inbox note, and let Claude Code do the filing. Open Claude Code in that folder, give it a CLAUDE.md that describes your structure, and ask it to process the inbox, link related notes and answer from what you wrote.
Here is the whole setup. It takes about twenty minutes, and nothing in it is specific to one model or one app.
Step 1: Pick the folder
If you already use Obsidian, use the folder it already opens. If you do not, install Obsidian, create a folder called second-brain, and open it as a new Obsidian folder. Add four subfolders: inbox, notes, sources and archive. Resist designing a bigger structure on day one; structure should be earned by volume.
Step 2: Put it under git
Run git init in the folder and commit. From here on, every change Claude Code makes is a diff you can read and undo. This is the single cheapest safety net in the setup, and it is the reason you can let an AI edit your notes without worrying about it.
Step 3: Open Claude Code in the folder
In a terminal, cd into the folder and run claude. Claude Code now treats your notes the way it treats a codebase: it can search every file, read them, and write new ones. Obsidian notices file changes on its own, so edits appear in the app as they happen.
Step 4: Write a CLAUDE.md
Claude Code reads a file called CLAUDE.md at the root of the folder at the start of every session. It is the one place you explain how your second brain works. A starting version:
# Second brain: instructions for Claude Code
This folder is my second brain. I read it in Obsidian; you maintain it.
## Structure
- inbox/ raw captures. Process them; never leave one half filed.
- notes/ one idea per note, in my words, with a "Source:" line.
- sources/ where things came from: links, transcripts, documents.
- archive/ finished or superseded notes. Move, never delete.
## Rules
- Link related notes with [[wikilinks]] so the Obsidian graph shows them.
- Answer from these notes first. Say "not in my notes" when the answer is missing.
- Never edit anything inside .obsidian/ (Obsidian's own settings).
- Ask before deleting or renaming more than one file.
Obsidian hides folders that start with a dot, so .claude and .git stay out of your notes view. CLAUDE.md itself shows up as a normal note, which is useful: you can edit the instructions in Obsidian like anything else.
Step 5: Capture into the inbox
Anything worth keeping goes into inbox/ the moment you meet it, unpolished: a line from a call, a link, a decision. Capture from Obsidian on your phone or drop files in from anywhere. Do not organize at capture time.
Step 6: Run a weekly pass with Claude Code
Once a week, ask Claude Code to do the filing. Two prompts carry most of the work:
- "Process inbox/. Turn each capture into a note in notes/ with a Source line and links to related notes, then move the raw capture to archive/."
- "What do my notes say about [topic]? Cite the note names, and tell me where they disagree."
Review the diff before you commit it. Within a few weeks the links Claude adds start surfacing connections you had forgotten, which is the moment most people stop treating this as a chore.
Step 7: Test retrieval once a month
Ask ten questions you know your notes answer and score what comes back. Failures tell you which notes are badly titled or missing a source. The second brain retrieval test has a scorecard for it.
