Hi, it's Ivo. Every new Claude Code session starts with an empty context window (Anthropic says so in its own docs). Claude doesn't remember your project from yesterday, so it searches and opens files again to find its way. Each file it opens uses part of your limit.
Graphify is a free, open-source tool (Apache 2.0) that maps your code once, on your computer, and tells Claude to ask the map before it opens files one by one. Here is how to set it up.
Before you start
You need Python 3.10 or newer, uv (on a Mac: brew install uv), Claude Code, and a project folder with code in it.
The package is called graphifyy, with two y's. The README says other graphify packages on PyPI aren't theirs. The command you type is still graphify.
The 5 setup steps
- Install the tool. In your terminal:
bash
uv tool install graphifyy
graphify --version
If the terminal says graphify isn't found, run uv tool update-shell and open a new terminal.
- Register the skill in Claude Code.
bash
graphify install
With no extra flags, this sets up Claude Code. After this, Claude Code has a /graphify command.
- Build the map. Pick one of the two ways.
In Claude Code, open your project and type this in the chat (it's a chat command, not a terminal command):
text
/graphify .
Or build a code-only map in the terminal, from the project folder:
bash
graphify extract . --code-only
Code is parsed on your computer with tree-sitter. No AI model reads it and nothing leaves your machine. Docs, PDFs and images are different: inside Claude Code, /graphify . sends those to your Claude model, so that part of the first build uses your limit. The --code-only command skips them and needs no API key. For terminal runs, GRAPHIFY_BACKEND=none turns off every AI backend and keeps the map code-only.
Either way you get a folder called graphify-out/ with three files: graph.html (the map you can click), GRAPH_REPORT.md (a short summary) and graph.json (the full map that queries use).
- Tell Claude Code to use the map. From the project folder:
bash
graphify claude install
This does two things. It adds a section called ## graphify to the CLAUDE.md file in your project, which Claude reads at the start of every session. And it adds two hooks to .claude/settings.json. One fires before Claude searches your files, the other before it opens them one by one. The hook points Claude to the map first.
- Keep the map fresh. The map shows your code as it was when you built it. After you change things, run:
bash
graphify update .
Or let git do it for you:
bash
graphify hook install
Those git hooks rebuild the map after each commit and branch switch. After a git pull, still run graphify update . yourself.
How to check it works
-
Open the map. Open
graphify-out/graph.htmlin your browser. You should see your files, functions and classes as dots, with lines between the ones that connect. Click a dot to see what it touches. -
Ask the map a question yourself. In the terminal, from the project folder:
bash
graphify query "how does the login reach the database?"
Use a question about your own project. The answer is a small part of the map, with the file each piece comes from.
-
Look at the two files it changed. Open
CLAUDE.mdand find the## graphifysection. Open.claude/settings.jsonand find two hooks that rungraphify hook-guard. -
Watch Claude use it. Start a new Claude Code session and ask a question about your code. Before it opens files one by one, it should run a
graphify query. Every query is also written to~/.cache/graphify-queries.log, so after a session you can open that file and see whether the map was used.
The honest limits
- There is no savings number for the free version. The README's "Cut agent token spend by 80%" line is about Graphify Cloud, their paid product. To know what it saves you, compare a normal week of your usage before and after.
- The hook points Claude to the map. It doesn't forbid reading. Claude still opens a file when it needs the exact code.
- An old map gives old answers. Update it after big changes.
- Mapping code costs nothing. Mapping docs and PDFs inside Claude Code uses your Claude model.
- Your questions are logged locally in
~/.cache/graphify-queries.log. To turn that off, setGRAPHIFY_QUERY_LOG_DISABLE=1.
How to remove it
bash
graphify uninstall
Add --purge to also delete the graphify-out/ folder.
Sources (checked 27 October 2026)
- Graphify README (v8): https://github.com/Graphify-Labs/graphify
- Graphify with Claude Code: https://docs.graphify.com/integrations/claude-code
- Extract without an IDE: https://docs.graphify.com/guides/headless-extraction
- Keep the graph current: https://docs.graphify.com/guides/incremental-updates
- What
graphify claude installwrites (source code): https://github.com/Graphify-Labs/graphify/blob/v8/graphify/install.py - Claude Code sessions start fresh: https://code.claude.com/docs/en/memory