,

Obsidian as a Second Brain: The Claude Code Setup

Obsidian as a Second Brain: The Claude Code Setup

A few years ago I built a “second brain” in Notion. It was tidy. Color-coded. Very satisfying to look at.

Then I started running ten newsletters, four YouTube channels, a WordPress site, a Skool course, and a bookings pipeline out of it, and the whole thing collapsed under its own weight. Notion’s API rate limits kicked in. The AI integrations were brittle. Every time I wanted Claude to touch a file, I was exporting markdown, pasting it somewhere, then copying the output back.

That’s not a second brain. That’s a second job.

This post is about the setup that replaced it: Obsidian + Claude Code. Not the beginner version where you install a few plugins and feel organized. The version where Claude can read everything you’ve ever written, draft in your voice, and ship work to six different platforms — all from the same vault. And where you stay in control of every external action before it fires.

If you built the Notion setup we covered here and found it hitting walls, this is the next step.


Why Obsidian when AI is in the loop

The core reason is simple: Obsidian stores everything as plain markdown files on your hard drive. Claude Code can read every one of them natively. No API, no rate limits, no export step.

When Claude Code launches in your vault directory, it can Read, Grep, and Glob across thousands of notes in seconds. It can find every newsletter issue you’ve published, every YouTube script, every draft you abandoned — and use all of it as context when it generates something new. Your voice is already in those files. Claude just reads them.

With Notion, you’re paying an API tax on every interaction. You’re also trusting Notion’s servers to be available, their API to not break, and their export format to stay consistent. Local markdown has none of those dependencies. The vault is the context window.

There’s one more thing: because the vault lives on your filesystem, Claude Code can write back to it. It can create a draft note, update a log file, append to a project channel — all without leaving the system. The loop is closed.


The architecture: folders as channels

The structural insight that makes this work comes from watching how enterprise AI agents handle context. When Viktor (an AI agent from Zeta Labs) ran across multiple Slack channels, each channel was just a filesystem path. Different path = different context = different rules and memory. The AI knew what it was doing because the folder told it.

Obsidian folders work the same way.

Here’s the top-level structure I use:

vault/
├── CLAUDE.md               ← global identity, routing rules, hard limits
├── 10_Projects/
│   ├── WordPress/          ← blog posts, tool directory
│   │   ├── CLAUDE.md       ← WP auth, sacred pages, SEO rules, MCP allowed
│   │   ├── drafts/
│   │   ├── Published/      ← voice corpus
│   │   └── channel.md      ← running conversation with Claude
│   ├── Newsletters/        ← all 10 Beehiiv publications
│   ├── YouTube/
│   └── Skool Course/
├── 00_Inbox/               ← raw captures, cleared nightly
└── 50_Daily/               ← daily notes

Each project folder is a scoped agent context. When Claude opens a file in 10_Projects/WordPress/, it loads that folder’s CLAUDE.md on top of the root one. It knows the WP REST endpoint, the authentication, which pages are sacred, and what SEO rules apply — all from the file, not from a prompt I had to type.

This is the thing that actually changes how the system works. You stop configuring Claude every session. The folder configures it for you.


The CLAUDE.md hierarchy

Every folder that Claude regularly works in gets two files: a CLAUDE.md and a channel.md.

CLAUDE.md holds rules. The root one covers identity, safety limits (“never publish without explicit approval”), and channel routing (“WordPress folder uses the WP REST API with app password auth; Newsletters folder uses Beehiiv MCP”). Per-project CLAUDE.mds add the specific details: which pages are off-limits, what the SEO requirements are, what categories and tags to use by default.

The hierarchy is load-bearing. Keep each file under 200 lines. Anything longer and adherence starts dropping — Claude is reading it, not executing it from a database, so length matters. Put brand voice samples in a separate Voice.md and reference it with @Voice.md rather than copying it into every CLAUDE.md.

channel.md is the rolling conversation. You type a request at the bottom, save, and Claude’s watcher replies. Every ping and response is appended in-place. It’s a persistent audit trail — you can scroll back six months and see exactly what was requested, what Claude drafted, and whether it shipped.

