build-graph
Build or update the code review knowledge graph. Run this first to initialise, or let hooks keep it updated automatically.
Review a PR or branch diff using the knowledge graph for full structural context. Outputs a structured review with blast-radius analysis.
Claude Code
$ npx -y skills add tirth8205/code-review-graph --skill review-pr --agent claude-code
Codex
$ npx skills add tirth8205/code-review-graph --skill review-pr -a codex -y
Cursor
$ npx skills add tirth8205/code-review-graph --skill review-pr -a cursor -y
Gemini CLI
$ npx skills add tirth8205/code-review-graph --skill review-pr -a gemini-cli -y
GitHub Copilot
$ npx skills add tirth8205/code-review-graph --skill review-pr -a github-copilot -y
OpenCode
$ npx skills add tirth8205/code-review-graph --skill review-pr -a opencode -y
Windsurf
$ npx skills add tirth8205/code-review-graph --skill review-pr -a windsurf -y
name: review-pr description: Review a PR or branch diff using the knowledge graph for full structural context. Outputs a structured review with blast-radius analysis. argument-hint: "[PR number or branch name]"
Review all commits of a pull request or branch against its base branch.
1. The graph tools read the files on disk, so check out what you review first: `git switch <branch>`, or for a PR `git fetch origin pull/<n>/head:pr-<n>` then `git switch pr-<n>`, then call `build_or_update_graph_tool()`. Diff it against `main` (or `master`) with `git diff --name-only main...HEAD`, and use that ref as `base` below. 2. Call `get_minimal_context_tool(task="review PR", base="main")`. If it returns `status: not_ready`, call `build_or_update_graph_tool()` and continue. 3. Call `detect_changes_tool(base="main", detail_level="minimal")` for risk-scored changed functions, test gaps and affected flows across the whole branch. 4. For high-risk functions call `query_graph_tool(pattern="callers_of", target="<function>")` and `query_graph_tool(pattern="tests_for", target="<function>")`. Flag public API changes whose callers were not updated. 5. Call `get_review_context_tool(base="main")` for source snippets, or `get_impact_radius_tool(base="main")` for the full dependent list, only when step 3 leaves a high-risk item unclear. 6. Read the changed source of the highest-impact files first. Do not load whole files unless the change needs it.
## PR Review: <title> ### Summary <1-3 sentences> ### Risk - Overall: Low / Medium / High - Blast radius: <n> files, <m> functions - Test coverage: <covered> of <changed> changed functions ### Files #### <path> - Changes: <what> - Impact: <who depends on it> - Issues: <bugs, style, concerns> ### Missing Tests - <function> in <file> ### Recommendations 1. <action>
Local-first code intelligence graph for MCP and CLI. Builds a persistent map of your codebase so AI coding tools read only what matters, with benchmarked context reductions on reviews and large-repo workflows.
Build or update the code review knowledge graph. Run this first to initialise, or let hooks keep it updated automatically.
Navigate and understand codebase structure using the knowledge graph
Perform a structured code review using change detection and impact
Review only changes since last commit using impact analysis. Token-efficient delta review with automatic blast-radius detection.
Performs AI-powered code review on Git changes using the `ocr` CLI from alibaba/open-code-review. Use when the user asks to…
Address all valid review comments on a PR for the current branch in the streamlit/streamlit repo. Covers both inline review…
Maps the `hunkdiff/extension` authoring surface for Hunk, the terminal diff viewer — hiding or reordering reviewed files, docked…