Journal / Build your second brain

Build your second brain

The method is not mine, it is Andrej Karpathy's. Here are the three layers, the three operations, what I added to it, and where to start.

In I have a second brain I describe the second brain I have been using since April: what it holds, the four rules that keep it standing, and what it produces when you drop a source into it without asking for anything.

Here is how to build yours.

First thing: the method is not mine. It is Andrej Karpathy's, it is called LLM Wiki, it fits on one public page and it is written to be handed to an agent as it stands. Go and read it, that is the real source.

What follows is what I made of it, and what I changed.

The architecture, in three layers

Here is what mine looks like today. The essentials were in place on day one, out of the bootstrapping conversation with the agent. The structure has barely moved since: only the inbox arrived later, with the Telegram bot.

my-brain/
├── CLAUDE.md       the schema: what the agent reads first
├── AGENTS.md       the same contract, for Codex
├── .ai/            the detailed rules: structure, flows
│
├── 00-inbox/       you drop things here, no thinking, no filing
├── raw/            the raw sources, dated, never modified
│
├── 01-projects/    the wiki: live projects
├── 02-areas/       the wiki: subjects followed long-term
├── 03-knowledge/   the wiki: reusable knowledge
│
├── index.md        the map: one line per page
└── log.md          the record: what the agent did, dated

The three groups separated by a blank line are the three layers.

The raw sources

Everything that comes in, never modified. This is what counts as true.

The wiki

The pages written by the agent: summaries, concept pages, syntheses. It owns them entirely. It creates, updates, maintains the cross-references. You read, it writes.

The schema

A file that tells the agent how everything is organised, what the conventions are, and what to do when a source arrives. In practice: a CLAUDE.md for Claude Code, an AGENTS.md for Codex. It is the centrepiece, the thing that turns a chatbot into a disciplined archivist. You develop it with the agent, over the weeks.

What you deliver at install time is not the content. It is that schema file.

The three operations

Karpathy describes three. I turned them into three skills, launched from Claude Code by name.

/process, take things in

Empty the inbox. The agent reads each item in full, decides where it goes, extracts what matters, links it to neighbouring notes, archives the dated original, updates the index, adds a line to the record. A single source can touch ten pages.

/review, ask questions

You ask a question, the agent searches, reads, synthesises. A good answer gets filed in the wiki. A comparison, an analysis, a connection found while talking should not end up in a conversation history. Your explorations accumulate like everything else.

/improve, keep it standing

Look for contradictions between pages, claims a more recent source has made obsolete, orphan pages nothing links to, concepts cited everywhere but with no page of their own. This is what stops the whole thing rotting as it grows.

A skill is not a mysterious object: it is a markdown file dropped in the .claude/commands/ folder at the root of your brain. The filename becomes the skill name, process.md gives /process. Inside, you write the procedure in plain language, the way you would explain it to someone. That is all.

Here are my three, stripped of what is specific to me. They paste in as they are.

/process
---
description: Empty the inbox and file what is in it
---

Process everything in 00-inbox/.

For each item:
- read it in full, never just the title;
- if it is a link, open the page and read it before filing it;
- decide where it goes: a live project, a subject I follow, or a
  knowledge page that will be useful elsewhere;
- update an existing page when there is one, rather than creating
  another;
- link the page to its neighbours with [[wikilinks]];
- move the original into raw/, prefixed with the date, unmodified;
- add or correct its line in index.md.

When you cannot read a source, an unreachable page or content that
is too short, say so, keep the link pending, and move to the next.
Never invent a summary from a title.

When a source relates to nothing, say so plainly rather than
manufacturing a link for it. Archive it in raw/ anyway.

Finish with a line in log.md: the date, what you processed, and what
changed.
/review
---
description: Take stock of what the brain holds
---

Go through the projects, the subjects followed and the knowledge
pages, then answer my question. If I do not ask one, give me the
general picture.

Cite specific pages, with their path. No generic advice.

What I want to see:
- what I am working on right now, and what has moved since last
  time;
- what is out of date: a page describing a situation that has
  changed;
- what keeps coming up across several projects without having its
  own page;
- what was left hanging.

Then file your answer. A synthesis that took work has no business
sitting in a conversation history: write it into the brain, in the
right place, and link it to the pages it concerns. Add a line to
log.md.
/improve
---
description: Maintain the structure of the brain
---

Look for what decays as it grows:
- pages saying the same thing twice: merge them, keep the stronger;
- claims a more recent source has made obsolete;
- orphan pages, linked by nothing and linking to nothing;
- concepts cited everywhere but with no page of their own;
- links pointing at a page that does not exist.

Do not create a file for the sake of creating one. Simplifying
counts for more than adding.