The combination means that when Claude opens 10_Projects/WordPress/channel.md, it already knows: who you are, what this project’s rules are, what it’s done here before, and what it’s allowed to do next. No context rebuilding required.


LEARNINGS.md: the actual engine

Here’s the pattern that separates a vault that compounds from one that resets every session.

Viktor’s system ran on a file called LEARNINGS.md — read first on every run, appended to last. In 16 days of real use, this file grew from 3,000 characters to 50,000. It captured things like “this team communicates through code, not Slack” and “always flag when an API is rate-limited instead of silently retrying.” The system got smarter not because the model was retrained, but because the file got richer.

Every project folder in the vault gets its own LEARNINGS.md. Each Claude session reads it at the start and adds a per-run note at the end: what was attempted, what worked, what to avoid next time.

Two weeks of real use and the WordPress one already knows: the tool directory is post ID 3755 (not a page, so query /wp-json/wp/v2/posts/3755 not /pages); the Google favicon service returns a grey globe for dead domains and that’s fine; Beehiiv MCP tools work in the main session but not inside agent sub-sessions.

That’s institutional memory. It’s not stored in Claude’s weights — it’s stored in a file that gets read every time. The difference is you own it, it persists across model updates, and you can read and edit it yourself.

The one rule: cap it at ~300 active lines. Monthly, compact the old per-run notes into summary bullets under “What Stabilized” and archive the raws. Otherwise it blows the context window.


The @claude trigger: three recipes

You want the Slack experience — type @claude do this, it happens. Here’s the spectrum of ways to get there, from easiest to most complete:

Recipe A — sidebar chat (5-minute setup, 90% of the feel). Install the Agent Client or Claudian plugin via BRAT. Both embed Claude Code as a right-panel sidebar with @notename mention support and auto-export sessions to notes. Agent Client has an “auto-mention active note” toggle that effectively routes every chat message to act on whatever note you’re looking at. This is where most people should start.

Recipe B — literal @claude in a note (1-day build, exact Slack parity). A small file-watcher script (chokidar or fswatch, ~40 lines) greps .md files for lines starting with @claude, extracts the instruction, and invokes claude -p --bare --permission-mode acceptEdits. After processing, it replaces the trigger line with @claude:done: [summary] to prevent re-firing on the next save. Run under launchd on macOS so it survives reboots. Add awaitWriteFinish: { stabilityThreshold: 300ms } because Obsidian autosaves aggressively.

Recipe C — always-on terminal + hooks. Run Claude Code continuously in the vault using a terminal plugin like chicogong/obsidian-claude-code. Add a SessionStart hook in .claude/settings.json that greps modified notes for @claude directives and injects them as context. This is how Noah Brier (claudesidian) and Parazettel run their setups — Claude is permanently resident, conversations happen inline.

Start with Recipe A this week. Add Recipe B when you find a specific high-volume channel that needs fully hands-off execution (daily brief generation, newsletter draft queue).


The MCP stack you actually need

This is where it’s easy to get lost. There are hundreds of MCPs. Here are the ones that matter for a creator workflow:

Surface MCP to use
WordPress deus-h/claudeus-wp-mcp — 145 tools, multi-site, auth via Application Passwords
Beehiiv (writes) danvega/beehiiv-mcp-server — Java/Spring Boot, covers the full Beehiiv v2 API
YouTube (reads) kirbah/mcp-youtube — analytics with MongoDB cache to avoid quota limits
YouTube (writes) miller-joe/youtube-mcp — OAuth-authenticated, handles titles/descriptions/thumbnails
Skool Microsoft Playwright MCP + Apify Skool scraper — no native MCP exists yet
Obsidian itself MarkusPfundstein/mcp-obsidian when Obsidian is open; StevenStavrakis/obsidian-mcp when closed

