Claude re-reads your files every new session — that amnesia is most of your token bill. Here's the 4-step, 3-tool playbook to give it a permanent knowledge-graph brain in ~10 minutes.
This guide is reviewed for clarity, service accuracy, and AI-search readability. The next quarterly content review is tracked internally before unsupported metrics or client proof are added.
Build an Agentic Brain in 4 Steps
Claude forgets your entire project every time you open a new chat. Every fresh session it crawls back through your files and rebuilds what it already figured out yesterday. You pay — in tokens and in waiting — to teach it the same project on a loop.
This playbook fixes that. You map your whole codebase (or your whole business) into a single knowledge graph once, point Claude at that map, then open it in Obsidian as a glowing brain you can actually see.
Three tools. Four steps. Mostly pasting prompts. About 10 minutes start to finish. The payoff: Claude reads one map instead of 300 raw files — a benchmarked 71.5× token reduction.
Everything you need to copy-paste is below. Let's build it.
The 3-Tool Stack
Three tools, one job each. Install them once, use them forever.
- Claude Code — Anthropic's command-line AI assistant. It runs in your terminal, reads your project, and does the work. This is the agent we're giving a brain to. Install:
npm install -g @anthropic-ai/claude-code(needs Node.js 18+). - Graphify — an open-source skill that turns an entire repo — code, docs, PDFs, diagrams — into one queryable knowledge graph. It maps every file, finds the central "hub" nodes, and writes a human-readable report. MIT-licensed, runs locally, never ships your code anywhere. Install:
pip install graphifyy(needs Python 3.10+). - Obsidian — a free notes app with a built-in Graph view that draws every note and its links as a network. We use it to render the Graphify map as a visual brain. Download: obsidian.md (free).
That's the whole stack. Now wire it together.
Step 1 — Install All Three
Open your terminal and run these two commands. Then grab Obsidian from the browser.
bash# Claude Code — the agent (needs Node.js 18+) npm install -g @anthropic-ai/claude-code # Graphify — the mapper (needs Python 3.10+) pip install graphifyy
Then download Obsidian (free) from https://obsidian.md and install it like any normal app. You won't open it until Step 4.
Quick gut-check on jobs: Claude Code does the work, Graphify draws the map, Obsidian shows you the map. That's it.
Step 2 — Run Graphify
Open a fresh terminal in your project folder and start Claude Code. Inside Claude Code, run the /graphify command — it maps every file one time.
bash# Move into the project (or business folder) you want mapped cd /path/to/your/project # Make sure Graphify is installed (safe to re-run) pip install graphifyy # Launch Claude Code in this folder claude
Now, inside the Claude Code session, type:
prompt/graphify
This is the one expensive step — and it's expensive on purpose. Graphify reads every file, parses the code, pulls concepts out of your docs, and stitches it all into a single graph. Big cost up front. Near-zero cost on every session after, because Claude reads the finished map instead of re-crawling the files.
When it finishes, you'll have a new graphify-out/ folder containing:
GRAPH_REPORT.md— a plain-English audit of your whole system: the biggest "hub" nodes everything depends on, and any surprising cross-file connections.wiki/index.md— a navigable index of every module and concept, linked together.graph.json— the raw, queryable knowledge graph.graph.html— an interactive visualization you can open in a browser.
The two files that matter most for the next steps are graphify-out/GRAPH_REPORT.md and graphify-out/wiki/index.md.
Step 3 — Wire It Into Memory
Right now the map exists, but Claude doesn't know to read it. We fix that by pointing it at the map inside CLAUDE.md — the file Claude Code automatically loads at the start of every session. Put the map here and Claude reads it first, every time, instead of rediscovering your project from scratch.
Paste this prompt into Claude Code exactly as written:
promptI've run Graphify and the output is at ./graphify-out/. It contains: - GRAPH_REPORT.md — a human-readable map of this whole project - wiki/index.md — a navigable index of every module and concept - graph.json — the raw knowledge graph Add a section to my CLAUDE.md file that instructs you to read ./graphify-out/GRAPH_REPORT.md and ./graphify-out/wiki/index.md FIRST — before opening or crawling any individual source files — whenever you need to understand how this project fits together. Treat that graph as your primary index and memory of the codebase. Only open a raw file once the map has pointed you to the specific one you need. If a CLAUDE.md doesn't exist yet, create it at the project root.
From now on, every new Claude session starts by reading one map instead of grinding through hundreds of files. That single line in CLAUDE.md is what turns the graph into permanent memory.
Step 4 — See the Brain
Last step is the fun one: turn the graph into something you can look at. We have Claude rebuild the map as a set of linked Obsidian notes, then open it in Obsidian's Graph view.
Paste this prompt into Claude Code:
promptUsing the Graphify output in ./graphify-out/ (GRAPH_REPORT.md, wiki/index.md, and graph.json), build me an Obsidian vault. 1. Create a new folder called ./brain-vault/. 2. Write one short Markdown note per node/module in the graph. Each note should have a title, a one-line summary, and nothing else heavy. 3. In every note, link to all of its related nodes using Obsidian [[wikilink]] syntax, so the connections appear in Obsidian's graph view. 4. Add an index.md note that links to the biggest hub nodes from the report. When you're done, tell me how many notes you created and which note is the central hub of the whole system.
When Claude finishes, open the vault:
- Open Obsidian (the app you downloaded in Step 1).
- On the welcome screen, click "Open folder as vault."
- Select the
./brain-vault/folder Claude just created. - In the left ribbon, click the Graph view icon.
Your whole project lights up as a network of glowing nodes — big hubs in the center, every connection drawn as a line. That's your business as a brain. Hover any node to highlight its links; click one to read it.
Why This Works — The Amnesia Tax
Here's the thing nobody tells beginners: Claude doesn't "remember" your project between sessions. Each new chat starts cold. To answer "how does the auth flow work?" it re-reads the relevant files from scratch — and on a real, mixed codebase that means re-crawling source, docs, and diagrams every single time. On a big repo that's hundreds of thousands of tokens spent just to re-learn what it already knew. That's the amnesia tax, and for most solo founders it's the bulk of the token bill.
CLAUDE.md is the lever. Claude Code loads it into context automatically at the start of every session. Without it, each session rediscovers your structure by exploring — slow and expensive. With a good one, Claude starts already oriented.
So the trick is: do the expensive crawl once with Graphify, save the result as a compact knowledge graph, and use CLAUDE.md to tell Claude "read this map first." Now the per-session cost of understanding your whole system drops from "re-read 300 files" to "read one map" — the benchmarked 71.5× token reduction. You pay the big cost a single time. Every session after rides for almost free.
This is exactly the kind of one-time setup we lean on at Hypd to keep AI builds cheap and fast for solo founders.
Troubleshooting
graphify-out/not found. You're probably in the wrong folder, or/graphifyhasn't finished. Runpwdto confirm you're in your project root, make sure Claude Code was launched from that same folder, and re-run/graphify. The output always lands ingraphify-out/relative to where Claude is running.- Claude isn't using the map (CLAUDE.md ignored). Confirm the file is named exactly
CLAUDE.mdand sits at the project root — Claude Code only auto-loads it from there (or from~/.claude/). Then start a fresh session; CLAUDE.md is read at session start, not mid-chat. Ask "what does your CLAUDE.md tell you to read first?" to verify it picked up the new section. - Obsidian graph is empty. An empty Graph view means the notes have no
[[wikilinks]]connecting them. Open a note inbrain-vault/and check that it contains[[Other Note]]links. If it doesn't, re-run the Step 4 prompt and explicitly remind Claude to add wikilinks between related notes. Also confirm you openedbrain-vault/itself as the vault, not its parent folder. - Rebuilding after big code changes. The graph is a snapshot. After a major refactor or a pile of new files, just re-run
/graphifyto regenerategraphify-out/, then re-run the Step 4 prompt to refresh the vault. A quick re-map every week or two keeps the brain honest — small daily edits don't need it.
The 10-Minute Recap
Run this top to bottom:
- 3 tools: Claude Code (the agent) · Graphify (the mapper) · Obsidian (the viewer).
- Step 1 — Install:
npm install -g @anthropic-ai/claude-code,pip install graphifyy, and download Obsidian from obsidian.md. - Step 2 — Map:
cdinto your project, runclaude, then type/graphify. Wait forgraphify-out/to appear. - Step 3 — Wire: Paste the Step 3 prompt so Claude adds the
graphify-out/map to CLAUDE.md as the index it reads first. - Step 4 — See: Paste the Step 4 prompt to build
brain-vault/, then "Open folder as vault" in Obsidian and click Graph view.
That's the whole brain. One map, read forever, for a fraction of the tokens.
FAQ
Does this work for a business, not just code? Yes. Graphify maps any folder of files — Markdown docs, PDFs, notes, SOPs, not only source code. Point it at a folder of your business documents and you get the same knowledge graph and the same Obsidian brain. It's a map of whatever you give it.
Is my code or data sent anywhere? Graphify runs locally and is open-source under the MIT license — the mapping happens on your machine. Claude Code only sees what it normally would during a session. Nothing about this playbook ships your whole repo to a third party.
How often do I need to re-run /graphify?
Only when the structure meaningfully changes — a big refactor, a new module, a batch of new docs. Small day-to-day edits don't need a rebuild. A quick re-run every week or two is plenty to keep the map and the Obsidian brain current.