A check that means reviewing every file is not done by reading: you
will read a sample, and report on the sample. When that is the case,
orphan pages and dead links for instance, write yourself a small
script, run it, and work from its output.

Say what you changed, and why.

That last paragraph is worth stopping on, because it cost me a few months. "Find the orphan pages" looks like a clear instruction, and it is not: an agent will read fifteen files or so and honestly report what it saw in those fifteen. It did not lie, it answered on a sample. The check itself required going through all of them.

I did not work that out myself: the agent offered to write a script, because it was cheaper than rereading everything on every pass. It is a habit worth picking up, and it goes well beyond the brain. I will come back to it.

Three skills, written once. That is the whole toolchain.

Obsidian on top

I have to be able to read my brain myself.

It is markdown, so Obsidian opens it as it is, with no import or conversion. You just point a vault at the folder. The [[wikilinks]] the method uses are Obsidian's native syntax, and that is no accident: it is the setup Karpathy describes himself, the agent open on one side, Obsidian on the other.

Three things there genuinely earn their place. Backlinks, to see at a glance what points at the page you have open. The Web Clipper, the browser extension that saves an article straight into the inbox, a second way in alongside the phone. And the graph view.

The graph view is not decoration. Past fifty pages or so, it shows at a glance what has become a junction and what is floating on its own. The isolated dots are exactly what the maintenance skill should be dealing with.

What I changed

Three departures from the original text.

Karpathy gives examples by domain: a piece of research, a book, a subject you are digging into. Mine holds everything in one place, client projects alongside unrelated ideas, reading alongside the watchlist. The price: a slightly stricter structure, written from the start.

I added an inbox, and the frictionless capture that goes with it. Karpathy chooses his sources deliberately and handles them one at a time, staying in the conversation. I send a link at midnight without thinking about it, and we sort later, in batches. Capturing must require no decision, otherwise you do not capture.

And I turned his three operations into skills, committed in the repo. For him they are workflows described to the agent in the schema. For me they are three markdown files launched by name, replaying the process identically, even in six months.

Do not create twenty folders

The tree at the top of this article came out of a conversation, on day one: the agent reads Karpathy's text, asks its questions, proposes a structure, I approve it. Do not copy it as it stands. Yours should come out of your own conversation, based on what you actually intend to put in it.

After that, let the structure grow from what you genuinely drop into it. My personal section, with its watchlist, was not planned: it appeared the day I dropped in a series to watch, to test my prompts. The agent asked whether we were opening a list, I said yes. That is how a folder earns its place: when something needs to go in it, and not before.

That is exactly what Karpathy says: the schema, you develop with the agent. You do not write it alone in advance.

Here is what you need to start that conversation. Fill in the first four lines, paste the rest as it is, and let the agent ask its questions before writing anything. It produces a single file, your schema, and three folders. Not the full tree from the top of this article: that one you will only reach by dropping things in.

Bootstrapping prompt
You are going to help me build a second brain that you will
maintain yourself.

WHO I AM: [YOUR NAME, WHAT YOU DO]
WHAT I WORK ON: [TWO OR THREE PROJECTS OR CLIENTS]
THE TOOL I USE: [CLAUDE CODE / CODEX / OTHER]
WHERE THE FOLDER LIVES: [PATH, FOR EXAMPLE ~/my-brain]

BEFORE WRITING
Ask me up to five questions, one at a time, and only the ones whose
answer would change what you are about to write. Once I have
answered, write it all in one go.

WHAT TO WRITE
A single file, CLAUDE.md, at the root of the folder. It contains:
- what this brain is, and what it is for in my particular case;
- the folders that exist today, and no more: 00-inbox/ for what I
  drop in, raw/ for archived sources, index.md for the map. Three,
  not twenty;
- the conventions: lowercase filenames with hyphens, links between
  pages as [[wikilinks]], nothing in raw/ is modified after the
  fact;
- what you do when a source arrives in 00-inbox/: read it in full,
  extract what matters, link it to neighbouring pages, archive the
  dated original in raw/, update index.md;
- when to create another folder: the day something I drop in
  belongs in none of the existing ones. You ask me before creating
  it.

RULES
Plain English, one sentence per rule, no jargon.
When you are missing information about me, write [TO FILL IN] and
carry on.
Never invent a fact about me, my work or my projects.
Create no folder I have not confirmed.

TO FINISH
Save the file, tell me in one line how to point the tool at it, and
remind me of the single habit to keep: drop things in 00-inbox/
without thinking, then ask you to process.

One thing to avoid: do not take five years of existing notes and try to file them. It never ends, and half of it no longer matters. Start from now.

Allow an evening for the install. After that it asks for one habit only: dropping things in.

The day you drop a link without thinking, and get an answer back with a decision to make on a live project, you will know it is working.

Read next.

All essays