Skip to content
Skillpedia
General coding29k Β· #9596

pr-review-expert

What it does

This skill reviews code changes from pull requests or merge requests and reports problems ranked by severity. It is for developers who want a careful second look before merging code.

When to use it

  • βœ“When a pull request touches shared code, an API or the database and needs a careful review.
  • βœ“When a change is large and you want a structured review.
  • βœ“When the code handles sensitive parts such as login or payments.

Skill link

https://github.com/alirezarezvani/claude-skills/blob/main/engineering/skills/pr-review-expert/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/alirezarezvani/claude-skills/blob/main/engineering/skills/pr-review-expert/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œReview this pull request for bugs and security problems before I merge it.”

5 new skills a week. 1 minute to read.

How it works

It reads the diff file by file, checks the change against a checklist, looks for security issues and possible breaking changes, then writes a report with ranked findings.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

PR Review Expert

Tier: POWERFUL Category: Engineering Domain: Code Review / Quality Assurance


Overview

Structured, systematic code review for GitHub PRs and GitLab MRs. Goes beyond style nits β€” this skill performs blast radius analysis, security scanning, breaking change detection, and test coverage delta calculation. Produces a reviewer-ready report with a 30+ item checklist and prioritized findings.


Core Capabilities

  • Blast radius analysis β€” trace which files, services, and downstream consumers could break
  • Security scan β€” SQL injection, XSS, auth bypass, secret exposure, dependency vulns
  • Test coverage delta β€” new code vs new tests ratio
  • Breaking change detection β€” API contracts, DB schema migrations, config keys
  • Ticket linking β€” verify Jira/Linear ticket exists and matches scope
  • Performance impact β€” N+1 queries, bundle size regression, memory allocations

When to Use

  • Before merging any PR/MR that touches shared libraries, APIs, or DB schema
  • When a PR is large (>200 lines changed) and needs structured review
  • Onboarding new contributors whose PRs need thorough feedback
  • Security-sensitive code paths (auth, payments, PII handling)
  • After an incident β€” review similar PRs proactively

Fetching the Diff

GitHub (gh CLI)

# View diff in terminal
gh pr diff <PR_NUMBER>

# Get PR metadata (title, body, labels, linked issues)
gh pr view <PR_NUMBER> --json title,body,labels,assignees,milestone

# List files changed
gh pr diff <PR_NUMBER> --name-only

# Check CI status
gh pr checks <PR_NUMBER>

# Download diff to file for analysis
gh pr diff <PR_NUMBER> > /tmp/pr-<PR_NUMBER>.diff

GitLab (glab CLI)

# View MR diff
glab mr diff <MR_IID>

# MR details as JSON
glab mr view <MR_IID> --output json

# List changed files
glab mr diff <MR_IID> --name-only

# Download diff
glab mr diff <MR_IID> > /tmp/mr-<MR_IID>.diff

Workflow

Step 1 β€” Fetch Context

PR=123
gh pr view $PR --json title,body,labels,milestone,assignees | jq .
gh pr diff $PR --name-only
gh pr diff $PR > /tmp/pr-$PR.diff

Step 2 β€” Blast Radius Analysis

For each changed file, identify:

  1. Direct dependents β€” who imports this file?
# Find all files importing a changed module
grep -r "from ['\"].*changed-module['\"]" src/ --include="*.ts" -l
grep -r "require(['\"].*changed-module" src/ --include="*.js" -l

# Python
grep -r "from changed_module import\|import changed_module" . --include="*.py" -l
  1. Service boundaries β€” does this change cross a service?
# Check if changed files span multiple services (monorepo)
gh pr diff $PR --name-only | cut -d/ -f1-2 | sort -u
  1. Shared contracts β€” types, interfaces, schemas
gh pr diff $PR --name-only | grep -E "types/|interfaces/|schemas/|models/"

Blast radius severity:

  • CRITICAL β€” shared library, DB model, auth middleware, API contract
  • HIGH β€” service used by >3 others, shared config, env vars
  • MEDIUM β€” single service internal change, utility function
  • LOW β€” UI component, test file, docs

Step 3 β€” Security Scan

DIFF=/tmp/pr-$PR.diff

# SQL Injection β€” raw query string interpolation
grep -n "query\|execute\|raw(" $DIFF | grep -E '\$\{|f"|%s|format\('

# Hardcoded secrets
grep -nE "(password|secret|api_key|token|private_key)\s*=\s*['\"][^'\"]{8,}" $DIFF

# AWS key pattern
grep -nE "AKIA[0-9A-Z]{16}" $DIFF

# JWT secret in code
grep -nE "jwt\.sign\(.*['\"][^'\"]{20,}['\"]" $DIFF

# XSS vectors
grep -n "dangerouslySetInnerHTML\|innerHTML\s*=" $DIFF

# Auth bypass patterns
grep -n "bypass\|skip.*auth\|noauth\|TODO.*auth" $DIFF

# Insecure hash algorithms
grep -nE "md5\(|sha1\(|createHash\(['\"]md5|createHash\(['\"]sha1" $DIFF

# eval / exec
grep -nE "\beval\(|\bexec\(|\bsubprocess\.call\(" $DIFF

# Prototype pollution
grep -n "__proto__\|constructor\[" $DIFF

# Path traversal risk
grep -nE "path\.join\(.*req\.|readFile\(.*req\." $DIFF

Step 4 β€” Test Coverage Delta

# Count source vs test files changed
CHANGED_SRC=$(gh pr diff $PR --name-only | grep -vE "\.test\.|\.spec\.|__tests__")
CHANGED_TESTS=$(gh pr diff $PR --name-only | grep -E "\.test\.|\.spec\.|__tests__")

echo "Source files changed: $(echo "$CHANGED_SRC" | wc -w)"
echo "Test files changed:   $(echo "$CHANGED_TESTS" | wc -w)"

# Lines of new logic vs new test lines
LOGIC_LINES=$(grep "^+" /tmp/pr-$PR.diff | grep -v "^+++" | wc -l)
ec
FAQ

Does it only check style?

No, it checks correctness, security, breaking changes and test coverage, not only style.

Which platforms does it work with?

It works with GitHub pull requests and GitLab merge requests.

Can it check for security problems?

Yes, it scans for common issues such as injection risks, auth bypass and exposed secrets.

Details

Original description by the author

Use when asked to review a pull request or diff for correctness, security and quality. Reviews the change file by file with a severity-ranked checklist.

repo: alirezarezvani/claude-skills

Popularity

GitHub stars
29k
Ranking position
#9596
License
MIT
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills