ワンクリックで
classify-review
PR review severity を Haiku AI で再分類。regex 偽陽性を除外する片方向ゲート。/classify-review [PR番号] で実行。regex が CRITICAL/HIGH 検出した際の偽陽性チェック専用。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
PR review severity を Haiku AI で再分類。regex 偽陽性を除外する片方向ゲート。/classify-review [PR番号] で実行。regex が CRITICAL/HIGH 検出した際の偽陽性チェック専用。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Codexにセカンドオピニオンを求める。AI同士の忖度なしガチレビュー。Use when user mentions 'Codex レビュー', 'セカンドオピニオン', 'Codex の意見', 'Codex でレビュー'. Do NOT load for: 'Codex に実装させて', 'Codex Worker', 'Codex に作らせて', '実装を依頼'.
Prevent GCP deployment failures by validating Docker builds, Cloud Run deploys, and GKE rollouts. Triggers on: docker build, docker push, gcloud run deploy, kubectl apply, Dockerfile/cloudbuild.yaml/nginx.conf edits. Catches arm64-amd64 platform mismatch, Mixed Content from http:// build args, VAD/WASM asset 404s, nginx MIME breakage. Use for all Apple Silicon to GCP deploy workflows. Do NOT use for local-only Docker builds, non-GCP deployments, or application logic changes.
Manage Context7 CLI skills: search, install, list, remove, info via ctx7. Use when the user wants to find, install, list, remove, or inspect Context7 skills. Triggers: 'search skills', 'install skill', 'list my skills', 'remove skill', 'ctx7', 'context7'. Do NOT use for general package management (npm, pip), non-Context7 CLI commands, or skill authoring.
Plan and execute multi-agent team compositions for parallel implementation tasks. Provides team patterns, wave-based execution, cross-review protocols, and TeamCreate vs parallel Agent decision matrix. Use when: planning team composition for complex multi-file features, choosing orchestration strategy for 3+ parallel tasks, setting up wave-based execution with dependencies, coordinating cross-review between agents. Do NOT use for: single-agent tasks, basic parallel execution of 2 independent tasks (rules handle that), Codex CLI delegation, or sequential single-file changes.
Investigate, fix, and regression-proof bugs across the codebase. Invoke with: /bugfix [bug description]. Performs root cause analysis with full codebase grep, applies fixes to ALL instances (not just the first match), adds regression tests, and generates a structured report. Uses web search for unknown error patterns and library-specific issues. Use when: user reports a bug, error log needs investigation, fixing a GitHub Issue labeled 'bug'. Do NOT use for: new feature implementation, refactoring without a bug, performance optimization, or UI styling changes.
Review code for quality, security, and best practices across TypeScript, JavaScript, Python, Go, Swift, and Kotlin. Analyzes PRs with automated scripts (pr_analyzer, code_quality_checker, review_report_generator), checks for OWASP vulnerabilities, validates naming/structure/error handling, and generates actionable review reports. Use when: reviewing a pull request, providing code feedback, checking code quality before merge, auditing security of changes. Do NOT use for: writing new code, fixing bugs (use /bugfix), generating tests, or architectural design (use /modern-architecture).
| name | classify-review |
| description | PR review severity を Haiku AI で再分類。regex 偽陽性を除外する片方向ゲート。/classify-review [PR番号] で実行。regex が CRITICAL/HIGH 検出した際の偽陽性チェック専用。 |
| user-invocable | true |
| argument-hint | [PR番号] |
| allowed-tools | ["Read","Bash","Grep","Agent"] |
regex ベースの severity 検出が CRITICAL/HIGH を報告した際に、Haiku AI で偽陽性かどうかを判定する。
.claude/state/pending-review-comments.json を Read する。
なければ ~/.claude/state/pending-review-comments.json を試す。
必須フィールド: pr, repo, critical, high, raw_comments, head_sha, comment_set_hash
raw_comments[] は index, comment_hash, critical, high, body_preview を確認できる形で Haiku に渡す。
critical == 0 AND high == 0 の場合 → 「偽陽性なし。分類不要。」と報告して終了raw_comments が空の場合 → 「コメントデータなし。分類不要。」と報告して終了regex が CRITICAL/HIGH を検出したコメントのみを Haiku に提示する。 以下のように Agent tool を使用:
Agent(
model="haiku",
subagent_type="general-purpose",
prompt="""
あなたはコードレビューコメントの severity 分類器です。
以下のコメントが REGEX パターンマッチで CRITICAL または HIGH として検出されました。
各コメントについて、これが「本物のコード品質/セキュリティ指摘」か「偽陽性」かを判定してください。
## 判定基準
「本物の指摘」(real):
- コードの実際のバグ、脆弱性、データ損失リスクを報告している
- 具体的なファイル名・行番号・問題の説明がある
- [CRITICAL], **HIGH**, severity: CRITICAL 等の構造化マーカー付きの指摘
「偽陽性」(false_positive):
- 否定文脈: "No CRITICAL issues", "CRITICAL=0", "0 HIGH findings"
- メタ言及: "CRITICALの検出パターンを追加", "severity検出ロジック"
- ボットテンプレート/メタデータ: CodeRabbit の HTML テンプレート
- 承認メッセージ: "LGTM", "Approved for merge"
- サマリー: "No actionable comments were generated"
不明な場合は必ず「本物の指摘」(real) として扱ってください。
## コメント一覧
{raw_comments の内容をここに展開}
## 出力形式
各コメントに対して以下の JSON を返してください:
[
{
"index": 0,
"comment_hash": "...",
"verdict": "real" | "false_positive" | "unknown",
"reasoning": "判定理由を1文で"
},
...
]
"""
)
pending-review-comments.json を Write/Edit で直接更新してはいけない。
Haiku の JSON を1つの shell argument として classify-review-state.sh に渡す:
VERDICTS_JSON='[{"index":0,"comment_hash":"...","verdict":"false_positive","reasoning":"承認メッセージであり、実指摘ではない"}]'
bash ~/.claude/scripts/classify-review-state.sh <PR番号> "$VERDICTS_JSON" <OWNER/REPO>
updater は以下を検証してから atomic + flock で state file を更新する:
classification_method を "ai" に変更head_sha が現在のGitHub PRと一致することを確認comment_set_hash が一致することを確認comment_hash が raw_comments[index] と一致することを確認ai_classification ブロックに詳細を格納:{
"ai_classification": {
"critical": 0,
"high": 0,
"classified_at": "2026-03-27T...",
"classified_by": "haiku",
"verdicts": [
{ "index": 0, "user": "terisuke", "verdict": "false_positive", "reasoning": "承認メッセージ。否定文脈で CRITICAL/HIGH を言及しているだけ" }
]
}
}
critical/high も AI 判定結果で更新(下流 consumer との互換性維持)exit code:
0: 分類保存済み。CRITICAL/HIGH は 0。1: 入力不正、stale head、hash mismatch、missing verdict 等。state file は未変更。2: 分類保存済み。ただし real/unknown の CRITICAL/HIGH が残るためブロック維持。分類結果のサマリーを出力:
## /classify-review 結果 (PR #XX)
| # | User | Regex判定 | AI判定 | 理由 |
|---|------|----------|--------|------|
| 1 | @terisuke | CRITICAL | false_positive | 承認メッセージ内の否定文脈 |
Regex: CRITICAL=1 HIGH=1 → AI: CRITICAL=0 HIGH=0
classify-review-state.sh による検証済み更新完了。state file (`pending-review-comments.json`) は更新済み。
※ この severity 集計を読んでマージをブロックする hook(旧 pr-ci-review-gate.sh / block-merge-without-review.sh)は
hook削減により `hooks/_unused/` へ退避済みで現在は発火しない。マージ可否は現状レビュー内容を見て判断すること。
"real" と判定 → その severity はカウント維持 → ブロック維持"real" 扱い → ブロック維持head_sha が変わったら AI 分類は無効(push 後は再分類必要)comment_set_hash が変わったら AI 分類は無効(同一headへのレビュー追加/編集後は再分類必要)comment_hash が一致しない判定は無効(state file 未変更)false_positive 判定でも、コメント本文自体が承認/否定文脈でない場合は severity を下げないpending-review-comments.json を直接 Write しないreasoning ログ → 事後監査可能