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.
git clone --depth 1 https://github.com/s977043/river-reviewWrote 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.
[](https://agentmods.dev/commands/s977043/river-review/range-review)<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="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00064 | $0.04941 |
| Opus 5 | $0.00032 | $0.02471 |
| Sonnet 5 | $0.00013 | $0.00988 |
| Haiku 4.5 | $0.00006 | $0.00494 |
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 today.
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` を対象リポジトリで実行しない。 How it starts
The opening of the file, as written. The whole thing — 189 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 本すべてのプロンプト冒頭に貼る)
あなたは読み取り専用のレビュー agent です。対象リポジトリ: <repo path>(作業ツリーを書き換えない)。
レビュー対象: git 範囲 <from>..<to>。含まれる PR: <PR 番号と題名の一覧>。
差分の概要:
<git diff --stat の出力>
## 規律(厳守)
1. 主張は実測で裏付ける。指摘には必ず `file:line`(<to> 時点の内容)を書き、コマンドを実行したなら exit code を転記する。
パイプ越しの `$?` は末尾コマンド(`tail` 等)の値なので、exit code を測るときはパイプを外す。
2. CLI(`node src/cli.mjs` / `river`)を実行するときは、必ず `mktemp -d` で作った使い捨て git repo の中で行う。
`skills import` / `feedback add` / `suppression add` は作業ツリーへファイルを書くため、対象リポジトリ内で実行してはならない。
使い捨て repo の作り方: `d=$(mktemp -d) && cd "$d" && git init -q && git commit -q --allow-empty -m init`
3. 変異注入(既存テストの検出力を測るために実装を一時的に壊す)を行う場合は、
`git worktree add --detach <mktemp -d の path> <to>` で自分専用の worktree を作り、その中だけで行う。
終了前に `git worktree remove --force <path>` で必ず消す。対象リポジトリ本体の作業ツリーには一切触れない。
その worktree で `npm test` や `npm run build:action` を走らせるなら、`node_modules` は
**その worktree の中で `npm ci` して用意する**。対象リポジトリの `node_modules` を symlink してはならない。
親の `node_modules` はレビュー対象の版の lockfile と一致している保証が無く、`npm run build:action` の
出力が committed dist とズレて「dist が再現しない」という偽の finding になる(2026-09-07、v1.104.0 の
範囲レビューで視点 B が major として報告し、隔離 worktree の `npm ci` 後は
`git diff --exit-code runners/github-action/dist/` が exit 0 で再現したため反証した)。
4. 破棄系 git コマンド(`reset --hard` / `checkout -- <file>` / `clean` / `stash drop` / `push --force`)と `rm -rf` を対象リポジトリで実行しない。
5. 修正は提案に留める。ファイル編集・commit・push・issue / PR コメントの投稿を行わない。
6. 差分に無いコードへの推測、一般論だけの指摘、範囲の目的と無関係な指摘は書かない。
7. 出力は 1500 tokens 以内。次の 3 節で構成する:
- 判定: PASS / FINDINGS(blocker・major・minor の件数)
- finding: 1 件ごとに「重大度 / file:line / 再現手順(実行したコマンドと出力の要点、exit code)/ 提案」
- no-finding の根拠: 調べたが問題なしと判断した箇所を、確認方法つきで箇条書き
8. 途中で副作用(意図しない書き込み、前提の誤り)を起こしたら、隠さず出力末尾の「規律違反の自己申告」に書く。
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.
- today Changed · +6 lines 98efeca1ed64
- yesterday First seen · 183 lines · 64 tokens per session scan C db90e7067620
range-review is a command published in the GitHub repository s977043/river-review (3 stars, last pushed today), licensed MIT. It adds 64 tokens to every session and 4,941 once invoked, about $0.0003 per session on Opus 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.
Other commands, from other repositories
pr
Review a GitHub PR or GitLab MR with Punchcard and post the review into it.
merge
Finish a PR properly: every check green, every review addressed — human and bot — then merge and clean up.
pr
Prepare and open a pull request the senior way: gate, template, scrubbed, everything visible.
triage
Triages a PR comment — from a bot (Copilot, CI) or a human reviewer. Fetches the comment and diff via gh CLI, classifies it, applies the fix directly to the file if valid, posts a reply on the thread, and resolves it. Run from inside the repo.
done
Finish a task - document, create PR or merge, close.
fix-pr-comments
Systematically resolve Pull Request review comments using gh CLI to fetch comments and apply requested changes.