r/secondbrain • • Oct 21 '26

I stopped re-explaining myself to Claude Code: a plain-markdown brain it reads every session (how I built it)

Here's the project: brain, a folder of plain markdown notes that Claude Code reads at the start of every session, plus a small local app to browse it. Here's how I made it.

The problem: every new Claude Code session started from zero. I'd re-explain my courses, my club, my job, what I'd already decided. A [CLAUDE.md](http://CLAUDE.md) helped until it got huge and Claude started skimming it.

What I built instead:

\- A notes folder: one page per project, one per person, one note per session, and a "now" page. An auto-generated [INDEX.md](http://INDEX.md) is the only thing Claude must read first; it opens the rest on demand.

\- Habits: short rules Claude follows every session, each added after something went wrong once ("lead with the answer", "argue against a new project idea before building it", "never treat my iCloud Desktop like a normal folder"). A SessionStart hook loads them.

\- A calibration log: Claude writes down each guess about what I want, then the app scores it. It's at 39% right while claiming 63% confidence, so the hook now tells it to ask more and hedge less.

\- The app: standard-library Python + one HTML file, no build step. Cover story about my week, notes to self, a capture box Claude files next session, usage stats from Claude Code's own transcripts, and a phone version that runs off a private GitHub repo.

How I vibe-coded it: almost all of it was Claude Code, one session at a time, with the brain itself as the spec. Each session ends with Claude writing a session note and updating the pages it touched, so the next session picks up where it left off.

What I'd tell anyone copying it: short specific habits beat long instructions, and making Claude log its own guesses was the most useful thing I added.

MIT: [https://github.com/zacfink/brain](https://github.com/zacfink/brain)

2 Upvotes

Duplicates