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/plan-merge-order)<a href="https://agentmods.dev/commands/s977043/river-review/plan-merge-order"><img src="https://agentmods.dev/badge/commands/s977043/river-review/plan-merge-order/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.
<a href="https://agentmods.dev/commands/s977043/river-review/plan-merge-order"><img src="https://agentmods.dev/badge/commands/s977043/river-review/plan-merge-order.svg" alt="Reviewed on agentmods" width="80" 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.00025 | $0.02206 |
| Opus 5 | $0.00013 | $0.01103 |
| Sonnet 5 | $0.00005 | $0.00441 |
| Haiku 4.5 | $0.00003 | $0.00221 |
Grade A, and why
plan-merge-order 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 9d 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.
How it starts
The opening of the file, as written. The whole thing — 146 lines — stays where its author put it; the contents beside it link to each section on GitHub.
複数の PR を作成・マージする際の順序を事前計画してください。対象: $ARGUMENTS
手順
0. Preflight 検証 (前提)
マージ順序を計算する前に、対象 PR が本当にマージ対象かを検証する。/preflight $ARGUMENTS を先に実行するか、以下を直接実行する:
git fetch origin main
git log origin/main --oneline -15 # main に関連コミットが既にあるか目視
# 対象 PR ごとに REST API で state を直接取得 (gh pr view の GraphQL はキャッシュ遅延あり)
for pr in <PR numbers>; do
gh api repos/OWNER/REPO/pulls/$pr --jq '{number, state, merged, merged_at, mergeable_state}'
done
# 類似キーワードで並行 in-flight PR を検索
gh pr list --state open --search "<keyword>" --json number,title,headRefName,author
# 直近 close 済 PR も確認 (並行作業の痕跡)
gh pr list --state closed --search "<keyword>" --limit 5 --json number,title,mergedAt
判定基準:
- 対象 PR に merged=true が含まれる → その PR を対象から除外してユーザーに報告
- 類似 keyword の別 open PR が存在 → 並行作業あり、続行前にユーザー確認
- main に同内容のコミット既に存在 → タスク obsolete の可能性、続行前にユーザー確認
この Step を飛ばして依存グラフ作成に進んではならない。gh pr list のキャッシュ遅延で closed PR を OPEN と誤判定し、重複作業・force-push 計画・stale commits 分析に時間を費やした事例が複数回発生している (2026-04-11 セッションで 4 重複 PR)。
1. 対象 PR の収集
各 PR について以下を取得:
gh pr diff <number> --name-only
変更ファイルリストを記録する。
2. 依存グラフの作成
PR 間の関係を3種類に分類:
- 包含関係: PR A の変更が PR B に全て含まれている → A をマージして B をクローズ
- ファイル衝突: 同じファイルを変更する → 先にマージした方の変更を他方がリベースで取り込む必要あり
- 独立: 変更ファイルが重ならない → 順序に依存しない
3. マージ順序の決定
優先ルール:
- 独立 PR を最初にマージ — コンフリクトリスクなし
- 包含される PR を先にマージ — 上位 PR は後で rebase
- ファイル衝突 PR はボトムアップ — 変更量の少ない PR を先に
- hot file を触る PR は特に慎重 —
src/lib/review-engine.mjs,src/lib/local-runner.mjs,src/lib/verifier.mjsなど
4. レポート出力
以下の形式(プレースホルダー)で結果を報告:
<!-- 以下は出力テンプレート例。実際の PR 番号・ファイル名・行番号に置き換えて使用 -->
## マージ順序計画
### 依存グラフ
- PR #<number> → PR #<number> (ファイル衝突: <file>, <file>)
- PR #<number> (独立)
### 推奨マージ順序
1. PR #<number>(独立、ファイル衝突なし)
2. PR #<number>(ボトムアップ: 変更量少)
3. PR #<number>(リベース必要: 上流マージ後にファイル X が変更されている)
### リベース予想コスト
- PR #<number>: `<file>:<line>` 付近で約 N 行のコンフリクト見込み
Hot File リスト
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.
- 9d ago First seen · 146 lines · 25 tokens per session scan A 04df793342ab
plan-merge-order is a command published in the GitHub repository s977043/river-review (3 stars, last pushed today), licensed MIT. It adds 25 tokens to every session and 2,206 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-31.
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.
ia-changelog
Create engaging changelogs for recent merges to main branch.
fix-pr-comments
Systematically resolve Pull Request review comments using gh CLI to fetch comments and apply requested changes.