Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

review-pr — Claude Code skill: PR review and setup

This skill reviews a PR or branch through a code knowledge graph, showing risk, affected flows, and test gaps. Use it when a diff needs structural context.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add tirth8205/code-review-graph --skill review-pr -a claude-code
Open on GitHub

What review-pr does

The skill reviews every commit in a pull request or branch against its base branch. It identifies changed files, risk-scored functions, missing tests, and affected flows across the branch. The output includes a summary, overall risk, blast radius, test coverage, file-level concerns, missing tests, and recommendations.

It uses graph tools such as get_minimal_context_tool, detect_changes_tool, query_graph_tool, and review-context queries. For high-risk functions, it checks callers and tests, then flags public API changes when callers were not updated. If the graph is not ready, the workflow runs build_or_update_graph_tool() before continuing.

The review scenario uses main as its base and can account for master. Check the base branch before running it, because that choice controls the diff and impact analysis.

What it helps with

  • review a PR against its base branch
  • spot high-risk changed functions
  • trace the blast radius of a diff
  • find missing tests for changed code
  • flag public API changes with stale callers

Example prompts for the agent

  • Review `<PR number or branch name>` against `main` and produce the structured PR review.
  • Analyze `<PR number or branch name>`, then inspect callers and tests for every high-risk function.
  • Compare the current branch with `main`, report affected flows and missing tests, and update the graph if it is not ready.

How to install review-pr

1Skills CLI (Vercel)

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

2Manually: put the files in place

~/.claude/skills/review-pr/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/review-pr/

From the same set7

The whole set →

Similar

qa garrytan Automate bug hunting in browser, API, CLI, jobs, workers, and webhooks. Searches code, runs commands, checks logs, and asks clarifying questions. Claude Code CX Codex Cursor +1 457installs workers-profiling cloudflare Skill for analyzing CPU and memory usage in deployed Cloudflare Workers and Durable Objects. Finds expensive functions and proposes code optimizations. Claude Code CX Codex Cursor +1 12,100installs code-reviewer https://github.com/Jeffallan Analyzes code diffs and files to spot bugs, security vulnerabilities (SQL injection, XSS), code smells, N+1 queries, and returns a prioritized review report. Use for pull request reviews and code audits. Claude Code CX Codex Cursor +1 6,500installs claude-code Hermes Agent + Teknium Delegates coding tasks to the Claude Code CLI through terminal commands. Useful for running automated refactoring, bug fixes, and tests in one-shot or interactive sessions. Claude Code CX Codex Cursor +1 433installs review-agent-setup Tom Farley This skill gates AI review actions behind manual human approval before pull requests or CI pipelines change. Every attempt generates an Ed25519-signed receipt for offline auditing. Claude Code CX Codex Cursor 5,200installs codebase-inspection Hermes Agent Counts code lines, files, languages, and code-to-comment ratios with pygount. Use it to inspect a repository’s size and composition. Claude Code CX Codex Cursor +1 420installs improve-codebase-architecture Matt Pocock This skill scans a codebase for architectural friction, then builds a visual HTML report with refactoring candidates. Use it before a deeper architecture review. Claude Code 1,163,035installs tdd Matt Pocock Guides the red-green TDD loop: ensures tests are written first, keep them at public interfaces, and avoid coupling to implementation details. Claude Code 1,141,062installs

Questions about review-pr

How do I install review-pr in Claude Code?

Run npx skills add tirth8205/code-review-graph --skill review-pr -a claude-code, then run npx skills add tirth8205/code-review-graph --skill review-pr -a claude-code again. The skill file is at ~/.claude/skills/review-pr/SKILL.md.

What does review-pr do?

It reviews a PR or branch with a code knowledge graph, scores changed functions for risk, checks callers and tests, and produces a structured review with blast-radius analysis.

What happens when the code graph is not ready?

The workflow calls build_or_update_graph_tool() and continues with the change analysis.

Source text

SKILL.md · MIT
---
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 · tirth8205/code-review-graph

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor