range-review

range-review is a command for Claude Code from s977043/river-review. It costs 64 tokens per session (5,496 once invoked), scanned C, original, MIT.

A read-only command for reviewing a range of Git changes, such as all pull requests merged for a release. It uses several review perspectives, checks findings against the source, and suggests how each finding should be handled.

In plain words
What is it for?
Use it after a group of changes is merged to inspect their combined logic, public contracts, design, and test quality without creating issues or pull requests.
Why use it?
Reviewing each pull request separately can miss interactions and contract mismatches that appear only across the whole range.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md; runs codex exec.

Part of the river-review plugin — 139 skills, 18 commands, 5 agents, 3 hooks shipped together

Good fit Use it after a group of changes is merged to inspect their combined logic, public contracts, design, and test quality without creating issues or pull requests.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/s977043/river-review/range-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/s977043/river-review

Made for: Claude Code.

Or install river-review, the plugin that ships this one along with the rest of its 139 skills, 18 commands, 5 agents, 3 hooks.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/s977043/river-review/range-review"><img src="https://agentmods.dev/badge/commands/s977043/river-review/range-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 64 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,496 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00064 $0.05496
Opus 5.5 $0.00026 $0.02198
Sonnet 5.5 $0.00013 $0.01099
Haiku 4.5 $0.00006 $0.00550

Measured 1mo ago against content hash 10b7ee2e574b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

range-review scanned grade C with 1 finding 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 1mo 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

4. 破棄系 git コマンド(`reset --hard` / `checkout -- <file>` / `clean` / `stash drop` / `push --force`)と `rm -rf` を対象リポジトリで実行しない。
.claude/commands/range-review.md · 219 lines

How it starts

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

範囲レビュー: git 範囲「$ARGUMENTS」に含まれる全 PR の diff を 1 つの単位として、3 視点の読み取り専用 agent で並列レビューし、finding をオーガナイザーが一次ソースで再現してから disposition 案を出す。

このスキルは複数 PR のウェーブ(1 リリース分、または 1 セッション分)が main にマージされた直後に呼び出すことを想定している。per-PR レビューは「その PR 単独で正しいか」しか見ず、同じ範囲の複数 PR が同じ関数・同じ概念を触った結果の相互作用や、複数 PR を跨いで初めて実態と食い違う公開契約の文言は素通りする。本コマンドは issue も PR も作らない。案を出すところで止め、実行はオーガナイザーがユーザー確認のうえ行う。

引数

  • <from>..<to> の git 範囲(例: c4453812..3ac089e1)
  • 省略時の既定は「1 つ前の release commit → HEAD」。次で求める:
git log --grep='chore(main): release' -2 --format='%h %s'

出力の 2 行目(1 つ前の release)を <from>、HEAD を <to> にする。HEAD 自体が release commit なら、そのリリースに含まれた PR 群をレビューすることになる(1 行目が HEAD と一致する場合も 2 行目を <from> にすればよい)。release commit が 1 件しか無い場合はユーザーに範囲を明示するよう求めて終了する。

手順

Step 1. 範囲の確定と要約

git log --oneline <from>..<to>
git diff --stat <from>..<to>
git log --format='%s' <from>..<to> | grep -oE '\(#[0-9]+\)$' | tr -d '(#)' | sort -n | uniq
  • 1 つ目が空なら「範囲が空」と報告して終了する
  • 3 つ目で PR 番号を列挙する。squash merge の subject 末尾 (#N) から取るため、それ以外の形式の commit は git log の目視で補う
  • 列挙した PR ごとに gh pr view <N> --json title,body --jq '.title' で題名を控える。Step 2 のプロンプトに PR 番号と題名の一覧、git diff --stat の出力、範囲文字列をそのまま貼る

Step 2. 3 視点の並列レビュー

Agent ツールで 3 本を 1 メッセージで同時に起動する。subagent_type: general-purpose、全て読み取り専用の指示で走らせる。各 agent に渡すプロンプトは、下の「共通規律」ブロックの後ろに視点別ブロックを 1 つ足したものである。共通規律は 3 本とも省略せず全文入れる。

3 本が同時に立ち上がらないとき: Codex CLI で直列に回す

並列起動は失敗する日がある。2026-09-04 から 09-08 までの 5 日連続で、メモリ逼迫による background task の kill とレート上限がログに残っている。視点を減らして 2 本で済ませてはならない(後掲「禁止事項」)。並列が通らないなら、同じプロンプトを Codex CLI へ渡して 1 本ずつ直列に回す。

準備は 1 回だけ行う。作業ツリーは全視点で共有してよい(読み取り専用のため)。

R=$(mktemp -d) && echo "$R" > /tmp/rr-base.txt
git worktree add --detach "$R/wt" <to>
# 共通規律を 1 ファイルに置き、視点別ブロックを後ろへ結合する
cat > "$R/common.txt" <<'EOF'
<共通規律の全文>
EOF
cat "$R/common.txt" "$R/pa-body.txt" > "$R/pa.txt"

各視点はこの形で起動する。--sandbox workspace-write は変異注入(規律 3)に要る。

export PATH=/opt/homebrew/opt/node@22/bin:$PATH
codex exec -C "$R/wt" --sandbox workspace-write --skip-git-repo-check - < "$R/pa.txt" > "$R/out-a.md" 2> "$R/err-a.log"

Read the full file on GitHub · 219 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. 1mo ago Changed · +30 lines 10b7ee2e574b
  2. 1mo ago Changed · +6 lines 98efeca1ed64
  3. 1mo ago First seen · 183 lines · 64 tokens per session scan C db90e7067620

Subscribe to this mod's changes

range-review is a command published in the GitHub repository s977043/river-review (7 stars, last pushed today), licensed MIT. It adds 64 tokens to every session and 5,496 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-06.