review-pr

review-pr is a command for Claude Code from desplega-ai/agent-swarm. It costs 19 tokens per session (975 once invoked), scanned A, original, MIT.

A command that examines a GitHub pull request or GitLab merge request and writes structured review feedback. A pull request or merge request is a proposal to merge code from one branch into another.

In plain words
What is it for?
Use it to review a request by number or URL, inspect its diff, check automated tests, and apply repository-specific review and merge rules. It supports both GitHub and GitLab.
Why use it?
It gathers the request, changed files, project guidance, and continuous-integration results in one review process. Continuous integration, or CI, automatically builds and tests changes; failing CI causes the review to request changes.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Good fit Use it to review a request by number or URL, inspect its diff, check automated tests, and apply repository-specific review and merge rules. It supports both GitHub and GitLab.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/desplega-ai/agent-swarm/review-pr
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.

Clone the repo
git clone --depth 1 https://github.com/desplega-ai/agent-swarm

Made for: Claude Code.

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/desplega-ai/agent-swarm/review-pr/github.svg)](https://agentmods.dev/commands/desplega-ai/agent-swarm/review-pr)
Your own site
<a href="https://agentmods.dev/commands/desplega-ai/agent-swarm/review-pr"><img src="https://agentmods.dev/badge/commands/desplega-ai/agent-swarm/review-pr/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for review-pr

Your own site · 80×15
<a href="https://agentmods.dev/commands/desplega-ai/agent-swarm/review-pr"><img src="https://agentmods.dev/badge/commands/desplega-ai/agent-swarm/review-pr.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 975 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00019 $0.00975
Opus 5 $0.00010 $0.00487
Sonnet 5 $0.00004 $0.00195
Haiku 4.5 $0.00002 $0.00097

Measured 10d ago against content hash 59efe2caa2ff, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, 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 10d 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.

plugin/commands/review-pr.md · 113 lines

How it starts

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

Review Pull Request / Merge Request

Review a PR (GitHub) or MR (GitLab) by analyzing changes and providing structured feedback.

Provider detection: Check the remote URL or provided URL:

  • If GitHub → use gh pr commands
  • If GitLab → use glab mr commands

Arguments

  • pr-number-or-url: Either a PR number (e.g., 123) or a full URL

Workflow

1. Setup

  • Ensure the repo is cloned to /workspace/personal/<repo-name> (clone with gh repo clone if needed)
  • Fetch, checkout the PR branch, get PR details and diff

2. Check CI Status (MANDATORY)

Check CI with gh pr checks <pr-number> (or glab mr view --json pipelines).

If CI checks are failing, this is an automatic REQUEST_CHANGES. Do not approve a PR with failing CI. Include the failing check names and error details in your review.

2b. Review Repository Guidelines

Check the "Review Guidance" section of your Repository Guidelines for repo-specific review instructions (e.g., "check README.md", "enforce camelCase in specific directories"). Apply these instructions during your review below.

Also note the repo's Merge Policy — check allowMerge and mergeChecks before approving or merging. If allowMerge is false, do NOT merge — only review and approve/request changes.

3. Verify Tests Are Included (MANDATORY)

Check that the PR includes test changes. If the PR modifies code but does not add or update tests, this is an automatic REQUEST_CHANGES. Every code change must include corresponding tests.

Exceptions:

  • Pure documentation changes (README, comments only)
  • Configuration-only changes (CI config, linter config, env files)
  • Dependency version bumps with no code changes

When requesting changes for missing tests, be specific about what tests are needed.

4. Analyze the Changes

Review the diff for:

  • Security issues: SQL injection, XSS, command injection, secrets in code
  • Logic errors: Off-by-one errors, null handling, edge cases
  • Performance concerns: N+1 queries, unnecessary loops, memory leaks
  • Code quality: Naming, complexity, duplication, missing error handling
  • Test coverage: Are included tests sufficient? Do they cover edge cases?

Read the full file on GitHub · 113 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. 10d ago First seen · 113 lines · 19 tokens per session scan A 59efe2caa2ff

Subscribe to this mod's changes

review-pr is a command published in the GitHub repository desplega-ai/agent-swarm (758 stars, last pushed today), licensed MIT. It adds 19 tokens to every session and 975 once invoked, about $0.0001 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.