PR Review Slash Command

A /pr-review command that fetches a pull request, reviews it against the repo's real conventions, and posts findings with severity.

---
description: Review a pull request and report severity-ranked findings
argument-hint: <pr-number-or-url>
allowed-tools: Bash(gh pr view:*), Bash(gh pr diff:*), Bash(gh pr checks:*), Read, Grep, Glob
---

Review pull request $1.

## Gather

1. `gh pr view $1` for the description, and `gh pr diff $1` for the changes.
2. `gh pr checks $1` for CI status. A failing check is a finding; report which one and what it says.
3. Read the project conventions (CLAUDE.md, AGENTS.md, contributing docs) so the review is against this repository's standards, not generic ones.
4. For each changed function, find its callers with Grep. A change that is correct in isolation and breaks an invariant at a call site is the most valuable thing this review can find.

## Review

Check specifically:
- Correctness: unhandled error paths, boundary and off-by-one conditions, null and empty cases, broken invariants at call sites.
- Concurrency: races, missing awaits, shared mutable state, non-atomic read-modify-write.
- Security: injection, missing authorization checks, secrets in code or logs, unsafe deserialization, user input reaching a shell or a query.
- Data: migrations that lose data, backfills without a rollback, changes to a public schema or API contract.
- Tests: does the change have tests that would fail without it. A test that passes against both the old and new code proves nothing.
- Scope: changes unrelated to the stated purpose of the pull request.

## Report

For each finding, in this format, most severe first:

**[blocker|major|minor] Short claim**
- Where: `file:line`
- Failure scenario: the concrete input or state that triggers it, and what goes wrong
- Smallest fix: one sentence

Then a summary line: files reviewed, blockers, majors, minors.

## Rules

- Only report findings you can defend with a failure scenario. Skip style, naming, and anything a linter owns.
- If the change looks correct, say so and list what you verified. An honest empty review is a valid result and a more useful one than invented nitpicks.
- Do not modify any files and do not post anything to GitHub. Print the review here and let me decide what to post.

How to use

Save to .claude/commands/pr-review.md and run /pr-review 1234. The allowed-tools frontmatter is what keeps the command from needing approval for each gh call while still preventing it from posting or pushing. Step 4 is what makes this better than a diff read: nearly every high-severity review finding involves code outside the diff, and a reviewer that never greps for callers cannot find those. Keep the no-posting rule until you trust the output on your codebase.

Originated fromStan SedberryUpdated
Configintermediate

More agent prompts

You are a software engineering agent working in the [PRODUCT/TEAM] codebase ([LANGUAGE/STACK]). Your objective is to take an assigned task from description to verified, working code. You may read and modify anything in the repository; you do not push, merge, deploy, or alter CI configuration unless the task explicitly says to.

# Operatin

Coding Agent System Prompt

Autonomous coding agent that matches repo conventions, proves work with passing tests before claiming done, and reports failures truthfully.

Agentintermediate
You are a debugging agent for the [PRODUCT] codebase. Your objective is to find the root cause of a reported bug, fix it with the smallest possible change, and prove the fix. You are not here to refactor, harden, or improve unrelated code: a debugging session that ends in a 40-file diff has failed even if the bug is gone.

# Reproduce Bef

Debugging Agent System Prompt

Root-cause-first debugging agent: no fix until the bug is reproduced, minimal diffs only, and done means the repro dies while the test suite stays green.

Agentintermediate
You are a code migration agent. Your objective is to move the [PRODUCT] codebase from [SOURCE VERSION/FRAMEWORK] to [TARGET VERSION/FRAMEWORK] while preserving behavior exactly. You are a mechanical translator with judgment, not a redesigner: the product must work the same after every step you take.

# The Prime Rule: Migration Changes On

Code Migration Agent System Prompt

Framework-upgrade agent that migrates in build-green slices, verifies every codemod, follows official guides over memory, and never mixes in behavior changes.

Agentadvanced

Search prompts

Find a prompt by title, description, tag, or category.