← Back to resources

The Claude Code
Context Fix

Claude Code doesn't remember your project. Every time you ask it something real, like how does this connect or what breaks if I change this, it starts over, opens a dozen files and reads all of them just to work out the answer. That's 40,000 to 80,000 tokens before it says anything useful. graphify maps your project once, saves the map to disk, and Claude reads the map instead. Same answer, about 1,500 tokens.

The fast way: don't read this, feed it to your AI

The setup file is written for Claude Code, not just for you. Download it, drop it in your project, and say: Read this file and set up graphify on this project. It installs, builds the map, wires itself into your CLAUDE.md, and hands you back a summary of your own codebase. You mostly watch.

01

Install it

pip install graphifyy && graphify install

The PyPI name has the double-y, since graphify is still being reclaimed, but the command you type is graphify. The second half of that line drops the skill into ~/.claude/skills/ so /graphify works as a slash command.

If pip refuses on macOS ("externally managed environment"), use pipx install graphifyy or uv tool install graphifyy instead, then run graphify install the same way.

Restart Claude Code after this. Skills are read at startup, so until you restart, /graphify isn't there yet.

02

Build the map

From your project root, in Claude Code:

/graphify .

Huge repo? Point it somewhere specific, like /graphify ./src, and widen later with --update. First run takes a few minutes. When it lands you get:

graphify-out/
├── graph.json        ← the map (what Claude reads)
├── GRAPH_REPORT.md   ← plain-language summary
├── graph.html        ← interactive, open it in a browser
└── wiki/             ← optional, one article per cluster

Open graph.html and drag it around. Mine came out to about 1,900 nodes across my whole agency vault, and the clusters told me things about my own structure I'd never have said out loud.

03

Make it always-on

graphify claude install

This is the step people skip, and it's the one that does the work. It writes a ## graphify section into your project's CLAUDE.md telling Claude to check the graph before answering questions about the codebase. From then on it happens on its own, so nobody has to remember to type /graphify.

Skip it and you have a map nobody reads. Run it and Claude stops opening a dozen files to answer one question.

04

Keep it fresh

graphify hook install

A git post-commit hook. After every commit it re-extracts only the files that changed and rebuilds the map. Seconds, no background process, and no stale graph, which is how these things usually die.

Not on git, or you want it manual? /graphify . --update re-extracts only what changed. Doc and image changes always need that one, since the commit hook only watches code.

Last bit of housekeeping: echo "graphify-out/" >> .gitignore, unless your team wants to share the map.

05

Now ask it things

Instead of grepping and hoping:

/graphify query "what breaks if I change the checkout handler"
/graphify query "how does the webhook reach the database" --dfs
/graphify query "what handles retries" --budget 1500

Default traversal goes broad, which is what you want for "what is this connected to." --dfs traces one specific chain. --budget caps the answer when you're deep in a session and context is tight.

Two more worth knowing:

/graphify path "AuthModule" "Database"
/graphify explain "SwinTransformer"

path is the one that surprises people. It tells you whether two things are actually connected and through what, which is genuinely annoying to answer by reading code.

06

What it costs to run

Worth being straight about, because you'll see the claim both ways. Building the map is not one big AI pass over your codebase. Code structure is parsed rather than prompted, and that part costs nothing. Docs and PDFs get a semantic pass, and it runs inside the Claude Code session you're already paying for, or through a free Gemini key if you set one.

You don't add a separate API key and you don't get a per-run API bill. The map is cheap to build once, and then it keeps paying you back on every question after that.

07

It works on things that aren't code

Point it at a folder of PDFs, notes, or research and it maps those the same way. Papers, meeting notes, a docs site you cloned, same graph and same queries.

/graphify ./research
/graphify add https://arxiv.org/abs/xxxx.xxxxx
/graphify https://github.com/owner/repo

That last one is underrated: map a library you're about to depend on and ask it questions before you commit to it.

Ten minutes, most of it waiting.

graphify is free and Apache-2.0, and it isn't mine. It's Graphify-Labs, and I just install it on every project now. Grab the setup file and let Claude Code do the rest.