review-pr

review-pr is a command for Claude Code from ai-sdlc-framework/ai-sdlc. It costs 21 tokens per session (1,047 once invoked), scanned A, original, Apache-2.0.

A command that reviews a GitHub pull request from testing, code-quality, and security perspectives. It gathers the pull request and any linked issue, then presents structured findings.

In plain words
What is it for?
Use it to inspect a pull request's changes, test coverage, design concerns, and security risks before merging.
Why use it?
It brings several review concerns together in one run instead of requiring separate checks. Linked issue information helps reviewers compare the code with its intended acceptance criteria.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md.

Part of the ai-sdlc plugin — 1 skill, 16 commands, 9 agents shipped together

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/ai-sdlc-framework/ai-sdlc/review-pr
Clone the repo
git clone --depth 1 https://github.com/ai-sdlc-framework/ai-sdlc

Made for: Claude Code.

Or install ai-sdlc, the plugin that ships this one along with the rest of its 1 skill, 16 commands, 9 agents.

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/ai-sdlc-framework/ai-sdlc/review-pr.svg)](https://agentmods.dev/commands/ai-sdlc-framework/ai-sdlc/review-pr)
Your own site
<a href="https://agentmods.dev/commands/ai-sdlc-framework/ai-sdlc/review-pr"><img src="https://agentmods.dev/badge/commands/ai-sdlc-framework/ai-sdlc/review-pr.svg" alt="Measured on agentmods" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,047 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.1 $0.00021 $0.01047
Opus 5 $0.00010 $0.00524
Sonnet 5 $0.00004 $0.00209
Haiku 4.5 $0.00002 $0.00105

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

ai-sdlc-plugin/commands/review-pr.md · 111 lines

How it starts

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

Review PR #$ARGUMENTS by invoking @ai-sdlc/orchestrator's executeReview() for the three review perspectives. The orchestrator already drives the LLM-based ReviewAgentRunner and applies the meta-review pass that filters medium-confidence findings; this skill's job is to fetch context, fan out to the three review types, and present the structured verdicts.

Step 1 — Fetch PR context

Don't hardcode --repo — let the cwd's git remote drive gh.

PR=$ARGUMENTS

# Diff + metadata for the review agents
gh pr diff "$PR" > /tmp/pr-diff.txt
gh pr view "$PR" --json number,title,body,headRefName,changedFiles > /tmp/pr.json

# Linked issue (if any) — feeds acceptance-criteria extraction
LINKED=$(gh pr view "$PR" --json body --jq '
  (.body | scan("(?i)(?:closes|fixes|resolves)\\s+#([0-9]+)"))[0][0] // empty
')
if [ -n "$LINKED" ]; then
  gh issue view "$LINKED" --json number,title,body > /tmp/issue.json
fi

If there's no linked issue, omit --issue-file from the calls below — cli-review falls back to the PR title/body.

Step 2 — Run the three review types

for TYPE in testing critic security; do
  pnpm --filter @ai-sdlc/dogfood review \
    --pr "$PR" \
    --diff-file /tmp/pr-diff.txt \
    --type "$TYPE" \
    ${LINKED:+--issue-file /tmp/issue.json} \
    > "/tmp/review-$TYPE.json" 2>"/tmp/review-$TYPE.stderr"
done

Each call writes a structured ReviewVerdict JSON to its own file:

{
  "approved": true | false,
  "findings": [
    { "severity": "critical"|"major"|"minor"|"suggestion",
      "file": "path",
      "line": 42,
      "message": "string" }
  ],
  "summary": "string"
}

If any of the three calls writes to stderr, surface it — typically a config issue, not a true review failure.

Step 3 — Present verdicts

For each review type in order (testing, critic, security):

  1. Header line — Testing: APPROVED with 2 suggestions or Critic: CHANGES REQUESTED — 1 critical, 3 major
  2. Summary — the orchestrator's summary string
  3. Findings — only critical and major; minor and suggestion go in a collapsed list

Read the full file on GitHub · 111 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. 6d ago First seen · 111 lines · 21 tokens per session scan A 1e3e1f6f271d

Subscribe to this mod's changes

review-pr is a command published in the GitHub repository ai-sdlc-framework/ai-sdlc (103 stars, last pushed today), licensed Apache-2.0. It adds 21 tokens to every session and 1,047 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.