graph-aware-review
Skill4 starsChanged 4 months agoMITView on GitHub
Token-efficient code review using structural graph analysis and blast-radius computation. 8.2x average token reduction by reviewing only affected files instead of entire codebase. Use when: reviewing PRs, analyzing change impact, pre-merge checks, or user says 'review this PR', 'what does this change affect', 'blast radius'. Enhances CE-005 Code Review.
- Installs packages
In this repository162 other files it gives its agents.
- agents/AGENTS.mdAGENTS.md
- skills/compound-engineering/AGENTS.mdAGENTS.md
- skills/trailofbits-security/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- examples/CLAUDE.mdCLAUDE.md
- skills/compound-engineering/CLAUDE.mdCLAUDE.md
- skills/trailofbits-security/CLAUDE.mdCLAUDE.md
- app-store-reviewSkill
- advanced-javascriptSkill
- ai-native-uiSkill
- anime-jsSkill
- app-l100Skill
- barba-jsSkill
- brand-guidelinesSkill
- cinematic-web-engineSkill
- codebase-knowledge-graphSkill
- crossplatform-monorepoSkill
- css-first-uiSkill
- design-auditSkill
- design-critiqueSkill
- dev-cycleSkill
- device-hardware-bridgeSkill
- discovery-docSkill
- docxSkill
- edge-intelligenceSkill
- linkedin-posterSkill
- local-first-architectureSkill
- modern-build-pipelineSkill
- motion-nativeSkill
- nano-bananaSkill
- playwrightSkill
- pptxSkill
- project-initSkill
- remotionSkill
- sensory-nativeSkill
- spline-3dSkill
- streaming-cacheSkill
- tanstack-ecosystemSkill
- design-taste-frontendSkill
- tauri-desktopSkill
- threejsSkill
- transition-nativeSkill
- ui-design-stackSkill
- visual-nativeSkill
- web-l100Skill
- web-platform-apisSkill
- xlsxSkill
- better-authSkill
- claude-real-videoSkill
- clone-websiteSkill
- css-keyframe-animationsSkill
- design-checkSkill
- design-dnaSkill
- design-polishSkill
- drizzle-neonSkill
- fastlaneSkill
- angular-architectSkill
- api-designerSkill
- architecture-designerSkill
- atlassian-mcpSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 37
Before any code review, compute the blast radius:
- Distinctive: line 49
Use community detection to understand module boundaries and flag cross-module changes that need extra scrutiny.
- Distinctive: line 53
When reviewing code (local changes or PRs), prepend blast-radius analysis:
- Distinctive: line 56
Read all changed files
- Distinctive: line 62
Read changed files + affected dependents (minimal set)
- Distinctive: line 65
Verify test coverage for affected paths
- Distinctive: line 112
Keep the graph fresh with git hooks:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Graph-Aware Code Review
Enhance code review with structural dependency analysis. Instead of reading the entire codebase, compute the minimal set of affected files through blast-radius analysis.
Prerequisites
pip install code-review-graph
code-review-graph install --platform claude
code-review-graph build # Initial graph constructionCore Concept: Blast-Radius Analysis
Given a set of changed files, trace the dependency graph to find:
- Direct dependents — files that import/call changed code
- Transitive dependents — files affected through dependency chains
- Test coverage — which tests exercise the changed code
- Unaffected files — everything else (skip these entirely)
Result: In a 2,900-file project, typically ~15 files need review instead of scanning the full codebase.
Workflow
1. Build/Update Graph
code-review-graph build # First time
code-review-graph build --update # Incremental (SHA256 change detection, <2s)2. Compute Impact
Before any code review, compute the blast radius:
What changed? → Which files depend on changes? → Review only those files3. Review with Context
For each affected file, the graph provides:
- Why it's affected (which dependency chain)
- What functions/classes are impacted
- Related test files that should pass
4. Architecture Overview
Use community detection to understand module boundaries and flag cross-module changes that need extra scrutiny.
Integration with CE-005 Code Review
When reviewing code (local changes or PRs), prepend blast-radius analysis:
Before (standard review):
- Read all changed files
- Review each file
- Check for issues
After (graph-aware review):
- Compute blast radius of changes
- Read changed files + affected dependents (minimal set)
- Review with dependency context
- Flag cross-module impacts
- Verify test coverage for affected paths
MCP Tools (when installed as MCP server)
| Tool | Purpose |
build_or_update_graph | Construct/refresh the structural graph |
get_impact_radius | Compute blast radius for changed files |
get_review_context | Token-optimized review summaries |
query_graph | Structural queries (callers, callees, tests) |
semantic_search_nodes | Find entities by name/meaning |
detect_changes | Risk-scored impact analysis |
get_architecture_overview | Community-based architecture maps |
Performance
| Metric | Value |
| Token reduction | 8.2x average (range 0.7x–16.4x) |
| Impact recall | 100% (never misses affected files) |
| Build latency | 95–128ms flow detection |
| Search latency | 0.4–1.5ms |
| Incremental update | <2s for 2,900-file projects |
Note: Single-file changes in small packages may show <1x efficiency (structural metadata overhead). Benefits compound on multi-file changes in larger codebases.
Language Support
19 languages + Jupyter notebooks:
- Web: TypeScript/TSX, JavaScript, Vue
- Backend: Python, Go, Java, Scala, Rust, PHP
- Mobile: Kotlin, Swift, Dart
- Systems: C/C++, Ruby
- Other: R, Perl, Lua, Solidity
When to Use vs Standard Review
| Scenario | Use Graph-Aware? |
| PR in a large codebase (100+ files) | Yes — massive token savings |
| Multi-file refactor | Yes — dependency tracing essential |
| Single-file bug fix in small repo | No — overhead exceeds benefit |
| Architecture review | Yes — community detection helps |
| Security-sensitive changes | Yes — blast radius reveals attack surface |
Auto-Update Hooks
Keep the graph fresh with git hooks:
code-review-graph hook install # Adds post-commit and post-checkout hooksFile-save hooks trigger incremental updates, ensuring the graph reflects current code state.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

