Section 1
What's Actually Worth Stealing
Garry Tan runs Y Combinator, the startup machine behind Airbnb, DoorDash, and Reddit. He took the AI brain that runs his whole operation and open-sourced it as gbrain.
I installed it. Some of it is genuinely insane. But let's be honest: it was built for a billionaire investor tracking deal flow, it quietly costs real money to run, and a simpler free setup does most of it for normal people. The exact thing isn't for you.
Two ideas inside it are for everyone, though. They're the part that broke my brain, and you can bolt both onto a second brain you already have, or one you build today, for free.
Move 1 — The self-wiring graph
It connects the dots between people and projects on its own. Every note you write quietly links every person, company, and project you mentioned. You never organize a thing, but it always knows how your whole world fits together.
Move 2 — The nightly dream cycle
Once a day, on its own, it goes back through everything you wrote. It tidies up, links related notes, and flags when two of your notes disagree. You do nothing, and you wake up to a brain that's cleaner and smarter than you left it.
If you already have a second brain, the next two sections add these moves to it. If you don't, skip to Section 4 and build one first. It takes about ten minutes.
Section 2 — Move 1
The Self-Wiring Graph
Most second brains are a junk drawer. You dump notes in and never find them again, because nothing is connected to anything. gbrain fixes this by turning every person, company, and project into its own page, then auto-linking it to every note that mentions it. No tagging. No filing.
Here's the free version. Point Claude Code (or Cowork, the no-terminal mode in the Claude desktop app) at your second-brain folder, paste this prompt, and walk away. It builds the entity pages, wires the links, and adds a standing rule so every future note wires itself.
If your folder is an Obsidian vault, the payoff is visual: open Graph View and watch your whole world light up as a web of connected dots. Obsidian is free, and it's just a folder of the same markdown files Claude is already reading.
Self-wiring graph prompt
You are upgrading my second brain (this folder) with a self-wiring knowledge graph.
Right now my notes are a pile of files. I want every person, company, and project I've ever mentioned to become its own page, automatically linked to every note that mentions it, so my brain knows how my whole world connects without me organizing anything.
Do this in four passes. Show me a short summary after each pass before moving on.
PASS 1 — Build the entity folders.
Create these if they don't already exist:
- entities/people/
- entities/companies/
- entities/projects/
PASS 2 — Extract every entity.
Read every note in this vault. Skip the entities/ folder itself, skip templates, skip anything in an archive folder. Pull out every:
- Person I work with, mention, or track (not public figures named once in passing)
- Company or organization
- Project or initiative
Build one list. Merge obvious duplicates ("Garry Tan" and "Gary Tan", "Acme" and "Acme Inc"). Show me the list grouped by type and WAIT for my OK before writing anything.
PASS 3 — Create the entity pages.
For each entity, create a page in the right folder, named after it (e.g. entities/people/garry-tan.md). Every page gets this exact structure:
---
type: person # or company / project
aliases: [] # other names and spellings, so links still resolve
status: active
created: {today}
---
# [Name]
**What:** one line — who or what this is, in MY world specifically.
**Key facts:** 3 to 6 bullets, pulled only from my notes. No outside info, no guessing.
**Open threads:** anything unresolved — a promise, a next step, an unanswered question.
## Mentions
(leave this heading empty — Obsidian fills it automatically with backlinks)
Only use facts that appear in my notes. If a field has nothing, write "unknown." Never invent.
PASS 4 — Wire the links.
Go back through my notes and wrap the first mention of each entity in each note in a [[wikilink]] pointing to its page (e.g. [[garry-tan]]). Don't touch quotes or code blocks. Don't link the same entity twice in one note. When you're done, tell me how many notes you edited and how many entity pages you created.
Then I'll open Obsidian's Graph View (the graph icon, top-left) and see my whole world wired together.
LAST STEP — make it permanent.
Add this block to my CLAUDE.md (create the file if it doesn't exist) so every future note wires itself with zero effort from me:
## Self-wiring graph (standing rule)
Whenever I add or edit a note:
1. Scan it for people, companies, and projects.
2. For any without a page in entities/, create one using the template above.
3. Wrap their first mention in this note in a [[wikilink]].
4. If a note conflicts with an entity page, flag it — never silently overwrite.
Never invent facts. My notes are the only source of truth.
When it finishes, asking your brain "how do I know this person again?" or "what's the latest on this project?" returns one clean answer, because every mention is now connected to one page. That's the whole point.
Section 3 — Move 2
The Nightly Dream Cycle
This is the one that broke my brain. gbrain runs a job while Garry sleeps: it dedups pages, fixes links, finds contradictions, and preps the next day. He wakes up to a brain that's literally a little smarter than when he went to bed.
You can run the same thing for free. This prompt is the routine. It does six jobs: merge duplicate pages, fix broken links, connect new notes, flag contradictions, decide what matters tomorrow, and write you a two-minute morning brief.
Nightly dream-cycle prompt
This is my brain's nightly "dream cycle." Run it once a day, on a schedule, with nobody watching.
Your job: make my second brain a little smarter and cleaner than it was yesterday, then leave me a short note about what you found. Work through these six jobs in order. Make the changes directly. Keep a running list of what you did.
1. MERGE DUPLICATES.
Look through entities/ for pages that are the same thing under different names or spellings ("garry-tan" and "gary-tan", "acme" and "acme-inc"). Merge each set into one page, move the extra names into the aliases: field so old links still resolve, and repoint any links aimed at the dead page.
2. FIX BROKEN LINKS.
Find every [[wikilink]] pointing to a page that doesn't exist. Either create the missing page (if it's clearly a real entity) or fix the link to point at the right one. List anything you couldn't resolve.
3. CONNECT NEW DOTS.
Read notes added or changed in the last day. Wire any new people, companies, or projects into the graph — new pages plus [[wikilinks]] — using the same rules as the rest of the vault.
4. FIND CONTRADICTIONS.
Scan for places where two notes disagree on a fact: a date, a number, a decision, a name. Do NOT fix them — you don't know which is right. Collect them for my morning brief so I can settle them.
5. SCORE WHAT MATTERS.
Look at what's active right now — recent notes, open threads on entity pages, projects marked active. Pick the 3 to 5 things that actually matter for tomorrow. Ignore the noise.
6. WRITE THE MORNING BRIEF.
Create a file at brief/{tomorrow's date}.md with:
- Top 3 to 5 for tomorrow — what matters and why, each linked to its note or entity.
- Open threads — promises and next steps going stale.
- Contradictions to settle — the conflicts you found in job 4.
- What I cleaned up — one line on the merges and links you fixed, so I trust the system is working.
Keep it scannable. I should read it in under two minutes with my coffee.
Never invent facts. If you're unsure, say so in the brief instead of guessing.
Two ways to put it on a schedule. Pick one:
A Claude cloud routine (easiest, no laptop needed)
Save the prompt above as a scheduled Routine in Claude. It runs on Anthropic's servers overnight whether your computer is on or off, points at your vault, and drops the brief in by morning. If you've never set one up, my Your First Claude Routine guide walks through every click.
A cron job on your Mac (for the technical crowd)
Save the prompt as dream-cycle.md in your vault, then add one line to your crontab to run it headless every morning at 5am.
0 5 * * * cd ~/second-brain && claude -p "$(cat dream-cycle.md)" >> dream.log 2>&1
The honest catch: this writes to your files unattended, so let it run a few nights while you read the briefs and check its work. Once you trust it, you forget it's even happening. That's the dream.
Section 4
No Second Brain Yet? Build One First
The two moves above need somewhere to live. If you're starting from zero, here's the fastest path: make one folder, connect Claude to it, and let Claude build the rest.
You only need two free things. Obsidian is a free app that opens a folder of plain text notes (and gives you that graph view). Claude Code or Cowork is what reads and writes those notes for you. Point either one at your folder, paste this, and answer its questions.
Build-from-scratch prompt
I don't have a second brain yet. Build me one from scratch in this folder, then we'll wire it up. 1. Create this structure: raw/ — where I dump everything, unorganized wiki/ — where you organize what I dump entities/people/ entities/companies/ entities/projects/ brief/ — your daily morning briefs land here CLAUDE.md — your operating instructions USER.md — who I am and how I work 2. Write CLAUDE.md so it says: read everything before answering, organize raw/ into wiki/, never invent facts, and follow the self-wiring graph and nightly dream-cycle rules I'm going to paste in next. 3. Interview me. Ask me 5 to 7 questions about who I am, what I do, the main people, companies, and projects in my world, and what I want this brain to help me with. Write my answers into USER.md. When that's done, tell me to drop my first 10 to 30 files into raw/ and run the self-wiring graph prompt.
Once it's built, drop your real stuff into raw/, then run the two prompts above in order: graph first, then dream cycle. Want the deeper version? My Build an AI Second Brain and Obsidian + Claude Starter guides go folder by folder.
The real story
The Tool Isn't the Point
One rule before you go: your brain is only as smart as what you put in it. These prompts can connect dots and clean up overnight, but they can't invent facts you never wrote down. Feed it real notes, real meetings, real decisions. Garbage in, smart-looking garbage out.
And don't miss the bigger signal here. The tool isn't the story. The story is that one of the most powerful investors on earth is putting this much effort into an AI second brain. Pretty soon everyone will have one running their life. The people who see that coming and build now are the ones who win.
You just got the two best moves from his. Go add them to yours.
Work with Me
Want me on your problem for an hour?
Book a 1:1 call and we build the fix live — the workflow you want automated, the tool you can’t crack, whatever’s stuck. Direct, hands-on, no pitch waiting at the end.