ワンクリックで
code-review
Multi-perspective code review from base branch with 3 independent reviewer agents
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Multi-perspective code review from base branch with 3 independent reviewer agents
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | code-review |
| allowed-tools | Bash(git diff:*), Bash(git log:*), Bash(git status:*), Bash(git branch:*), Bash(git merge-base:*), Bash(git rev-parse:*), Bash(gh pr:*), Read, Glob, Grep, Agent |
| argument-hint | [base] [context] |
| description | Multi-perspective code review from base branch with 3 independent reviewer agents |
base (optional): Base branch/ref. Auto-detected if omitted.context (optional): Additional context (e.g., "Security fix for auth").base, else → context. Two+: first=base, rest=context.If base given → use that as {base}.
If no base → auto-detect:
git status --short — any uncommitted changes?{mode} to uncommittedgh pr view --json baseRefName -q .baseRefName 2>/dev/null → fallback to default branch (main/master). Set {base} to detected branch and {mode} to committed.If {mode} is committed, verify diff is non-empty:
git diff --stat "$(git merge-base {base} HEAD)"
If empty → STOP with "レビュー対象の変更がありません".
Run in parallel:
git diff --name-only "$(git merge-base {base} HEAD)" (or git diff --name-only + git diff --cached --name-only for uncommitted) → count changed filesgit log --oneline "$(git merge-base {base} HEAD)..HEAD" (committed mode only) → {log}Spawn via Agent tool (subagent_type: "general-purpose", model: "sonnet"), all in one message. Each agent reads the codebase and diff itself — do NOT pass diff content in the prompt.
Shared instructions (include in each agent prompt):
You are reviewing code in this repository. {review_target}
MANDATORY: Use Read tool to read FULL content of every changed file + 2-3 related files (imports, callers, siblings) before making any findings.
IGNORE: style/naming/formatting, "consider adding" suggestions, missing docs, theoretical concerns without concrete impact, generic "error handling could be better".
Also read CLAUDE.md and .claude/rules/ for project rules — check for violations.
Context: {context}
Per issue: file:line, Severity (★★★/★★☆/★☆☆), what is wrong and WHY, concrete fix.
Where {review_target} is:
Review changes between {base} and HEAD. Run: git diff $(git merge-base {base} HEAD) to see the diff, git diff --name-only $(git merge-base {base} HEAD) for changed files.Review uncommitted changes. Run: git diff and git diff --cached to see the diff.{shared instructions}
Role: Senior architect. Find design, architectural, and best-practices problems.
Methodology: Read changed files → read related files → identify codebase patterns → compare against patterns AND language/framework best practices.
Find: Architectural misfit (layer violations, wrong module), design defects (wrong data structure, over-engineering, leaky abstraction), best practices violations (anti-patterns with concrete negative consequence), API inconsistency with existing codebase, coupling problems, missing design considerations.
{shared instructions}
Role: Security engineer. Find real vulnerabilities, logic bugs, security best-practices violations. NOT theoretical risks.
Methodology: Read changed files → trace data flow (input → validation → output) → check auth/middleware for bypass → check error handling for leaks.
Find: Exploitable vulnerabilities (with concrete attack path), logic bugs (wrong conditions, race conditions, null handling), data integrity (missing atomicity, missing validation at trust boundaries), secrets exposure, unsafe operations, security best-practices violations (with concrete risk).
{shared instructions}
Role: Codebase consistency specialist. Find violations of ESTABLISHED patterns.
Methodology: Read changed files → read 3-5 EXISTING files in same dirs to establish patterns (error handling, module structure, testing) → compare → check project rules.
Find: Pattern violations (cite file:line of established pattern), convention breaks, missing tests (vs existing coverage), rule violations, interface inconsistency.
IMPORTANT: Every finding MUST reference file:line of established pattern. No reference = not established = don't report.
## コードレビュー結果
{header} | **変更ファイル数**: N
### 判断サマリー
判断が必要だったポイントのみ: エージェント間不一致、重要度調整、棄却とその理由。全員一致の指摘は含めない。
---
### 1. タイトル (`path:line`) (★★★)
> 問題の端的な説明。
対応方法。
Where {header} is:
**ベース**: \{base}``**モード**: 未コミット変更Execute from Step 1.
Create a Claude Code rule, skill, or agent — global (~/.claude) or project-local (.claude)
Code review using OpenAI Codex CLI with project context (rules, diff, conventions)
Analyze working tree changes, map to existing commits, and create fixup commits for autosquash
Analyze working tree changes, plan logically minimal NEW atomic commits per hunk (no fixup), and execute them
Review every commit message since base branch and add reword fixups where the message needs improvement (non-interactive)
Analyze working tree changes and commit them — fixup into existing commits where appropriate, otherwise new atomic commits