Skip to content
Agentmart
Submit a tool

review-router

差分を分析して規模・観点に応じたレビューを自動振り分けし、Must-Fix・Important を未コミットのまま自動修正して再レビューする (user)

Skill by rysk-tanaka

IndexedMIT
Write a review

Chalk Labs

Need help deploying review-router?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code. Read the repository before you give any tool access to your data.

npx agentmarket install skill/rysk-tanaka-review-router

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

差分を分析して規模・観点に応じたレビューを自動振り分けし、Must-Fix・Important を未コミットのまま自動修正して再レビューする (user)

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Node.js package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/review-router

Tools it pre-approves 14

From allowed-tools in SKILL.md: the agent may use these without asking you each time.

  • Bash(bash
  • *)
  • Bash(git
  • status
  • diff
  • merge-base
  • add
  • -N
  • BashOutput
  • Read
  • Task
  • Workflow
Show 2 more
  • Edit
  • Write

What's inside

Skill name
review-router
Description
差分を分析して規模・観点に応じたレビューを自動振り分けし、Must-Fix・Important を未コミットのまま自動修正して再レビューする (user)
License
MIT
Allowed tools
Bash(bash, *), Bash(git, status, *), Bash(git, diff, *), Bash(git, merge-base, *), Bash(git, add, -N, *), BashOutput, Read, Task, Workflow, Edit, Write
Instructions
264 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts
  • Pre-approves some shell commands

Files (5)

  • SKILL.md
  • agy-review.sh
  • analyze.sh
  • record-state.sh
  • review.workflow.js

SKILL.md (first lines)

# レビュー・ルーター

ベースブランチとの差分を分析し、規模・触れた観点・リスクから tier を判定して、適切なレビューだけを自動起動する。「ローカルか PR か」は人が決め、深さと観点の選択はこのスキルに任せるのが狙い。

## 入力

`$ARGUMENTS` にベースブランチとオプションが渡される(どちらも省略可、ベースブランチのデフォルトは main)。

- `--agy` - agy CLI(Gemini)による独立レビューを追加で実行する
- `--lms` - ローカル LLM による独立レビューを追加で実行する
- `--full` - ブランチのレビュー履歴を無視し、ルーティングしたサブエージェントをすべて起動する

agy CLI とローカル LLM は誤検出が多いため、指定したときだけ動かす。

例

- `/review-router` → main との差分
- `/review-router develop` → develop との差分
- `/review-router main --agy --lms` → main との差分に agy CLI とローカル LLM のレビューを加える
- `/review-router main --full` → 前回の結果に関係なく、全サブエージェントでレビューし直す

## 1. 差分の分析

`bash ${CLAUDE_SKILL_DIR}/analyze.sh "$ARGUMENTS"` を実行し、出力 JSON を取得する。ワード分割・glob を防ぐため、`$ARGUMENTS` は必ずダブルクォートで囲む。

- ベースブランチが見つからない、未知のオプションが渡された等で非ゼロ終了した場合は、エラー内容を報告して終了する
- 差分が空(files_changed が 0)の場合は、レビュー対象が無い旨を報告して終了する

JSON の構造。

```json
{
  "base": "main",
  "files_changed": 12,
  "insertions": 340,
  "deletions": 50,
  "languages": ["py", "ts"],
  "dimensions": {
    "tests": true,
    "types": false,
    "error_handling": true,
    "comments_docs": true,
    "migrations": false,
    "security": false,
    "concurrency": false
  },
  "tier": "medium",
  "reviewers": ["code-reviewer", "silent-failure-hunter", "comment-analyzer"],
  "history": {
    "reason": "history",
    "omitted": ["pr-test-analyzer"],
    "revived": ["comment-analyzer"],
    "previous_runs": 2,
    "state_file": "/path/to/repo/.git/review-router/feat%2Fx.json"
  },
  "options": {
    "agy": false,
    "lms": false,
    "full": false
  }
}
```

## 2. ルーティングの決定

起動する pr-review-toolkit サブエージェントは、JSON の `reviewers` をそのまま使う。analyze.sh が `tier` と `dimensions` から下表でルーティングし、さらにブランチのレビュー履歴で絞り込んだ結果。

| tier | 自動実行 | 提案のみ |
| --- | --- | --- |
| low | code-reviewer のみ | なし |
| medium | code-reviewer + true の観点に対応するサブエージェント(並行) | なし |
| high | code-reviewer + true の観点に対応するサブエージェント全部(並行) | codex / `/code-review ultra` / `--agy` `--lms`(未指定時) |

agy CLI とローカル LLM は tier に関係なく、`options.agy` / `options.lms` が true のときだけ並行起動する。

観点 → pr-review-toolkit サブエージェント対応。

- 常時: `pr-review-toolkit:code-reviewer`
- `tests`: `pr-review-toolkit:pr-test-analyzer`
- `types`: `pr-review-toolkit:type-design-analyzer`
- `error_handling`: `pr-review-toolkit:silent-failure-hunter`
- `comments_docs`: `pr-review-toolkit:comment-analyzer`

`migrations` / `security` / `concurrency` には専用サブエージェントが無い。これらは tier 判定(true なら high)に効くが、専門レビューは常時起動の `code-reviewer` が一般観点としてカバーする。専用エージェントが必要になったら、analyze.sh のルーティング、観点との対応(`reviewer_dim` と `dim_changed_since`)、この表に追加する。対応が抜けると、履歴で外したあと担当の観点が変わっても復帰しない。

### レビュー履歴による絞り込み

全サブエージェントを起動するのはブランチごとの初回だけにし、2 回目以降は前回の実行で役に立ったものに絞る。空振りするレビュアーの起動を減らすため。`history.reason` が判断の理由を表す。

- `first_run` / `base_changed` / `detached_head` / `full` / `history_unavailable` - ルーティングした全サブエージェントを起動する。それぞれ、履歴が無い、前回と base が違う、detached HEAD で履歴を持てない、`--full` 指定、履歴を読めない
- `history` - 前回までの結果で絞り込んだ。起動するのは次のいずれかに当たるもの。外したものは `history.omitted` に入る
  - `code-reviewer`(一般観点の土台として常時)
  - 最後に起動した実行で採用数が 1 件以上だったもの(Suggestion を含む)
  - このブランチで一度も結果を返していないもの(新たに true になった観点など)
  - 外していたが、最後に起動したとき以降のコミットで担当の観点(テスト・型・エラー処理・コメント)に変更が入ったもの、または rebase 等で最後に起動したときのコミットが履歴から外れたもの。`history.revived` に入る

履歴は git 管理外の `history.state_file`(リポジトリの git ディレクトリ内、worktree 間で共有)に、実行ごとに 1 回目のレビューの集約後に記録する(4 章)。

判定結果(tier・起動するサブエージェント、履歴で外したもの(`history.omitted`)と復帰させたもの(`history.revived`)、agy CLI・ローカル LLM を使うか)を実行前にユーザーへ一行で示す。

## 3. レビューの実行

### pr-review-toolkit サブエージェント

同梱の Workflow スクリプトで、選んだサブエージェントの並行レビューと、指摘ごとの検証までを一度に回す。並べ方と検証の手順をスクリプトに固定し、モデルの判断で検証を省いたり、裏取りの無い指摘を通したりしないようにするため。

`${CLAUDE_SKILL_DIR}/review.workflow.js` を Read で読み、その内容を `Workflow` ツールの `script` に渡す。`scriptPath` は作業ディレクトリ内のファイルか Workflow ツール自身が返したパスしか受け付けず、skill のディレクトリを直接指定すると拒否されるため。Workflow の結果には実行したスクリプトの保存先が含まれるので、6 章の再レビューではそのパスを `scriptPath` に渡し、スクリプトの再送を省く。

`args` には次のオブジェクトを JSON の値のまま渡す(文字列化しない)。

```json
{
  "base": "main",
  "diff_cmd": "git diff main...HEAD",
  "tier": "high",
  "reviewers": ["code-reviewer", "silent-failure-hunter"],
  "context": "<変更概要>",
  "previous": []
}

From rysk-tanaka/skills, MIT.

More from rysk-tanaka/skills

Signals

Stars
0
Forks
0
Open issues
1
Last commit (this folder)
Oct 14, 2026 (17 days ago)
Last release
Oct 14, 2026 (17 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from rysk-tanaka

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get review-router running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying review-router?

CallGet help
Cite this page

review-router skill. Agent Mart. https://agentmart.dev/skills/rysk-tanaka-review-router (last updated 2026-10-24)