npx skills add ...
npx skills add reason-machines/trending-skills --skill code-review-graph
Build a persistent knowledge graph of your codebase so Claude reads only what matters — up to 49x fewer tokens on coding tasks.
npx skills add reason-machines/trending-skills --skill code-review-graph
Skill by ara.so — Daily 2026 Skills collection.
code-review-graph builds a persistent structural map of a codebase using Tree-sitter, stores it in a local SQLite graph, and exposes it to Claude via MCP. Instead of re-reading entire projects on every task, Claude queries the graph and reads only the files in the blast radius of a change — averaging 6.8× fewer tokens on code reviews and up to 49× on daily coding tasks in large monorepos.
Restart Claude Code after installation.
Requires Python 3.10+ and uv.
Enables vector embeddings via sentence-transformers for semantic_search_nodes_tool.
After installation, open your project in Claude Code and run:
Or use the slash command:
The first build parses the full codebase (~10 seconds for 500 files). After that, the graph updates incrementally on every file save and git commit (under 2 seconds for a 2,900-file project).
| Command | What it does |
|---|---|
/code-review-graph:build-graph | Build or rebuild the code graph from scratch |
/code-review-graph:review-delta | Review changes since the last commit |
/code-review-graph:review-pr | Full PR review with blast-radius analysis |
Once the graph is built, Claude calls these tools without manual prompting:
| Tool | Purpose |
|---|---|
build_or_update_graph_tool | Build or incrementally update the graph |
get_impact_radius_tool | Find all files/functions affected by a change |
get_review_context_tool | Return a token-optimised structural summary for review |
query_graph_tool | Query callers, callees, tests, imports, inheritance |
semantic_search_nodes_tool | Search code entities by name or meaning |
embed_graph_tool | Compute vector embeddings for semantic search |
list_graph_stats_tool | Graph size and health statistics |
get_docs_section_tool | Retrieve documentation sections |
find_large_functions_tool | Find functions/classes over a line-count threshold |
Create .code-review-graphignore in the repository root:
The graph will skip these paths during build and update.
The graph can be queried programmatically for custom tooling or scripts.
Claude will:
build_or_update_graph_tool to sync the graph with your editsget_impact_radius_tool on changed filesget_review_context_tool to get a compact structural summaryAny file save triggers an incremental re-parse of only that file and its dependents.
Makes the graph always current before Claude sees a commit.
Python, TypeScript, JavaScript, Vue, Go, Rust, Java, C#, Ruby, Kotlin, Swift, PHP, Solidity, C/C++
Each language has full Tree-sitter grammar support for: functions, classes, imports, call sites, inheritance chains, and test detection.
Edit code_review_graph/parser.py:
Then add a test fixture in tests/fixtures/elixir/ and open a PR.
The graph is stored locally in .code-review-graph/graph.db (SQLite). There is no external database, no cloud dependency, and no data leaves your machine. Add it to .gitignore if you don't want it committed:
Or commit it to share the pre-built graph with your team (saves the ~10-second initial build for each developer).
Then restart Claude Code.
uv not foundCheck that the file extension is in EXTENSION_TO_LANGUAGE and the corresponding Tree-sitter grammar is installed. Run code-review-graph status to see which languages were detected in your project.
Expected — Tree-sitter parses every file. A 500-file project takes ~10 seconds. All subsequent update calls complete in under 2 seconds because only changed files are re-parsed (detected via SHA-256 hash comparison).
On every review or coding task:
get_impact_radius_tool with the changed filesget_review_context_tool returns a 156–207 token structural summary (callers, dependents, test coverage gaps, dependency chains)In the Next.js monorepo (27,732 files): without the graph Claude reads ~739K tokens; with the graph it reads ~15K tokens — a 49× reduction.