Claude Code + Obsidian Second Brain: The Setup Guide
ai-era-strategy11 min read

Claude Code + Obsidian Second Brain: The Setup Guide

Obsidian keeps your notes as plain markdown files. Claude Code reads and edits plain files. Put them in the same folder, add one instruction file, and you have a second brain that files, links and answers for you. No plugin required, and the Obsidian MCP server is optional.

AS

By Adam Sandler

Founder of The Viable Edge. Builds knowledge bases that AI tools read, for his own work and for clients.

Published · Updated

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.

Free download

Start with the Second Brain Starter Kit

The inbox, note template, source log, weekly checklist, connect-your-AI guide and retrieval self-test, as plain markdown files. Unzip them into your Obsidian folder and Claude Code can use them right away. Enter your email and the download starts.

No spam, ever
Unsubscribe anytime

Can Obsidian be used as memory for Claude Code?

Yes, and it is the simplest memory Claude Code can have. Claude Code starts every session without recall of the last one, but it reads files. Point CLAUDE.md at your Obsidian notes and every session begins from what you have written, decided and sourced, instead of from a blank context window.

There are two ways to wire it, depending on where you do your work.

  • The notes folder is the project. You run Claude Code inside the Obsidian folder, as in the setup steps. Everything it needs is already in reach.
  • The notes folder is background for another project. You run Claude Code in a code or client project, and its CLAUDE.md says where your notes live and when to read them, for example: "Background decisions and preferences live in ~/second-brain/notes. Read the relevant ones before planning." Claude Code asks permission before it reads outside the working folder, and /add-dir adds the notes folder to the session for good.

Memory only helps if it is current, so close the loop at the end of a working session: "Write what we decided today to notes/decisions/ with today's date and link it to the related notes." A stale note that contradicts today's decision is worse than no note, which is why the weekly pass and the archive folder matter.

Is Obsidian good for Claude Code?

Yes, because Obsidian keeps notes as plain markdown files on your own disk, which is exactly what Claude Code reads and edits best. There is no database to query and no export step. Obsidian gives you the human view, with links, search and a graph, while Claude Code works on the same files underneath.

Two caveats are worth knowing before you commit to it:

  • Plain notes travel; plugin data may not. Wikilinks, embeds, callouts and frontmatter properties are all plain text Claude Code understands. Plugins that keep their data in their own formats, such as canvases or database views, are less legible to it. Keep the knowledge itself in ordinary notes.
  • Sync works, simultaneous edits do not. If you sync the folder with Obsidian Sync, iCloud or Dropbox, Claude Code's edits sync like yours. Avoid editing the same note in Obsidian while Claude Code is rewriting it; git shows you what happened if you do.

The deeper reason the pairing works is ownership. The notes are files on your disk in the most portable format there is. If a better model or a better editor ships next year, you point it at the same folder and keep going.

Does Claude Code retain memory?

Not by itself. Each Claude Code session starts with a fresh context window. What carries over is what it reads at startup: CLAUDE.md files in your project and home folder, plus any notes you tell it to open. A second brain turns that startup read into real memory: decisions, sources and context that persist between sessions.

You can resume an earlier conversation with claude --continue, and recent versions can save short memory notes of their own. Both help within a project. Neither is a replacement for a knowledge base you can read, edit, search and move to another tool.

The practical split: keep CLAUDE.md short and about how to work (structure, rules, where things live), and keep what you know in the notes it points to. A 2,000 line CLAUDE.md gets read every session whether it is relevant or not; a well-titled notes folder gets read when it is needed. If you want the same pattern for marketing context specifically, the CLAUDE.md for marketing setup guide walks through it.

Can Claude Code be used with Obsidian CLI?

Yes. Claude Code runs terminal commands, so it can drive any command-line tool installed on your machine, including an Obsidian CLI. For a second brain you rarely need one: the notes are plain files Claude Code reads and edits directly. Reach for the CLI or an Obsidian MCP server only for actions files cannot do.

There are four ways to connect the two, and most people only need the first.

