Field Guide · v2.0 · 7 sections

Turn every AI chat into one searchable brain, then teach Claude to read it.

Unify your terminal Claude Code history, your Claude.ai web chats, and your ChatGPT conversations into one Obsidian vault. Then install a tiny skill so Claude reads it before any code work — no more re-explaining a project for the tenth time. About 60 minutes hands-on today + 30 minutes when your exports arrive.

Hands-on today
~60 min
When exports arrive
~30 min
ChatGPT wait
1–3 days
Tools
Claude Code, Obsidian, Python
§ 01 Before you begin 2 min read

What you'll need.

Three things make this work: Claude Code (the CLI engine that runs the parallel sub-agents and reads the brain), Obsidian (the viewer), and Python 3 (for the parser scripts). Tick these off before you dive in.

You really do need Claude Code
Without it, your chats won't tag and link automatically — and the recall skill (the entire point) won't have anywhere to live. If you don't have Claude Code yet, set that up first, then come back.

Tick these off as you go

  • Claude Code installed (the CLI) — the engine that runs the parallel sub-agents
  • Obsidian installed (free, from obsidian.md) — the app that browses your vault
  • Python 3.10+ available on your shell — for the parser scripts
  • ~500 MB free disk for a typical 1–2 year history
  • About 60 minutes hands-on today, plus 30 minutes when your exports arrive
§ 02 Kick off your exports ~10 min active

Start ChatGPT first, then Claude, then clone the scripts.

ChatGPT's export can take 1–3 days, so kick it off first to start the timer. Claude.ai's export arrives in about 5 minutes. While you wait, clone the script repo — we'll use it in the next section to build the vault from your terminal Claude Code history, which is already on disk and ready to go.

  • Go to chatgpt.com
  • Click your profile iconSettings
  • Open Data Controls
  • Click "Export data"
  • Be patient — the email can take a couple days
  • When it lands, download the ZIP and unzip it
  • Inside, you'll find one or more conversations-XXX.json files
  • Go to claude.ai
  • Click your profile icon in the bottom-left corner
  • Open Settings
  • Click "Export Data" under Privacy
  • Your download link arrives within 5 minutes
  • Unzip the file — the folder contains a conversations.json file plus a few extras
  • Open your terminal
  • Run the clone command below ↓
  • Every script and prompt referenced in the rest of this guide lives in the repo
~ / terminal
$ git clone https://github.com/M1w234/claude-brain-builder ~/claude-brain-builder
$ cd ~/claude-brain-builder
Only use one of the two? Totally fine.
If you only chat with Claude, skip the ChatGPT tab and Section 06 — you'll be done sooner. If you only use ChatGPT, kick off that export now and come back when the email lands; the same scripts handle either source.
§ 03 Build the vault from your terminal sessions ~5 min

Your local Claude Code history is the first data source.

Claude Code stores every terminal conversation locally as JSONL under ~/.claude/projects/. That data is already on disk — no export wait. We'll parse it into markdown first, then layer the Claude.ai and ChatGPT web exports on top in later sections.

Scaffold the vault directory

  • Open your terminal
  • Run the scaffold command below to create the vault folders ↓
  • Copy the scripts from the cloned repo into the vault's build directory
