FREE SKILL

Stop Paying for Claude to Reread Files It Already Knows

Every Claude Code session burns thousands of tokens rereading your codebase from scratch. Graphify maps it once to a knowledge graph so your AI navigates instead of rereads. Free, open-source, three commands to install.

Every new Claude Code session starts the same way. Before you type a single word, your AI agent reads your entire codebase from scratch. Every file. Every function. Every import chain. Thousands of tokens consumed before you ask one question.

If you are on a $20 plan, that overhead eats into your useful budget fast. If you run a development team on a paid tier, the waste compounds across every developer, every session, every day.

A free, open-source tool fixes this by replacing the file-by-file rescan with a knowledge graph your AI navigates instead. Three commands to install. No account. No data leaves your machine.

The tool is called Graphify. This article walks you through what it does, how to install it in under ten minutes, and when it actually helps versus when the bottleneck is somewhere else entirely.


The Tool: Graphify

Graphify maps your codebase into a queryable knowledge graph. Run it once in your project folder. On every subsequent session, Claude or Codex queries the graph to locate files and functions, rather than loading your entire codebase into context.

It is open source under the Apache 2.0 license. It runs entirely on device.

WhatDetail
LicenseApache 2.0 (free, permanently)
Runs onYour local machine
Account requiredNo
Data sent externallyNone
Works withClaude Code, Codex CLI, any context-aware AI agent

The reported token reduction is around 70%. That figure comes from community observations and the tool's own positioning, not a formal third-party benchmark. Treat it as a directional signal. Your actual savings depend on repo size, session frequency, and how your agent loads context. Larger codebases see more benefit. A ten-file project will not notice much difference.


What Is a Knowledge Graph in This Context?

A knowledge graph for code is a structured map of relationships: which functions call which, which modules import which, how your architecture connects.

Instead of handing Claude a flat stack of files, Graphify gives it a navigable structure. Claude can ask the graph "where is the function that handles user authentication?" and get a precise file path and line number back. No loading the entire auth module. No guessing which of six files might contain the answer.

That specificity is what reduces the token count. The AI gets an exact location, not a broad context window full of files it mostly does not need.


Setup: 3 Commands to Your First Run

You need uv installed. If you do not have it:

Copy this.

pip install uv

Install Graphify:

Copy this.

uv tool install graphifyy
graphify install

Note: the PyPI package name is graphifyy with a double y. That is not a typo.

Run it in your repository root:

Copy this.

graphify .

Done. Graphify scans your codebase and writes the knowledge graph locally. The next session you open in that repo, your AI agent will query the graph instead of re-scanning files.

Rerun graphify . after major refactors, renamed modules, or structural changes to your directory layout. A graph built against an old structure will send Claude to wrong file locations.

If uv Is Not an Option

Check whether graphifyy is available via pip directly:

Copy this.

pip install graphifyy
graphify install

If pip installation fails, visit graphify.com for the latest install path. The project is under active development and the install method may update.


2 Prompts to Paste at the Start of Every Session

These orient Claude or Codex to graph-based navigation rather than file loading. Paste one at the start of a session, before your first real question.

Prompt 1: Graph-first session start

Copy this.

I have a Graphify knowledge graph of this codebase. Before reading any file directly, check whether the graph can answer your question with a file path and line number. Minimize full file reads. Use the graph to navigate, not scan.

Prompt 2: Targeted function or class lookup

Copy this.

Using the Graphify knowledge graph, find where [FUNCTION_OR_CLASS_NAME] is defined, what calls it, and what it calls. Return file paths and line numbers only, not file content. Then ask me what you need next.

Replace [FUNCTION_OR_CLASS_NAME] with the actual name, such as handlePayment, UserAuthService, or processWebhook.

If Claude returns a file path that does not exist or a line number that is wrong, say this:

"That file path is wrong. Check the graph again for [FUNCTION_NAME] and give me the correct location."

Do not accept a hallucinated path. Graphify's entire value is precise citations. If it returns a wrong location, either the graph is stale and needs a rerun, or the function name you provided is ambiguous.


3 Situations Where This Earns Its Install

1. Repos over 100 files. The per-session re-read cost is highest here. Graphify gives Claude a map, not a stack. The bigger the repo, the more tokens you recover.

2. Development teams sharing an account. Every developer, every session restart, multiplies the context-loading cost. One graph installation covers everyone working in the same repo.

3. Debugging unfamiliar code. Instead of reading ten files to trace a call chain, you ask the graph for the path. Claude locates the function in one query. This is especially useful when onboarding to a codebase you did not write.

4. Frequent context resets from long sessions. Claude Code sessions eventually hit their context window limit. When you start a new session mid-project, the codebase re-read happens again. If you regularly hit that ceiling and restart, every restart burns tokens on the rescan. The graph cuts that restart cost down to a targeted query rather than a full re-scan.


Graphify or Obsidian: The Honest Comparison

Obsidian, the note-taking tool, also has a knowledge-graph feature. It can map your notes, documentation, and project context alongside your code. Some developers use both.

The split is simple:

If your only goal is reducing Claude Code token costs, Graphify is the faster path. Start there. Add Obsidian later if you want the broader knowledge system.


Honest Limits

  1. The 70% figure is a community claim, not a verified benchmark. Results vary by repo size and how Claude loads context. Small repos may see little difference.

  2. The graph goes stale after structural changes. Rename a module, move a directory, or add a new major dependency, and you need to rerun graphify . before the next session. Skipping this sends Claude to wrong locations.

  3. This reduces context cost, not reasoning cost. Graphify cuts the tokens spent loading files. It does not reduce the tokens Claude uses for thinking, writing, or reviewing code. If your biggest token drain is long back-and-forth conversations, this tool addresses a different bottleneck.

  4. The package name is graphifyy with a double y on PyPI. This is a minor friction point. If uv tool install graphify fails, add the second y.

  5. CLI only, no dashboard. There is no visual interface, no team-level usage analytics, and no reporting. If you need to track token savings across your organization, you will need to measure that separately.

  6. No ethical concerns, but one practical one. The graph is built from your source code and stored locally. For proprietary codebases, confirm your team's data handling policies before storing any automated scan output, even locally. In most cases this is a non-issue, but worth checking if your compliance posture is strict.


The 10-Minute Homework

Pick one repo you open with Claude Code at least three times a week. Run these commands now:

Copy this.

pip install uv
uv tool install graphifyy
graphify install
graphify .

Start your next session with Prompt 1 from above. Watch whether Claude navigates to specific files immediately or asks you to load more context.

If it reaches for precise file locations without loading broad context, Graphify is working. If you see no change, your bottleneck is elsewhere and this tool is not your fix.

Ten minutes to install. One session to test. If it does not move the needle, you have lost nothing but the time it took to run four commands.

This guide is one system.
The map tells you which comes first.

The guides show you the systems. The map shows you which one your business needs first.

Get your free map →
Take this with you Open the repo → Download as PDF ↓

Prefer to browse with company? The free community has the full skill library.

I write one system like this per week. Get the next one by email:

Free. Unsubscribe anytime with one click.