The pattern: declare which MCPs each folder is allowed to use in that folder’s CLAUDE.md. The WordPress folder gets mcp__wordpress__*. The Newsletters folder gets mcp__beehiiv__*. They don’t bleed into each other. This keeps context clean and prevents Claude from calling the wrong API in the wrong channel.


The safety pattern: draft → approve → ship

None of this matters if you can’t trust it. The one rule that makes the system trustworthy is Claude never writes to external systems without an explicit human approval step.

The pattern: Claude writes a draft to your vault. It proposes a plan. You review. You confirm. Then it executes.

For WordPress publishing: Claude drafts to drafts/post-slug.md with status: ready in the frontmatter. When you’re ready to push to WP, you ping “publish this draft” in channel.md. The channel responder routes that to /wp-publish, which calls the WP REST API with status=draft — landing the post in WP admin as a draft, not live. You review it there and hit Publish yourself.

The agent never flips a post live without you touching the WP admin button. That’s the gate.

For higher-trust setups: use an APPROVED.md sentinel file. Claude checks for its existence before firing any publish-type MCP tool. Doesn’t exist? Stop and wait.


A real end-to-end example

Here’s what this looks like in practice.

You’re reading something on your phone. An idea hits. You open Obsidian mobile, create 10_Projects/WordPress/drafts/ideas/rag-vs-context-window.md, jot three bullets, then type at the bottom:

@claude write this up as a 1,200-word beginnersinai.org post in my Sunday style, include a code example

Save.

On your desktop the file watcher fires (Recipe B). Claude loads root + WordPress CLAUDE.md, reads the last five posts in Published/ for voice, drafts the piece in drafts/rag-vs-context-window.md with slug/tags/meta-description in the frontmatter, and replaces the @claude line in your ideas note with @claude:done → [[drafts/rag-vs-context-window]].

Next morning you open the draft, tweak a sentence, ping “publish this draft” in channel.md. The responder calls the WP REST API with status=draft. The post lands in your WP admin. You review, hit Publish.

Total time you touched it: note the idea (1 minute), light edit (5 minutes), WP review (2 minutes). The research, draft, and frontmatter took zero of your minutes.


The vault is the defensible asset

The automation layer is commodity. MCPs get deprecated, API endpoints change, plugins fall behind. What doesn’t change is the corpus of everything you’ve ever published, stored in plain text files you own.

Every post you write back into Published/ is training data for your voice. Every session log is Claude’s institutional memory. In six months, a Claude run in your WordPress folder has read every blog post you’ve published and knows exactly how you open sections, how long your paragraphs run, where you put the CTA, what vocabulary you use.

That’s what Slack-based AI agents couldn’t do. Slack discards. Obsidian compounds.

The @claude trigger is just the keystroke. The vault is the product.


Start here

If you already use Obsidian and want to wire in Claude Code:

  1. Install the Agent Client plugin via BRAT for the sidebar chat (Recipe A — 5 minutes).
  2. Add a root CLAUDE.md with your identity, hard rules, and a channel routing table.
  3. Add a LEARNINGS.md to each project folder you use regularly.
  4. When those two files are doing real work, layer in the MCPs for whatever publishing surface you hit most often.

That’s the minimum viable version. Everything else — the file watcher, subagents, condition scripts — adds on top once you know which channels actually need the automation.

The Notion second brain post walks through the database-and-template version if you want to compare. The tool directory at beginnersinai.org/tools/ has the Obsidian listing alongside every MCP and plugin mentioned here.

Get Smarter About AI Every Morning

Free daily newsletter — one story, one tool, one tip. Plain English, no jargon.

Free forever. Unsubscribe anytime.

If you’d rather keep the thinking off any screen at all, I Built a Paper System With AI covers the paper-and-e-ink version of this same idea.

Two ways to go further

The AI Prompt Library

1,000+ ready-to-use prompts for Claude, ChatGPT, and Gemini. Stop staring at a blank box.

Get it for $39 →

2-Hour Live AI Crash Course

A private, beginner-friendly session across Claude, ChatGPT, Gemini, and the wider landscape.

Book for $125 →