~ / terminal
$ mkdir -p ~/ClaudeCodeBrain/{projects,topics,tools,entities,_build/scripts,_build/reports,_build/assignments}
$ cp ~/claude-brain-builder/scripts/*.py ~/ClaudeCodeBrain/_build/scripts/

Parse your terminal JSONL → markdown

  • Run the export script — it walks ~/.claude/projects/, dedupes by working directory (worktrees collapse to their root), wraps tool calls in collapsible blocks, and writes one markdown file per session
  • Wait for the "wrote N sessions" message — usually under a minute even for years of history
~ / terminal
$ python3 ~/ClaudeCodeBrain/_build/scripts/export.py
What you should see
Roughly one markdown file per session under ~/ClaudeCodeBrain/projects/<project>/sessions/. Each one has YAML frontmatter (session id, project, date) plus the rendered conversation. If you have nothing in ~/.claude/projects/ yet, skip ahead to Section 06 and start with your web exports.
§ 04 Run Claude Code — link everything together ~15 min

Ten parallel sub-agents tag and link every conversation.

The export gave you raw markdown files. This step uses Claude Code to spawn 10 sub-agents in parallel, each extracting topics, tools, and entities from a slice of your sessions and weaving them together with wikilinks. Then a Python script consolidates the results into hub pages.

1. Split sessions into 10 balanced slices

  • Run the splitter — it does balanced bin-packing so all 10 agents finish at roughly the same time
~ / terminal
$ python3 ~/ClaudeCodeBrain/_build/scripts/split_assignments.py

2. Dispatch 10 backlink agents inside Claude Code

  • Open a Claude Code window (anywhere — your home directory works fine)
  • Paste the orchestration prompt below ↓ — Claude will read the agent instructions and spawn all 10 sub-agents in parallel
  • Wait for all 10 completion messages (~5–15 minutes wall-clock)
claude code · 10-agent orchestrator
Spawn 10 parallel backlink agents using the Agent tool. Each agent gets a number 01-10. Brief each one with the instructions at ~/claude-brain-builder/prompts/backlink_terminal_agent.md and its assignment list at ~/ClaudeCodeBrain/_build/assignments/agent_NN.txt. Set run_in_background: true for all 10. Reports go to ~/ClaudeCodeBrain/_build/reports/agent_NN.json.

3. Consolidate the reports into hub pages

  • Run the consolidate script — it reads all 10 JSON reports and writes one markdown page per topic, tool, and entity into topics/, tools/, entities/, plus a TOP-TOPICS.md leaderboard
  • Run the rollup script — it walks the vault and rebuilds the project index + the top-level README from disk
  • Open Obsidian → Open folder as vault → pick ~/ClaudeCodeBrain/ → confirm the README renders and the project index is populated
~ / terminal
$ python3 ~/ClaudeCodeBrain/_build/scripts/consolidate.py
$ python3 ~/ClaudeCodeBrain/_build/scripts/rebuild_rollups.py
Hit Cmd+G in Obsidian
You'll see your terminal Claude Code history rendered as a graph: project rollups in the center, sessions branching out, topics and tools forming connective tissue. Web exports get woven in later.
§ 05 Install the recall skill ~3 min · this is the point

Teach Claude to read your brain before it writes any code.

Without this step, the vault is just a searchable archive. With it, Claude Code reads your past sessions before any code work whenever you use a trigger phrase like "let's work on X" or "check my brain for Y." That's the difference between an archive and a brain.

1. Drop the skill into Claude Code

  • Create the skill directory and copy the skill file from the repo ↓
  • Restart any running Claude Code sessions so the new skill loads
~ / terminal
$ mkdir -p ~/.claude/skills/claude-brain
$ cp ~/claude-brain-builder/skill/claude-brain/SKILL.md ~/.claude/skills/claude-brain/

2. Drop the /slay sync command

  • Copy the slay command file into your Claude Code commands directory ↓
  • /slay will pull any new Claude Code sessions into the vault incrementally, without re-running the 10-agent backlink pass
~ / terminal
$ mkdir -p ~/.claude/commands
$ cp ~/claude-brain-builder/commands/slay.md ~/.claude/commands/

3. Test it

  • Open a fresh Claude Code window in any directory
  • Type one of the trigger phrases (substitute a real project name) ↓
  • Claude should pause, read the vault README and the project rollup, then summarize what you built before doing anything else
  • If Claude just dives straight into code without reading first, double-check that ~/.claude/skills/claude-brain/SKILL.md exists
claude code · test phrase
let's work on my-project
That moment is the payoff
When Claude says "I see from your brain that last time you got Twilio approved and were drafting the consent flow, want to continue there?" — that's the entire reason this whole build exists. Without the skill, you'd just have a really pretty Obsidian vault.
§ 06 Fold in your web exports ~25 min each, once they arrive

Same pattern, twice: parse → 10 agents → consolidate.

Your Claude.ai export should already be in your inbox (it arrives in ~5 min). ChatGPT takes 1–3 days. When each one lands, you'll use the same flow: a Python script to parse the JSON into markdown, 10 parallel sub-agents to backlink, then re-run consolidate. All three data sources end up cross-linked in the same topic/tool/entity hubs.

Bookmark this page
Your progress is saved locally. Close the tab now, come back when each export email arrives, and pick up right here.

When the Claude.ai email arrives (~5 min)

  • Download the ZIP from Anthropic's email and unzip it
  • Run the importer below, pointing at the unzipped folder ↓
  • Re-run the splitter for the web archive, then dispatch 10 more sub-agents (different prompt — see the repo)
  • Re-run the consolidate script to merge the web archive into the same topic hubs as your terminal work
~ / terminal
$ python3 ~/ClaudeCodeBrain/_build/scripts/import_claude_web.py /path/to/claude-export-dir
$ mkdir -p ~/ClaudeCodeBrain/_build/{web_assignments,web_reports}
$ python3 ~/ClaudeCodeBrain/_build/scripts/split_web_assignments.py
claude code · web backlink orchestrator
Spawn 10 parallel web backlink agents using the Agent tool. Each gets a number 01-10. Brief each with ~/claude-brain-builder/prompts/backlink_web_agent.md and its assignment list at ~/ClaudeCodeBrain/_build/web_assignments/agent_NN.txt. Reports go to ~/ClaudeCodeBrain/_build/web_reports/agent_NN.json. Set run_in_background: true for all 10.
~ / terminal
$ python3 ~/ClaudeCodeBrain/_build/scripts/consolidate.py

When the ChatGPT email arrives (1–3 days)

  • Download the ChatGPT ZIP from OpenAI's email and unzip it
  • Run the ChatGPT importer below — it follows the displayed-thread chain and writes one markdown file per conversation, using the same frontmatter shape as the Claude.ai import
  • Re-run the web splitter (it picks up the new files), dispatch 10 sub-agents with the same web backlink prompt, then re-run consolidate
~ / terminal
$ python3 ~/ClaudeCodeBrain/_build/scripts/import_chatgpt.py /path/to/chatgpt-export-dir
$ python3 ~/ClaudeCodeBrain/_build/scripts/split_web_assignments.py
ChatGPT's schema can drift
OpenAI occasionally tweaks the export format. Before running on the full set, inspect a sample conversation rendered by the importer to make sure the messages came out right. The script is a working stub — adjust the message-walking code if the shape looks off.
§ 07 What you get & ongoing maintenance Wrap up

One brain, three sources, indefinitely fresh.

Here's what comes out the other side, what to run periodically to keep it current, and a final checklist that covers both today's session and the future ones when your exports arrive.

Every conversation as a markdown file

Terminal sessions, Claude.ai chats, and ChatGPT chats all stored locally as markdown with YAML frontmatter. Portable, searchable, and ready to live forever in plain text.

Topic, tool, and entity hubs

Every conversation tagged with the topics, tools, and entities it touched. topics/n8n-workflow.md shows every chat across all three sources that mentioned n8n.

Auto-recall in every Claude Code session

Say "let's work on X" in any new Claude Code window and the claude-brain skill reads the relevant project rollup before any code work. No more re-priming.

Full-text search across years

Cmd+Shift+F in Obsidian searches every conversation you've ever had with any of the models. That thing you said three years ago is right there.

Incremental sync via /slay

Run /slay in any Claude Code window to pull in new terminal sessions since your last sync. Backlinks on old sessions stay intact. Re-run the full agent pass when you've accumulated 30+ new sessions.

Quick reference

Data sourceExport timeFile formatWhere to find it
Terminal Claude Code none JSONL on disk ~/.claude/projects/
Claude.ai web ~5 min conversations.json Settings → Privacy → Export Data
ChatGPT 1–3 days conversations-XXX.json Settings → Data Controls → Export
Reference

Everything covered, in one list

A condensed version of the whole build — useful as a one-page reminder when you come back to do this on a second machine, or hand it to someone you're walking through it.

  • Kicked off the ChatGPT export (Settings → Data Controls → Export)
  • Requested the Claude.ai export (Settings → Privacy → Export Data)
  • Cloned https://github.com/M1w234/claude-brain-builder to ~/claude-brain-builder/
  • Installed Claude Code, Obsidian, and Python 3.10+
  • Scaffolded ~/ClaudeCodeBrain/ and ran export.py on terminal sessions
  • Spawned 10 parallel backlink agents and waited for all completion messages
  • Ran consolidate.py and rebuild_rollups.py
  • Copied SKILL.md to ~/.claude/skills/claude-brain/
  • Copied slay.md to ~/.claude/commands/
  • Tested with "let's work on X" in a fresh Claude Code session — Claude read the vault first
  • Opened the vault in Obsidian, hit Cmd+G, confirmed the graph rendered
  • Downloaded the Claude.ai export and ran import_claude_web.py
  • Dispatched 10 web backlink sub-agents and waited for all completions
  • Re-ran consolidate.py — Claude.ai conversations folded into the same topic hubs
  • Downloaded the ChatGPT export (1–3 days later) and ran import_chatgpt.py
  • Dispatched 10 more sub-agents and re-ran consolidate
  • Set a recurring reminder to run /slay after meaningful Claude Code sessions
  • Grepped the vault for sk-, AIzaSy, and eyJ before sharing it with anyone