review-pr

review-pr is a command for coding agents from mgreau/zen. It costs 8 tokens per session (541 once invoked), scanned A, original, MIT.

A command for reviewing a GitHub pull request, which is a proposed set of code changes awaiting review. It gathers the request’s description, changed files, discussion, and full code difference.

In plain words
What is it for?
Use it to review the current or specified pull request and identify correctness, security, quality, testing, and edge-case concerns.
Why use it?
It collects the surrounding context so you can assess a change for bugs, security issues, performance problems, tests, and breaking behavior.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/mgreau/zen/review-pr
Clone the repo
git clone --depth 1 https://github.com/mgreau/zen

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for review-pr

README.md
[![agentmods](https://agentmods.dev/badge/commands/mgreau/zen/review-pr.svg)](https://agentmods.dev/commands/mgreau/zen/review-pr)
Your own site
<a href="https://agentmods.dev/commands/mgreau/zen/review-pr"><img src="https://agentmods.dev/badge/commands/mgreau/zen/review-pr.svg" alt="Measured on agentmods" height="20"></a>
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 541 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00008 $0.00541
Opus 5 $0.00004 $0.00270
Sonnet 5 $0.00002 $0.00108
Haiku 4.5 $0.00001 $0.00054

Measured 3d ago against content hash 604044a1efaf, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

review-pr scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/review-pr.md · 68 lines

How it starts

The opening of the file, as written. The whole thing — 68 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are conducting a comprehensive code review of a GitHub Pull Request. Follow these steps:

1. Gather PR Context

First, determine which PR to review:

  • Check if the current branch is named pr-<number> - if so, extract the PR number
  • Otherwise, look for a PR number in the command arguments
  • Use gh pr view <number> to get PR metadata (title, description, author, status)
  • Use gh pr diff <number> to get the full diff
  • Use gh pr view <number> --json files -q '.files[].path' to list changed files
  • Use gh pr view <number> --json comments -q '.comments[] | "\(.author.login): \(.body)"' to get existing review comments

2. Analyze the Changes

Review the code changes with focus on:

  • Correctness: Does the code do what it claims to do?
  • Security: Are there any security vulnerabilities (SQL injection, XSS, command injection, etc.)?
  • Performance: Any obvious performance issues?
  • Code Quality: Is the code readable, maintainable, and following best practices?
  • Testing: Are there adequate tests? Do existing tests need updates?
  • Edge Cases: Are error conditions and edge cases handled?
  • Breaking Changes: Does this introduce any breaking changes?
  • Documentation: Is documentation updated if needed?

3. Provide Structured Feedback

Present your review in this format:

Summary

[Brief overview of what the PR does and overall assessment]

Critical Issues 🔴

[Issues that must be fixed before merging]

Suggestions 🟡

[Improvements that would be nice to have]

Positive Notes 💚

[Things done well - be specific]

Specific File Comments

[Organize by file with line number references where relevant]

Questions

[Anything unclear that needs clarification from the author]

4. Be Constructive

  • Be respectful and assume good intent
  • Explain why something should change, not just what
  • Suggest concrete improvements
  • Acknowledge good work
  • Focus on the code, not the person

5. Offer Next Steps

Ask the user if they want you to:

  • Post the review as comments on GitHub (using gh pr review)
  • Create specific inline comments on certain lines
  • Approve, request changes, or just comment
  • Help fix any issues you identified

Read the full file on GitHub · 68 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 68 lines · 8 tokens per session scan A 604044a1efaf

Subscribe to this mod's changes

review-pr is a command published in the GitHub repository mgreau/zen (23 stars, last pushed 4d ago), licensed MIT. It adds 8 tokens to every session and 541 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.