MethodHow it connectsBest forWhat it needs
Direct file access (start here)Claude Code runs in the notes folder and reads and edits the markdown filesDaily second brain work: filing, linking, answeringClaude Code, nothing else
Obsidian MCP serverA community MCP server exposes Obsidian notes and search as tools, usually through the Local REST API community pluginClaude Desktop or other chat apps that cannot read your diskObsidian running, the plugin, an API key, and the server added to your AI app
Command-line interfaceClaude Code runs an Obsidian CLI like any other terminal commandScripting Obsidian actions, such as opening a note or running a commandA CLI installed on your machine
Obsidian pluginA community plugin opens a Claude Code session in an Obsidian side panelWorking without leaving the Obsidian windowThe plugin, and a review of what it can run

When is an Obsidian MCP server worth it?

MCP, the Model Context Protocol, is the standard way to give an AI app new tools. An Obsidian MCP server earns its setup in three cases: you work from a chat app such as Claude Desktop that has no access to your files; you want Obsidian's own search or the note you have open right now; or you want the AI to run Obsidian commands. In Claude Code you add one with claude mcp add.

If Claude Code already sits in the notes folder, an MCP server adds a running app, a plugin, an API key and one more thing to break, all to do what reading a file already does. And any MCP server can read and write your notes, so install only ones whose code and maintainer you have checked.

Is there an Obsidian plugin for Claude Code skills?

You do not need one. Community plugins can open a Claude Code session in an Obsidian side panel, which is handy, but skills work without any plugin. A Claude Code skill is a folder with a SKILL.md file, stored in .claude/skills inside your notes folder, and Claude Code uses it when a task matches.

Skills are where a second brain starts to feel like a colleague. Each one is a short markdown file describing a job and how to do it, and three cover most of the maintenance:

  • process-inbox: the weekly filing pass, with your rules for titles, sources and links.
  • weekly-review: what changed this week, what is overdue, what contradicts what.
  • source-check: find notes with no Source line, or sources you marked low confidence, before you rely on them.

Because skills live in .claude/skills, Obsidian hides them from your notes view. Edit them in any text editor, and commit them with the rest of the folder. If you do install a plugin that runs Claude Code inside Obsidian, check who maintains it and what it is allowed to execute: it runs commands on your machine.

Why are people using Obsidian with Claude?

Because it splits the work the right way. Obsidian is a good place for a person to read, link and browse notes, and Claude is good at the tedious part: filing captures, linking related ideas, summarizing sources and answering from the whole collection. The notes stay plain files you own, so neither tool locks them in.

The old critique of second brains was that they were write-only: people captured diligently and retrieved almost never. What changed is that an AI can now be the maintenance and retrieval layer. It reads every note before it answers, files what you captured, and writes back what it learns. Andrej Karpathy's idea of an LLM-maintained wiki made the same point to a wide audience: let the model keep the knowledge base, and keep the knowledge base in plain files.

That is also why the pairing beats keeping context inside one chat product. A chat app's memory lives in someone else's format. An Obsidian folder is yours, readable by Claude today and by whatever you use next.

Is second brain worth it?

For your own thinking, yes, if you keep the habit: a capture reflex and a weekly pass. The payoff is that Claude answers from your decisions instead of generic advice. It is worth more when other people depend on it, because then it has to be a professional knowledge base: sourced, tested and ready to hand over.

A personal second brain can tolerate gaps. You are the only reader, and when retrieval fails you search harder. A business cannot. Once a team and its AI tools depend on the system, every claim needs a source, retrieval needs testing on a schedule, and the whole thing has to survive being handed to someone who did not build it.

That gap is where the skill in this guide becomes client work. Most businesses experimenting with AI are pointing capable models at un-curated piles of documents and getting fluent, wrong answers back. Building them a knowledge base their AI can actually use, with the same plain files and the same Claude Code workflow, is a bounded engagement a consultant or service provider can scope, deliver and hand off.

For consultants and service providers

Build second brains for clients

Build and Deliver Professional Second Brains is a self-paced course on doing this for other people: scoping the engagement, building a knowledge base from a client's real material, testing retrieval, and handing it over, with a full simulated client engagement to practice on. Same plain files, no coding, no vector database.

Explore the course
Want a knowledge base like this built and kept current for your own brand, without running it by hand? Brand Architect does that.