review_pr

review_pr is a command for Claude Code from Osiris-DevWorks/smart-citizen. It costs 19 tokens per session (1,816 once invoked), scanned A, original, Apache-2.0.

A guided procedure for reviewing one GitHub pull request, which is a proposed code change submitted for review. It pauses at checkpoints so the user can decide whether to continue.

In plain words
What is it for?
Reviewing a pull request by gathering its details, walking through each changed file, checking related discussion, and producing a final assessment.
Why use it?
It organizes the review and makes sure the request, changed files, automated checks, and existing comments are considered before a verdict.

Command for Claude Code

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/osiris-devworks/smart-citizen/review_pr
Clone the repo
git clone --depth 1 https://github.com/Osiris-DevWorks/smart-citizen

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/osiris-devworks/smart-citizen/review_pr.svg)](https://agentmods.dev/commands/osiris-devworks/smart-citizen/review_pr)
Your own site
<a href="https://agentmods.dev/commands/osiris-devworks/smart-citizen/review_pr"><img src="https://agentmods.dev/badge/commands/osiris-devworks/smart-citizen/review_pr.svg" alt="Measured on agentmods" 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 1,816 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.00019 $0.01816
Opus 5 $0.00010 $0.00908
Sonnet 5 $0.00004 $0.00363
Haiku 4.5 $0.00002 $0.00182

Measured 4d ago against content hash a060d23a2b56, 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 4d 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.

.claude/commands/review_pr.md · 129 lines

How it starts

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

/review_pr

Drive a structured review of one PR with human-in-the-loop checkpoints. Adapted from the team's review_all.md pattern but scoped to a single PR and tailored to Smart Citizen's layer ordering and standards.

Work through every step in order. After each step, stop at the CHECKPOINT and wait for the user before continuing.

Argument

$ARGUMENTS — required, one of:

  • A PR number (e.g. 48)
  • A PR URL (e.g. https://github.com/Osiris-DevWorks/smart-citizen/pull/48)
  • The literal token current — resolve the PR for the current branch

If missing or malformed, abort with: /review_pr requires a PR number, URL, or current.

1. Gather PR context

Resolve the PR number, then fetch in parallel:

  • gh pr view <N> --json title,body,state,baseRefName,headRefName,author,changedFiles,files,statusCheckRollup,url,isDraft,labels
  • gh pr diff <N> — full unified diff (cache this; you'll slice per-file from it later)
  • gh api repos/Osiris-DevWorks/smart-citizen/pulls/<N>/comments — code-review comments
  • gh api repos/Osiris-DevWorks/smart-citizen/issues/<N>/comments — general PR conversation
  • If the title or body references a GitHub issue (#NN or closes #NN), fetch it: gh issue view <NN> --json title,body,labels,state for context.

Compute the GitHub diff-anchor MD5 for each changed file path upfront so you can link to file diffs in the walkthrough below. Use Python: hashlib.md5(path.encode()).hexdigest(). The anchor URL pattern is:

https://github.com/Osiris-DevWorks/smart-citizen/pull/<N>/files#diff-<md5>

2. Summarize the PR

Present a concise summary:

  • What — scope in plain language.
  • Why — linked GitHub issue summary if present; otherwise note "no linked issue."
  • Base / head — target branch and source branch. Flag if base is not the active release/X.Y.Z — per root CLAUDE.mdVersion & Release → Branching model, PRs target the active integration branch, not main.
  • CI status — pass / fail / pending (from statusCheckRollup).
  • Existing comments — short summary of any prior review comments or conversation.
  • Files changed (N) — list each file with a one-line description of what it does.

Read the full file on GitHub · 129 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. 4d ago First seen · 129 lines · 19 tokens per session scan A a060d23a2b56

Subscribe to this mod's changes

review_pr is a command published in the GitHub repository Osiris-DevWorks/smart-citizen (99 stars, last pushed today), licensed Apache-2.0. It adds 19 tokens to every session and 1,816 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.