pr-review

pr-review is a command for Claude Code from atretyak1985/swarmery. It costs 39 tokens per session (3,179 once invoked), scanned A, original, Apache-2.0.

A command for reviewing or triaging a GitHub pull request. In review mode it examines the proposed code changes; in triage mode it verifies existing comments, fixes valid issues, or replies with evidence.

In plain words
What is it for?
Use it with a pull-request URL or repository number to post findings, make approved fixes on the pull-request branch, and respond in comment threads.
Why use it?
It turns review comments into checked decisions instead of accepting them blindly. Repository setup and required checks are read from the project's review configuration.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the review-pack plugin — 1 command shipped together

Good fit Use it with a pull-request URL or repository number to post findings, make approved fixes on the pull-request branch, and respond in comment threads.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/atretyak1985/swarmery/pr-review
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/atretyak1985/swarmery

Made for: Claude Code.

Or install review-pack, the plugin that ships this one along with the rest of its 1 command.

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 pr-review

README.md
[![agentmods](https://agentmods.dev/badge/commands/atretyak1985/swarmery/pr-review/github.svg)](https://agentmods.dev/commands/atretyak1985/swarmery/pr-review)
Your own site
<a href="https://agentmods.dev/commands/atretyak1985/swarmery/pr-review"><img src="https://agentmods.dev/badge/commands/atretyak1985/swarmery/pr-review/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 pr-review

Your own site · 80×15
<a href="https://agentmods.dev/commands/atretyak1985/swarmery/pr-review"><img src="https://agentmods.dev/badge/commands/atretyak1985/swarmery/pr-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,179 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.00039 $0.03179
Opus 5.5 $0.00016 $0.01272
Sonnet 5.5 $0.00008 $0.00636
Haiku 4.5 $0.00004 $0.00318

Measured 14d ago against content hash 81d44822d3fc, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

pr-review 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 14d 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.

plugins/review-pack/commands/pr-review.md · 248 lines

How it starts

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

/pr-review — review a PR, or triage the comments on it

Arguments: $ARGUMENTS — <pr-url | repo#number> [review|triage].

Two modes, one procedure family:

  • triage — there are reviewer comments (a bot or a human) on the PR. Verify each one against the real code, fix the valid ones on the PR branch, and reply in the comment thread with a verdict backed by evidence.
  • review — no comments to triage (or explicitly requested). Review the PR diff yourself and post verified findings as one review with inline comments.

Step 0 — load the project's review config

Read ${CLAUDE_PROJECT_DIR}/.claude/project.json → prReview:

  • owner — the GitHub org or user that owns the repos.
  • worktreeRoot — where throwaway worktrees go (default: a pr-review/ dir under $AGENT_WORKSPACE_ROOT, else $TMPDIR).
  • repos.<name> — per repo: path (the local main checkout), setup (commands to run in a fresh worktree), gates (commands that must pass before anything is pushed), reviewSkills (skills to load before a review), notes (free-text quirks).
  • knowledge — optional path to a project-local markdown file with verification heuristics, known CI flake signatures and anything else a reviewer must know. Read it in full when present; it overrides nothing below, it adds to it.

Stop with a clear message if prReview is missing or the PR's repo is not under repos — never guess a gate. Resolve <repo> from the PR URL or repo#number.

Mode auto-detection when not given: if gh api repos/<owner>/<repo>/pulls/<n>/comments --paginate returns unresolved top-level comments (in_reply_to_id == null) authored by someone other than the PR author that have no reply yet → triage; otherwise → review.

Non-negotiable rules

  1. Verify before believing — in both directions. Never implement a reviewer suggestion and never post a finding without checking it against the code first. No "You're absolutely right", no thanks, no praise. A wrong rebuttal is worse than a fixed non-bug, so the evidence bar for "INVALID" is a concrete guard, constraint, or test — cited as file:line.
  2. Never touch the main checkouts. repos.<name>.path may hold the user's WIP on another branch. All work happens in a throwaway worktree.
  3. Thread replies, not top-level comments. Replies go to gh api repos/<owner>/<repo>/pulls/<n>/comments/<id>/replies -f body=.... A top-level gh pr comment breaks the thread and a review bot re-flags the finding.
  4. Idempotency. Before replying, list the thread's existing replies; if the PR author (or this tool) already answered a comment, skip it.
  5. Scope discipline. A real problem that predates the PR (visible via git diff origin/<base>...HEAD) is mentioned in the reply ("predates this PR, left for a separate cleanup") — not fixed in the PR.
  6. Nothing is pushed and no reply is posted until the repo's gates are green. A gate that cannot run (no test runner configured, say) is reported as exactly that — never as "tests pass".

Read the full file on GitHub · 248 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. 14d ago First seen · 248 lines · 39 tokens per session scan A 81d44822d3fc

Subscribe to this mod's changes

pr-review is a command published in the GitHub repository atretyak1985/swarmery (7 stars, last pushed 2d ago), licensed Apache-2.0. It adds 39 tokens to every session and 3,179 once invoked, about $0.0002 per session on Opus 5.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-10-01.