Agent skill

Knowledge Graph PR Review

by tirth8205 in tirth8205/code-review-graph

Reviews a pull request or branch diff with a code knowledge graph and produces a structured review that includes blast-radius analysis.

MITAuto-check passedDevelopment

Install Knowledge Graph PR Review

skills CLI
$ npx skills add tirth8205/code-review-graph --skill review-pr -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install tirth8205/code-review-graph review-pr --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/tirth8205/code-review-graph.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/review-pr .claude/skills/review-pr && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
review-pr
GitHub stars
32k
Token cost
~452 tokens
SKILL.md length
149 words
Files
1
Skills in repo
7
Repo updated
First seen
Licence
MIT

At a glance

Reviews a pull request or branch diff with a code knowledge graph and produces a structured review that includes blast-radius analysis.

  • Works in 6 steps: Identify the changes. With a branch name… → Call… → Call detect_changes_tool(base="main",… → …
  • Reviewing a pull request with a view of what else it affects
  • SKILL.md covers Steps, Output and Tips
  • Calls git

What it does

The agent diffs the branch against main or master, then calls tools from a code-graph server. It starts with a minimal-context tool, building or updating the graph if that reports it is not ready, and then runs change detection, which returns risk-scored changed functions, test gaps and affected flows across the whole branch.

For high-risk functions it queries callers and tests, and it flags public API changes whose callers were not updated. Only when a high-risk item stays unclear does it pull review context with source snippets or the full list of dependents. It reads the changed source of the highest-impact files first and avoids loading whole files unless the change needs it. The output is a structured review headed by the PR title with a summary, and semantic search is suggested for finding related code the PR may have missed.

When your agent uses it

  • Reviewing a pull request with a view of what else it affects
  • Checking a branch for untested risky changes before merge
  • Finding the callers of a changed public function

Example prompts

  • “Review the feature/payments branch against main and show the blast radius.”
  • “Which changed functions in this PR have no tests?”
  • “Check whether the callers of the renamed public API were updated in this branch.”

Requirements

  • The code-review-graph tools available to your agent
  • Git

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Identify the changes. With a branch name run git diff --name-only main...; otherwise diff the current branch against main (or master). Use…
  2. Call get_minimal_context_tool(task="review PR", base="main"). If it returns status: not_ready, call build_or_update_graph_tool() and…
  3. Call detect_changes_tool(base="main", detail_level="minimal") for risk-scored changed functions, test gaps and affected flows across the…
  4. For high-risk functions call query_graph_tool(pattern="callers_of", target="") and query_graph_tool(pattern="tests_for", target=""). Flag…
  5. Call get_review_context_tool(base="main") for source snippets, or get_impact_radius_tool(base="main") for the full dependent list, only…
  6. Read the changed source of the highest-impact files first. Do not load whole files unless the change needs it.

What it can do on your machine

Read from SKILL.md and the folder at commit 6b12d11. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Knowledge Graph PR Review loads about 452 tokens when it runs. Until then it costs about 37 tokens; SKILL.md has 149 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~37
When it runs · the whole SKILL.md, loaded when a task matches
~452

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from tirth8205/code-review-graph at commit 6b12d11, republished under its MIT licence (© tirth8205). 149 words, ~452 tokens.

Download SKILL.mdSave it as .claude/skills/review-pr/SKILL.md (or your agent's skills folder).
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 PR

Review all commits of a pull request or branch against its base branch.

Steps

  1. Identify the changes. With a branch name run git diff --name-only main...<branch>; otherwise diff the current branch against main (or master). 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.

Output

## 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>

Tips

  • Use semantic_search_nodes_tool to find related code the PR may have missed.

© tirth8205, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/review-pr of tirth8205/code-review-graph.

Open the folder on GitHubat commit 6b12d11

Compare with similar skills

Knowledge Graph PR Review next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Knowledge Graph PR Review compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Knowledge Graph PR Review this skilltirth8205/code-review-graph32k—~452Automated safety check: PassMIT
Understand Diff AnalysisEgonex-AI/Understand-Anything86k—~1.4kAutomated safety check: PassMIT
Open Code Review CLIalibaba/open-code-review46k—~3.1kAutomated safety check: PassApache-2.0
Code Reviewflutter/flutter179k—~1.4kAutomated safety check: PassBSD-3-Clause
PR Review State Fetchprisma/orm48k—~767Automated safety check: PassApache-2.0
Review Triage Phaseprisma/orm48k—~995Automated safety check: PassApache-2.0

Similar skills

  • Understand Diff Analysis

    Egonex-AI/Understand-Anything

    Reads your git changes or a pull request against a prebuilt knowledge graph of the project to explain what changed, which components are affected and what is risky.

    86k GitHub stars~1.4k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Open Code Review CLI

    alibaba/open-code-review

    Runs the ocr command-line tool to review Git changes, a commit or a branch comparison with an AI model, returning line-level comments and optionally applying fixes.

    46k GitHub stars~3.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Code Review

    flutter/flutter

    Performs a comprehensive, multi-step code review of pull requests or local code changes, using iterative refinement (generation, critique, synthesis) to ensure high-quality, actionable feedback.

    179k GitHub stars~1.4k tokensUpdated today
    DevelopmentAuto-check passed
  • Official

    Fetches a pull request's canonical review state as JSON, validates it, and renders markdown, a text summary and triage target files from it using bundled scripts.

    48k GitHub stars~767 tokensUpdated today
    DevelopmentAuto-check passed
  • Official

    Runs the triage step of the review-framework loop: reads fetched PR review state, builds `review-actions.json`, validates it and renders `review-actions.md`.

    48k GitHub stars~995 tokensUpdated today
    DevelopmentAuto-check passed
  • Code Review

    yaklang/yakit

    对 Yakit 仓库的代码改动做规范化 code review:按代码逻辑、TS 定义、UI 引用与 Props、CSS 样式、依赖版本、配置项六个维度审查,检查测试用例缺失,强制执行 tsc 类型检查与 vitest 测试验证,输出「结果汇总 / 明细解释 / 合并结论」三块报告,经用户确认后写入文件。当用户要求 review、审查、评审代码改动,或在提交、合并、提 PR…

    7.8k GitHub stars~1.5k tokensUpdated today
    DevelopmentAuto-check: notes

More from tirth8205/code-review-graph

  • Graph-Based Bug Tracing

    tirth8205/code-review-graph

    Traces a bug through a code knowledge graph, following callers, callees and execution flow before opening source files, within a small token budget.

    32k GitHub starsUsed in 1 repo~287 tokens
    Auto-check passed
  • Explore Codebase with Graph

    tirth8205/code-review-graph

    Navigates a codebase through the code-review-graph MCP tools: architecture overview, symbol search, caller and callee tracing, flows and oversized functions.

    32k GitHub starsUsed in 1 repo~335 tokens
    Auto-check passed
  • Graph-Guided Safe Refactoring

    tirth8205/code-review-graph

    Plans a refactor from a code dependency graph, previews renames before applying them and checks that the final impact matches the plan.

    32k GitHub starsUsed in 1 repo~332 tokens
    Auto-check passed
  • Graph-Based Change Review

    tirth8205/code-review-graph

    Reviews a change set using a code knowledge graph for risk scores, blast radius and test gaps, and ends with a merge recommendation.

    32k GitHub starsUsed in 1 repo~331 tokens
    Auto-check passed
  • Code Review Graph Builder

    tirth8205/code-review-graph

    Builds or incrementally updates the code-review knowledge graph for a repository and reports whether the build succeeded, partly or failed.

    32k GitHub stars~295 tokensUpdated 3 days ago
    Auto-check passed
  • Review Delta

    tirth8205/code-review-graph

    Reviews only the code changed since the last commit, using a code-graph MCP server to find risk-scored changes, test gaps and the blast radius, then writes a short report.

    32k GitHub stars~325 tokensUpdated 3 days ago
    Auto-check passed

Works with

Categories

Questions about Knowledge Graph PR Review

What does Knowledge Graph PR Review do?

Reviews a pull request or branch diff with a code knowledge graph and produces a structured review that includes blast-radius analysis. The agent diffs the branch against main or master, then calls tools from a code-graph server. It starts with a minimal-context tool, building or updating the graph if that reports it is not ready, and then runs change detection, which returns risk-scored changed functions, test gaps and affected flows across the whole branch.

When should I use Knowledge Graph PR Review?

Knowledge Graph PR Review fits situations like: reviewing a pull request with a view of what else it affects; checking a branch for untested risky changes before merge; finding the callers of a changed public function.

How do I install Knowledge Graph PR Review in Claude Code?

Run `npx skills add tirth8205/code-review-graph --skill review-pr -a claude-code`. Or copy the skill folder (skills/review-pr in tirth8205/code-review-graph) into .claude/skills/review-pr in your project. Claude Code loads it when a task matches its description.

How do I install Knowledge Graph PR Review in Codex?

Run `npx skills add tirth8205/code-review-graph --skill review-pr -a codex`. Or copy the skill folder (skills/review-pr in tirth8205/code-review-graph) into .agents/skills/review-pr in your project. Codex loads it when a task matches its description.

Can I use Knowledge Graph PR Review in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add tirth8205/code-review-graph --skill review-pr -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/review-pr, .gemini/skills/review-pr, .github/skills/review-pr and .opencode/skills/review-pr in your project.

What does Knowledge Graph PR Review need to run?

Going by SKILL.md and its folder, Knowledge Graph PR Review needs the command-line tools its instructions call (git). Our summary lists: The code-review-graph tools available to your agent; Git.

Does Knowledge Graph PR Review access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Knowledge Graph PR Review safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Knowledge Graph PR Review use?

Knowledge Graph PR Review is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Knowledge Graph PR Review use?

About 452 tokens (SKILL.md is roughly 1.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Knowledge Graph PR Review?

Skills that share tags, products or a category with Knowledge Graph PR Review: Understand Diff Analysis (Egonex-AI/Understand-Anything, 86k stars), Open Code Review CLI (alibaba/open-code-review, 46k stars), Code Review (flutter/flutter, 179k stars) and PR Review State Fetch (prisma/orm, 48k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Knowledge Graph PR Review?

tirth8205 (a GitHub user) maintains it in tirth8205/code-review-graph, which has 32,014 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 6, 2026.

Source: tirth8205/code-review-graph on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.