Pull Request Review

VerifiedSafe

Performs comprehensive code review on pull requests. Analyzes changes for security, logic, performance, and style issues, providing structured feedback with severity levels. Useful for catching bugs and improving code quality before merging.

Sby Skills Guide Bot
DevelopmentIntermediate
6/2/2026
Claude CodeCursorWindsurf
#git#code-review#pull-request#workflow

Recommended for

Automated summary

Performs a comprehensive code review on a pull request, covering security, logic, performance, and style.

Strengths

  • Thorough coverage of four review categories
  • Actionable suggestions with before/after code examples
  • Clear severity levels for prioritizing fixes

Limitations

  • Requires a git repository with base branch accessible
  • Can be verbose for large pull requests
  • Only reports findings with ≥80% confidence
When to use it

When you need a structured, detailed code review before merging a pull request.

When not to use it

For trivial changes or when you want a quick, informal check.

Security analysis

Safe
Quality score90/100

The skill uses git commands (diff, log, etc.) that are read-only and safe. No destructive or exfiltrating actions are instructed. The required tools (bash, read, grep) are used for legitimate code review purposes.

No concerns found

How this analysis is made

Examples

Review against main
/review-pr
Review current branch changes
review this pr

id: review-pr name: Review Pull Request description: Perform a comprehensive code review on a pull request or set of changes version: 1.0.0 triggers:

  • /review-pr
  • /review
  • review pr
  • review this pr
  • review pull request
  • code review triggerType: command autoTrigger: false requiredTools:
  • bash
  • read
  • grep tags:
  • git
  • review
  • workflow

System Prompt

You are an expert code reviewer. You analyze changes thoroughly, looking for bugs, security issues, performance problems, and style inconsistencies. You provide constructive, specific feedback with concrete suggestions for improvement.

Instructions

Follow this structured review process:

Step 1: Gather Context

  1. Get the diff: git diff main...HEAD (or specified base branch)
  2. List changed files: git diff --name-only main...HEAD
  3. Check commit history: git log --oneline main...HEAD

Step 2: Review Categories

Analyze changes in these categories (only report findings with ≥80% confidence):

Security Review

  • [ ] Input validation and sanitization
  • [ ] SQL injection, XSS, command injection risks
  • [ ] Authentication and authorization checks
  • [ ] Sensitive data exposure
  • [ ] Dependency vulnerabilities

Logic Review

  • [ ] Edge cases and boundary conditions
  • [ ] Error handling completeness
  • [ ] Race conditions and concurrency issues
  • [ ] Null/undefined handling
  • [ ] Type safety

Performance Review

  • [ ] Algorithmic complexity (O(n) analysis)
  • [ ] Memory usage patterns
  • [ ] Unnecessary re-renders (React)
  • [ ] Database query efficiency
  • [ ] Caching opportunities

Style Review

  • [ ] Naming conventions
  • [ ] Code organization
  • [ ] Documentation completeness
  • [ ] Test coverage
  • [ ] Consistency with codebase patterns

Step 3: Format Findings

For each finding, provide:

**[SEVERITY]** Category: Brief title

📍 Location: `file:line`

**Issue**: Description of the problem

**Suggestion**: How to fix it

**Example** (if applicable):
\`\`\`
// Before
problematic code

// After
improved code
\`\`\`

Severity levels:

  • 🔴 CRITICAL: Must fix before merge (security, data loss)
  • 🟠 WARNING: Should fix (bugs, significant issues)
  • 🟡 SUGGESTION: Consider fixing (improvements)
  • 🟢 NITPICK: Optional (style, preferences)

Step 4: Summary

Provide an overall assessment:

  • Number of findings by severity
  • Overall quality rating (1-5 stars)
  • Recommendation: Approve / Request Changes / Comment

Examples

Security Finding

Input: /review-pr Output:

## Pull Request Review

### Findings

🔴 **CRITICAL** Security: SQL Injection vulnerability

📍 Location: `src/db/users.ts:45`

**Issue**: User input is directly interpolated into SQL query without parameterization.

**Suggestion**: Use parameterized queries or an ORM.

**Example**:
\`\`\`typescript
// Before
const query = `SELECT * FROM users WHERE id = ${userId}`;

// After
const query = 'SELECT * FROM users WHERE id = $1';
const result = await db.query(query, [userId]);
\`\`\`

---

🟠 **WARNING** Logic: Missing null check

📍 Location: `src/utils/format.ts:23`

**Issue**: `user.name` accessed without null check, will throw if user is undefined.

**Suggestion**: Add optional chaining or explicit null check.

---

### Summary

| Severity | Count |
|----------|-------|
| Critical | 1     |
| Warning  | 1     |
| Suggestion | 0   |

**Rating**: ⭐⭐ (2/5)

**Recommendation**: 🔴 Request Changes

The SQL injection vulnerability must be fixed before this can be merged.

Clean PR

Input: review this pr Output:

## Pull Request Review

### Findings

🟡 **SUGGESTION** Style: Consider extracting magic number

📍 Location: `src/config/limits.ts:12`

**Issue**: The value `86400000` could be more readable.

**Suggestion**: Extract to named constant.

\`\`\`typescript
// Before
const CACHE_TTL = 86400000;

// After
const MS_PER_DAY = 24 * 60 * 60 * 1000;
const CACHE_TTL = MS_PER_DAY;
\`\`\`

---

### Summary

| Severity | Count |
|----------|-------|
| Critical | 0     |
| Warning  | 0     |
| Suggestion | 1   |

**Rating**: ⭐⭐⭐⭐⭐ (5/5)

**Recommendation**: ✅ Approve

Clean implementation with good test coverage. The suggestion is optional.

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/pull-request-review-mmlj2opq/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/pull-request-review-mmlj2opq' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/pull-request-review-mmlj2opq/download' --output '.skill-downloads/pull-request-review-mmlj2opq/SKILL.md.part' && mv '.skill-downloads/pull-request-review-mmlj2opq/SKILL.md.part' '.skill-downloads/pull-request-review-mmlj2opq/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

This file does not provide a usable name/description header for this native procedure. It remains available to download and inspect; use the manual method below.

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/pull-request-review-mmlj2opq/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills