Build an AI Second Brain with Claude Code
Set up an AI-powered knowledge base using Karpathy's LLM Wiki pattern with Claude Code and Obsidian.
Project work by Sean Fitzgerald on NextWork.
Introducing Today's Project!
In this project, I’m building an AI-powered second brain using Claude Code and Obsidian to centralize my knowledge, conversations, and project data. It will ingest content from AI agents (Jarvis/OpenClaw), ChatGPT, Claude, and my development and trading workflows, then organize it into a searchable, cross-linked knowledge base.
My goal is to eliminate scattered information and create a single system where I can quickly retrieve decisions, track ideas, and maintain long-term context. This will also support my AI agents with persistent memory, improving automation and decision-making across projects.
Ultimately, I’m creating a self-improving knowledge system that compounds over time and increases my speed, clarity, and execution.
Installing Obsidian and Claude Code
In this step, we are installing Obsidian and creating a vault. I already have Claude Code installed and used on the daily and will verify it's ready.
Verifying my Claude Code install
I installed Claude CLI and have version 2.1.114 Claude code
Building the Vault Architecture
In this step, I am creating the foundation and folder structure for my Obsidian vault so it can grow in an organized way. The raw/ folder is for unprocessed source material such as clipped articles, transcripts, exports, notes from AI chats, and anything I have not reviewed yet. The wiki/ folder is for cleaned, summarized, connected knowledge that I want to keep as part of my long-term second brain. This separation is important because it prevents messy incoming information from being mixed with trusted, refined notes. It makes ingestion easier, keeps my vault clean, and helps Claude or any other AI work with clearer context. raw/ is the inbox and staging area; wiki/ is the curated knowledge base.
Inside the wiki/ folder
Claude created four subfolders inside my wiki directory.
Configuring CLAUDE.md and Slash Commands
In these steps, we're going to generate a claud.md file and schema. Claude code will then use this as scaffolding in Claude/commands with four real/commands. Then we're going to test it and make sure that it all works correctly.
The four slash command workflows
The CLAUDE.md file has four main sections that guide how Claude works in my vault.
Project Structure: Explains the folder layout (raw, wiki, projects, areas, resources, archive) and where different types of information belong. Content Flow: Defines how information moves through the system, from raw inputs to processed knowledge in the wiki, ensuring nothing unstructured mixes with final notes. Domain Context: Describes what I work on, including AI development, multi-agent systems like Jarvis and OpenClaw, algorithmic trading, backend systems, automation, and SaaS projects. Operating Instructions: Tells Claude how to behave in the vault—how to write, organize, and avoid modifying raw data while keeping everything consistent.
Scaffolding the slash commands
Claude Code treats each file inside .claude/commands/ as a reusable custom slash command. The filename becomes the command name, like /ingest or /query. When I run one of those commands, Claude reads that file’s frontmatter and prompt body to understand what the command is for, what arguments it expects, and what steps it should follow. This lets me store repeatable workflows as command files instead of rewriting the same prompt every time. In my vault, these command files act like saved instructions that turn Claude into a more structured tool for ingesting notes, querying knowledge, checking wiki health, and logging updates consistently.
Converting Source Notes Into the raw/ Folder
In this step, I’m going to export my existing notes and AI conversations from tools like ChatGPT and Claude, then import them into my vault. I’ll place the raw data into the raw/ folder and use Claude Code to convert any JSON or unstructured data into clean, readable markdown. This gives my vault real content to work with instead of starting empty. After importing, I’ll verify everything in Obsidian and prepare it for processing through my system, where raw inputs will later be transformed into structured knowledge inside the wiki/.