code-review-graph

Builds Tree-sitter AST graphs in SQLite to compute blast radius for token-efficient code review.

2|Updated May 30, 2026
One-click install
npx skills add https://github.com/virahitvin8/crafty-gis --skill code-review-graph-virahitvin8
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-review-graph
Source: https://github.com/virahitvin8/crafty-gis/tree/main/GIT_STAR/.agent/skills/code-review-graph
Command: npx skills add https://github.com/virahitvin8/crafty-gis --skill code-review-graph-virahitvin8

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires code-review-graph.

What problem does it solve? AI coding assistants waste tokens reading entire codebases to understand the impact of a change. This Skill parses your codebase into a structural graph so the AI reads only the files in the blast radius of a change, cutting token usage by 6.8x on average (up to 49x on monorepos) while improving review quality. ## Core Features & Use Cases - Blast Radius Analysis: Tree-sitter parses 19 languages into a SQLite graph of nodes (files, functions, classes) and edges (calls, imports, tests), served to AI assistants via MCP so they fetch only impacted files. - Risk-Scored Change Detection: detect-changes scores uncommitted changes by dependents, test coverage gaps, and critical-path membership before review. - Dead Code, Refactoring Preview, and Visualization: Finds uncalled functions, previews rename impact across files, and generates architecture visualizations and wikis. - Use Case: In a 27,000-file Next.js monorepo, instead of the AI reading 739K tokens of context, the graph returns the 15K tokens of files actually affected by your change. ## Quick Start Ask your AI assistant to check whether code-review-graph is installed, then run code-review-graph build in your project root and enable watch mode so reviews use the dependency graph.

Frequently Asked Questions about code-review-graph

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce AI coding assistant token usage on large codebases?

Install code-review-graph, run code-review-graph build in your project, and connect it via MCP. The AI then queries the dependency graph for only the files in a change's blast radius instead of reading everything, reducing tokens by 6.8x on average.

What is blast radius analysis in code review?

Blast radius analysis uses BFS traversal over a graph of calls, imports, and test coverage edges to identify every file impacted by a change. code-review-graph computes this from Tree-sitter ASTs stored in SQLite and serves results through MCP.

code-review-graph vs Serena for codebase context?

code-review-graph uses Tree-sitter static analysis, is fast, supports 19 languages, and runs locally with no heavy setup. Serena is LSP-based with deeper semantic and type resolution, making it better for polymorphism-heavy or reflection-heavy codebases.

Does code-review-graph work with TypeScript monorepos?

Yes, it supports TypeScript and multi-repo registration for microservice architectures. On a 27,000-file Next.js monorepo it reduced context from 739K to 15K tokens, though path aliases may require tsconfig resolution configuration.

When should I not use code-review-graph?

Skip it for codebases under roughly 200 files with isolated single-file changes, where graph overhead exceeds savings. It also cannot trace dynamic imports, reflection-based calls, or runtime-generated code, so those dependencies will be missed.

Why is my code-review-graph returning outdated results?

The graph becomes stale when files change without re-indexing. Run code-review-graph watch during development for incremental updates under 2 seconds, or run code-review-graph update manually before each task.