Skip to main content
skill CX Codex

git-pr-reviewer — Claude Code skill: PR review before merge

The skill reads your branch diff and walks the changed files for bugs, security holes, performance and test gaps. Handy when you would rather not read the diff yourself.

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

What git-pr-reviewer does

It pulls the diff with git diff main...HEAD or git diff <base-branch>...HEAD, lists modified, added and deleted files, then goes through each one. The pass covers logic errors, SQL injection, XSS, hardcoded secrets, N+1 queries, memory leaks, missing error handling and thin test coverage.

A four-part checklist sits behind it: security, code quality, performance, testing. That means input validation on user data, authentication and authorization checks, duplicated code, unused imports, and whether the tests actually assert something. Output is markdown — a change summary, issues split into Critical, Warnings and Suggestions with file:line, plus a verdict of APPROVE, REQUEST CHANGES or NEEDS DISCUSSION.

The skill needs Read, Grep, Glob and Bash. No Bash means no git diff, so it will not run in a sandbox that blocks shell access. Name the base branch explicitly, or the diff may compare against the wrong ref.

What it helps with

  • scan a branch diff for SQL injection and XSS before merge
  • catch hardcoded API keys and passwords in the changes
  • spot N+1 queries and redundant database calls
  • check that new code has tests and edge cases covered
  • get an APPROVE or REQUEST CHANGES verdict tied to file and line

Example prompts for the agent

  • review the current branch against main
  • check this diff for security issues before I merge
  • go through the changes and tell me what tests are missing

How to install git-pr-reviewer

1Skills CLI (Vercel)

npx skills add OneWave-AI/claude-skills --skill git-pr-reviewer -a claude-code

2Manually: put the files in place

~/.claude/skills/git-pr-reviewer/SKILL.md

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

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about git-pr-reviewer

How do I install git-pr-reviewer in Claude?

Run npx skills add OneWave-AI/claude-skills --skill git-pr-reviewer -a claude-code. The skill lands in ~/.claude/skills/git-pr-reviewer/SKILL.md.

What does git-pr-reviewer do?

It reads the branch diff and reviews changed files for bugs, vulnerabilities, performance problems and missing tests. You get a report with a merge verdict at the end.

Which tools does the skill need?

Read, Grep, Glob and Bash. Bash is required to run git diff, so the skill will not work where shell access is blocked.

Source text

SKILL.md · MIT
---
name: git-pr-reviewer
description: Review pull requests for code quality, security issues, and best practices. Use when reviewing PRs, checking code changes, or analyzing diffs before merge.
allowed-tools: Read, Grep, Glob, Bash
---

# Git PR Reviewer

## Instructions

When reviewing a pull request:

1. **Get the diff**: Run `git diff main...HEAD` or `git diff <base-branch>...HEAD`
2. **Analyze changed files**: Identify all modified, added, and deleted files
3. **Review each file** for:
   - Logic errors and bugs
   - Security vulnerabilities (SQL injection, XSS, hardcoded secrets)
   - Performance issues (N+1 queries, unnecessary re-renders, memory leaks)
   - Code style and consistency
   - Missing error handling
   - Test coverage gaps

## Review Checklist

### Security
- [ ] No hardcoded credentials or API keys
- [ ] Input validation on user data
- [ ] Proper authentication/authorization checks
- [ ] No SQL injection vulnerabilities
- [ ] XSS prevention in place

### Code Quality
- [ ] Functions are small and focused
- [ ] No code duplication
- [ ] Clear variable/function naming
- [ ] Proper error handling
- [ ] No unused imports or dead code

### Performance
- [ ] No unnecessary database queries
- [ ] Efficient algorithms used
- [ ] Proper caching where needed
- [ ] No memory leaks

### Testing
- [ ] New code has tests
- [ ] Edge cases covered
- [ ] Tests are meaningful, not just for coverage

## Output Format

```markdown
## PR Review Summary

### Overview
[Brief summary of changes]

### Issues Found
#### Critical
- [Issue description + file:line]

#### Warnings
- [Issue description + file:line]

#### Suggestions
- [Improvement ideas]

### Approval Status
[APPROVE / REQUEST CHANGES / NEEDS DISCUSSION]
```

## Example

```bash
# Review current branch against main
git diff main...HEAD --stat
git diff main...HEAD
```

© OneWave-AI · MIT · OneWave-AI/claude-skills

Similar skills

All skills for Code review and refactoring →

From the same set66

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