Agent skill
multi-model-review-mozuq-lab-multi-model-review
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/development/multi-model-review-mozuq-lab-multi-model-review
SKILL.md
Multi-Model Code Review
LLM のコードレビュー結果を GitHub Copilot CLI に精査させ、双方の視点を統合した最終レビューを提供する。
Flow
Step 1: LLM(あなた)がコードレビュー
↓
Step 2: Copilot CLIに精査+独自レビューを依頼
↓
Step 3: Copilotの回答を受けて再検討
↓
Step 4: 必要に応じて再度Copilot呼び出し
↓
Step 5: 双方納得の結論をユーザーに回答
Step 1: 自分でコードレビュー
対象コード(git diff、ファイル、PR など)をレビューし、以下の観点で問題点を洗い出す:
- バグ・ロジックエラー
- セキュリティ脆弱性
- パフォーマンス問題
- コード品質・保守性
- ベストプラクティス違反
レビュー結果を「Critical Issues / Warnings / Suggestions」形式でまとめる。
Step 2: Copilot CLI で精査+独自レビュー
以下のコマンドで Copilot CLI を呼び出す:
copilot -p "<プロンプト>" --add-dir . --allow-all-tools --model <model> -s
プロンプトテンプレート
I performed a code review and want you to both verify my findings AND conduct your own independent review.
## Review Target
<レビュー対象を以下のいずれかで指定>
- 特定のコミット: commit <hash>
- PR: PR #<number>
- 特定ファイル: <file paths>
- ディレクトリ全体の変更: all recent changes in the provided directory
## Code Changes
<対象コードまたはgit diffの概要>
## My Review Findings
### Critical Issues
<Critical Issues>
### Warnings
<Warnings>
### Suggestions
<Suggestions>
---
Please:
**Part 1: Verify my review**
1. Reading the actual source files to confirm my findings are accurate
2. Pointing out if any of my findings are incorrect or overstated
**Part 2: Your independent review**
3. Conduct your own code review within the specified Review Target scope, looking for:
- Bugs or logic errors
- Security vulnerabilities
- Performance issues
- Code quality and maintainability concerns
- Best practice violations
4. List any issues I missed
Respond with:
- Confirmed: Issues you agree with
- Disputed: Issues you disagree with (explain why)
- Your Findings: Issues from your independent review (including ones I missed)
- Additional context: Relevant information from reading the source
利用可能なモデル
| Model | Notes |
|---|---|
gpt-5 |
デフォルト、バランス型 |
gpt-5.1, gpt-5.2 |
新バージョン |
gpt-5.1-codex-max |
コード特化、高性能 |
gemini-3-pro-preview |
Google 製 |
Step 3: Copilot の回答を受けて再検討
Copilot の精査結果を受けて:
- Confirmed - 双方合意、最終レビューに含める
- Disputed - Copilot の反論を検討し、必要なら修正
- Your Findings - Copilot が独自レビューで発見した問題を確認し、妥当なら追加
- 追加コンテキスト - ソースを読んだ Copilot の情報を考慮
Step 4: 必要に応じて再度 Copilot 呼び出し
Disputed な項目や追加確認が必要な場合:
Regarding the disputed issue about <問題点>:
You mentioned <Copilotの反論>. However, I believe <あなたの見解>.
Please re-examine <ファイル名> and clarify:
1. <確認したい点1>
2. <確認したい点2>
Step 5: 最終レビューをユーザーに回答
双方の視点を統合した最終レビューを提供:
## Multi-Model Code Review Summary
**Reviewers:** [あなたのモデル名] + GitHub Copilot [モデル名]
### Critical Issues
- [双方合意の問題]
- [Copilot が追加で発見した問題]
### Warnings
- [警告事項]
### Suggestions
- [改善提案]
### Review Discussion
- **合意点:** 双方が同意した主要な問題
- **議論点:** 見解が分かれた点とその結論
- **補完:** 片方のみが発見した問題
注意事項
copilotCLI がインストールされている必要がある--add-dir .でプロジェクトへのアクセスを許可- 複数回のやり取りが必要な場合、それぞれ別の copilot コマンドとして実行
- 大規模なコード変更の場合、レビュー対象を分割して精査することを推奨
引数長制限とシェルエスケープへの対応
シェルの引数長制限(macOS: 約 262KB、Linux: 約 2MB)を超えると Argument list too long エラーが発生する。
また、長いプロンプトをシェルで直接渡すとエスケープ問題でコマンドが正しく実行されないことがある。
対策
- コード変更の詳細は省略 -
--add-dir .により Copilot が直接ファイルを読めるため、diff 全文をプロンプトに含める必要はない - レビュー結果を要約 - 各問題を 1-2 行で簡潔に記述し、詳細は Copilot に確認させる
- 対象を分割 - 大規模な変更は複数回に分けてレビュー(例: ディレクトリ単位、機能単位)
- ファイル経由でプロンプトを渡す - 長いプロンプトはファイルに保存してコマンド置換で渡す(推奨)
ファイル経由でプロンプトを渡す方法(推奨)
長いプロンプトやマークダウン形式のプロンプトは、ファイルに保存してからコマンド置換で渡すことで、シェルのエスケープ問題を回避できる。
macOS / Linux (Bash/Zsh)
# 1. プロンプトをファイルに保存(エージェントの場合は create_file ツールを使用)
# 推奨: プロジェクト内 .multi-model-review/ ディレクトリに保存
# 2. コマンド置換でプロンプトを渡す
copilot -p "$(cat .multi-model-review/review-prompt.txt)" --add-dir . --allow-all-tools --model <model> -s
Windows (PowerShell)
# 1. プロンプトをファイルに保存(エージェントの場合は create_file ツールを使用)
# 推奨: プロジェクト内 .multi-model-review/ ディレクトリに保存
# 2. Get-Content でファイルを読み込んで渡す
copilot -p (Get-Content -Raw ".multi-model-review\review-prompt.txt") --add-dir . --allow-all-tools --model <model> -s
Windows (cmd.exe)
cmd.exe では直接のコマンド置換が難しいため、PowerShell 経由で実行するか、短いプロンプトを直接渡すことを推奨。
:: PowerShell経由で実行(プロジェクト内の .multi-model-review/ ディレクトリを使用)
powershell -Command "copilot -p (Get-Content -Raw '.multi-model-review\review-prompt.txt') --add-dir . --allow-all-tools --model <model> -s"
Copilot CLI 呼び出しのベストプラクティス(エージェント向け)
Copilot CLI は応答に時間がかかるため、エージェントから呼び出す際はバックグラウンド実行が必要。
GitHub Copilot エージェント向け
run_in_terminal/get_terminal_outputを使用する場合
-
プロンプトをファイルに保存 -
create_fileツールでプロンプトを保存- 推奨: プロジェクト内の
.multi-model-review/review-prompt.txt
- 推奨: プロジェクト内の
-
run_in_terminalでisBackground: trueを指定してバックグラウンド実行macOS / Linux (Bash/Zsh):
bashcopilot -p "$(cat .multi-model-review/review-prompt.txt)" --add-dir . --allow-all-tools --model <model> -sWindows (PowerShell):
powershellcopilot -p (Get-Content -Raw ".multi-model-review\review-prompt.txt") --add-dir . --allow-all-tools --model <model> -s -
get_terminal_outputでターミナル ID を使って結果を確認 -
3-5 秒間隔でポーリング(通常 10-15 回程度で結果取得)
-
20 回以上応答がない場合はタイムアウトと判断
注意: シェルで直接長いプロンプトを渡すと、エスケープ問題やツールによるコマンド簡略化で正しく実行されないことがある。ファイル経由が最も確実。
Claude Code 向け
Bash/TaskOutputを使用する場合
Bashツールでrun_in_background: trueを指定してバックグラウンド実行TaskOutputツールで結果を取得(block: trueで完了待ち可能)- タイムアウトは
timeoutパラメータで指定可能(最大 600000ms)
Didn't find tool you were looking for?