MemberPress AI Academy memberpress.ai

Recipes

Set Up Claude Code with a Brain Vault

Wire Claude Code to a long-lived Obsidian vault so every session starts with the context, decisions, and prior conversations the previous session earned.

Intermediate25 minBy Seth Shoultes

Overview

An Obsidian vault at ~/brain wired to Claude Code as persistent memory — so the next session knows what the last one figured out.

Why a Brain Vault

I work across a lot of projects with Claude Code. Each session has a context window, which closes when the session closes. A pattern I figured out yesterday in one project is gone tomorrow when I'm in a different project unless I wrote it down somewhere both me and Claude can read.

The fix is a personal knowledge vault — an Obsidian vault at ~/brain that lives outside any single project. Claude Code reads from it on startup, can save to it during a session, and rebuilds a search index on every commit.

What You'll Build

Prerequisites

Steps

Step 1 — Create the vault

Create ~/brain with folders: journal/, learnings/, projects/, repos/, runbooks/, scripts/, templates/.

Step 2 — Write CLAUDE.md

Place a CLAUDE.md at ~/brain/CLAUDE.md describing the vault structure, naming conventions, and how to save notes.

Step 3 — Create the /brain skill

Write ~/.claude/skills/brain/SKILL.md with instructions for drafting, approving, and committing learning notes.

Step 4 — Configure hooks

Add SessionStart and Stop hooks to your Claude Code configuration that prime context and prompt for saves.

Step 5 — Set up auto-commit

Install the Obsidian Git plugin and configure a 10-minute auto-push to GitHub.

Step 6 — Build the search index

Write a small Python script using Ollama embeddings to index all notes and expose a brain shell command.

Companion Skill

set-up-claude-code-with-brain-vault

Reference Repo

github.com/sethshoultes/building-with-ai-brain