0

code-review-graph

worthwhile

Persistent code dependency graph reduces AI review context by ~82x median; genuine local-first value over vanilla Claude's ad-hoc file-grabbing.

Source ↗
code-review-graph iconcode-review-graph README imagecode-review-graph README imagecode-review-graph README imagecode-review-graph README imagecode-review-graph social preview

What it is

A CLI tool and MCP server that parses a codebase with Tree-sitter into a persistent SQLite graph of functions, classes, imports, and call edges. It then serves blast-radius queries to AI coding assistants, returning only the minimal set of files affected by a change. Supports incremental updates, risk-scored PR reviews via GitHub Action, and auto-configures for 14+ AI coding platforms (Claude Code, Cursor, Copilot, etc.).

How it differs from vanilla Claude

Vanilla Claude (or any base agent) reads files on demand, often grabbing entire directories or guess-importing. It has no persistent understanding of the dependency structure. code-review-graph pre-computes a dependency graph and at review time returns only the files that actually matter (the blast radius), achieving ~82x median token reduction. The base agent cannot replicate this without building its own graph — which it could, but that would consume the same tokens it is trying to save. The graph is persistent, incrementally updated, and reusable across queries.

Skill, plugin, or workflow shift?

mcp. The tool is explicitly built as an MCP server that responds to queries from any MCP-compatible AI coding tool (Claude Code, Cursor, Windsurf, etc.). It also provides a CLI for direct use and a GitHub Action for CI, but its primary integration surface is the MCP protocol, giving AI assistants a structured, queryable dependency graph without custom plugin code.

Devil's advocate — is this just complexity?

This is entirely avoidable complexity for many projects. If your codebase is under ~10k files, vanilla Claude with a good system prompt ("only read files that are imported or called") will waste tokens but not catastrophically. The tool requires an upfront build step (~10s), a persistent SQLite database on disk, and ongoing incremental updates via hooks or watch mode. For a small project, the setup friction outweighs the token savings. Moreover, base agents are rapidly improving at file-level context management — Claude's own codebase analysis tools already use graph-like reasoning. The benchmarks are impressive on six chosen repos, but synthetic: they measure token reduction against whole-corpus baselines, not real user productivity. The risk-scored PR review is neat but duplicates what linters (pylint, ruff) and coverage tools already provide for free without graph overhead.

What would make it better

1) First-class IDE plugin that embeds the graph in the editor's native code intelligence (e.g., VS Code inline dependency explorer) rather than requiring MCP brokering. 2) A 'no-install' mode where the graph is built and queried entirely in CI and the results are pushed to the AI tool as a single JSON document (no local daemon). 3) Automatic caching of the graph so that the initial build is faster for repos with unchanged upstream dependencies. 4) Support for multiple independent graphs in a monorepo (per-service graphs). 5) A query language for the graph that allows AI agents to ask not just 'which files affect this file?' but 'what is the deepest call chain that leads to this function?'

The honest case for it

If you work on a medium-to-large codebase (10k+ files, or a monorepo with 100k+ files) and you use AI coding assistants frequently for code review or refactoring, the token savings alone justify the setup cost. The tool takes a genuinely hard problem — knowing which files matter for a given change — and solves it with a well-engineered, incremental, language-agnostic graph. The MCP integration means it works with every major AI coding tool without vendor lock-in. The benchmarks are grounded in real repos (FastAPI, Django, etc.) and the GitHub Action provides a concrete CI gate. For teams already investing in AI-assisted development, this is one of the few tools that directly attacks the context window ceiling rather than adding yet another abstraction.

Who it's for

Audience fit

Primarily forAI-first Engineer
AI-first Engineer85

Depth and leverage for a technical engineer who wants to understand it and level up their workflow — not just offload work.

Vibe Coder40

Value for someone who wants a more capable tool without the technical depth — accessible, does-it-for-you.

Requires CLI usage, installation, and understanding of dependency graph concepts; vibe coders will struggle with setup and interpreting results, while AI engineers gain concrete token savings and precision.