code-review-graph cuts AI coding assistant token usage by 8.2x on average through local knowledge graphs and blast radius analysis for large repositories.
By Meng Li
Published: 2026-09-06
URL: https://pythonlibraries.substack.com/p/code-review-graph-82x-token-savings
If your project has more than 500 files and you regularly use AI coding assistants like Claude Code, Cursor, or Codex for reviews, code-review-graph is the “underground tool” I’ve most wanted to recommend lately.
It doesn’t generate a single line of code, and it has no pretty chat UI. Its value is something else: before you even ask “what does this change affect?”, it has already turned the codebase structure into a local knowledge graph. The AI assistant doesn’t need to grep, doesn’t need to temporarily read a dozen files, and doesn’t need to cram the whole repo into the context window—it can query the graph and get the smallest relevant set.
My take is simple: this is not another AI coding assistant. It’s a layer of infrastructure under all of them. Once it’s installed, Claude, Cursor, and Copilot all get a bit smarter because of it.
What it actually saves you
The hidden cost of AI coding assistants isn’t how expensive the model is per token. It’s how much irrelevant code you feed them. Ask one question in a repo with thousands of files, and the assistant may grep first, then open seven or eight files, reread context, and still miss the critical dependencies.
code-review-graph’s idea is: instead of making the AI reread the repo every time, extract the repo structure into a graph in advance and store it in a local SQLite. When the AI asks a question, give it only the few paths the answer actually needs.
