ワンクリックで
code-review-codex
Code review using OpenAI Codex CLI with project context (rules, diff, conventions)
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Code review using OpenAI Codex CLI with project context (rules, diff, conventions)
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Create a Claude Code rule, skill, or agent — global (~/.claude) or project-local (.claude)
Multi-perspective code review from base branch with 3 independent reviewer agents
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
| name | code-review-codex |
| 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:*), Bash(codex exec:*), Bash(wc:*), Read, Glob, Grep |
| argument-hint | [base] |
| description | Code review using OpenAI Codex CLI with project context (rules, diff, conventions) |
base (optional): Base branch/ref. Auto-detected if omitted.base.codex exec with a review prompt — codex reads the codebase and diff itself.CRITICAL: Follow these exact command patterns. Do NOT deviate or experiment.
codex exec --sandbox read-only "PROMPT" 2>&1
codex exec runs non-interactively and prints results to stdout--sandbox read-only ensures no writes to the repositoryIf 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}Build the prompt and run codex exec:
Committed changes:
codex exec --sandbox read-only "Review the code changes between {base} and HEAD. Focus on: design mistakes, architectural misfit, best practices violations, security holes, logic bugs. Ignore style/naming/formatting nits. Output findings in Japanese." 2>&1
Uncommitted changes:
codex exec --sandbox read-only "Review the uncommitted changes (staged and unstaged). Focus on: design mistakes, architectural misfit, best practices violations, security holes, logic bugs. Ignore style/naming/formatting nits. Output findings in Japanese." 2>&1
Do NOT: retry with different invocations on failure. If the command fails, report the error as-is.
Display results:
## コードレビュー結果 (Codex)
{header} | **変更ファイル数**: N
{codex exec output}
Where {header} is:
**ベース**: \{base}``**モード**: 未コミット変更If codex found no issues, report that clearly.
Execute from Step 1.