ワンクリックで
codex-review
Pre-PR code review on the current branch using the OpenAI Codex CLI, with an iterative fix loop.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Pre-PR code review on the current branch using the OpenAI Codex CLI, with an iterative fix loop.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Single source of truth for universal code-quality items. Definitions live in items/<slug>.md; audit and preflight skills reference items by slug.
Full review pipeline from local changes through PR, CodeRabbit review, postmortem elevation, and umbrella drift join. Pauses at the user-controlled merge gate between Phase 4a and 4b.
Full review pipeline from local changes through PR, Copilot review, postmortem elevation, and umbrella drift join. Pauses at the user-controlled merge gate between Phase 4a and 4b.
Preflight sweep of quality-list items before or during implementation, framed as 'what to set up so done-check passes at the end'. Dual of done-check.
Create a GitHub PR and poll until the auto-triggered CodeRabbit review arrives.
Investigate a GitHub issue or free-text task with empirical (subagent probes) and derivational (in-context deduction) hypotheses, producing a vetted implementation plan with Inconclusive / Deferred items. Accepts an issue number or task text.
| name | codex-review |
| description | Pre-PR code review on the current branch using the OpenAI Codex CLI, with an iterative fix loop. |
Orchestrate codex exec review to review branch changes and iterate on fixes.
codex exec review --base <branch> -o <output-file> </dev/null
This runs git diff <base-SHA> internally and reviews the entire diff. The review covers all committed changes on the current branch relative to the base — both the original work and any subsequent fix commits.
| Command | Scope |
|---|---|
codex exec review --base main </dev/null | All commits since branching from main |
codex exec review --uncommitted </dev/null | Staged + unstaged + untracked changes |
codex exec review --commit <SHA> </dev/null | A single commit's diff |
codex exec "<inline prompt>" </dev/null | Free-form prompt with inline context (see "Switching to exec with inline context" below) |
| Flag | Effect |
|---|---|
-o <file> | Write final review message to file |
--json | Emit JSONL event stream to stdout |
"custom prompt" | Positional arg — additional review instructions |
exec with inline contextcodex exec review --base ... operates on git diff alone — it cannot read GitHub Issues, ADRs, or any design intent encoded outside the diff. For self-contained changes this is fine; for phased rollouts where the judgement criteria live outside the diff, review mode systematically misjudges intentional design decisions as regressions. Switch to free-form codex exec "<inline prompt>" to attach the context.
Trigger — before every codex review, check:
If any of the above is yes, skip codex exec review and use codex exec "<inline prompt>" instead.
Why the workaround is needed: --base and the positional [PROMPT] are mutually exclusive on codex exec review, so phase context cannot be attached to a review invocation. The free-form codex exec "..." accepts an arbitrary prompt that can direct codex to read the surrounding context first.
Inline prompt template — the prompt should tell codex to:
git log <base>..HEAD --oneline and git show <sha> to read the commits.gh issue view <n>) and the relevant ADRs (pass absolute paths so codex doesn't have to search).For non-phased self-contained changes, keep using vanilla codex exec review --base main. The inline-context workaround is only needed when judgement criteria live outside the diff.
codex review operates on git diff output alone — it has no access to the broader project context, test results, runtime behavior, or design rationale. This means a significant fraction of its findings will be false positives: technically plausible concerns that don't apply given information the reviewer can't see.
Typical false positive patterns:
When presenting review output, triage each finding:
[P1/P2] summary — file:line)finding-triage SSOT dispositions (actionable / false-positive / uncertain-validity / opens-a-question → research / invariant-premise-check / defer). The common codex-review cases are actionable, false-positive (plausible but wrong given context you have — explain why to the user), and uncertain-validity (you can't tell without more investigation — flag it and investigate). When a finding is real but its fix is non-local, it is opens-a-question → re-enter research rather than patching in place.Each iteration runs a full, unbiased review of the entire diff against base. Do NOT inject previous review comments into the prompt — this narrows the reviewer's focus and risks missing new regressions introduced by the fix. The reviewer should always see the code with fresh eyes.
Run review
codex exec review --base main -o /tmp/codex-review.md </dev/null
Triage the output using the process above. Present classified findings to the user.
If actionable issues are found, the user (or Claude) fixes them and commits.
Re-run the review — same command, same flags. The new diff includes the fix commits, so the reviewer sees the full picture: original changes plus fixes.
Re-triage — a finding dismissed as false positive in iteration N may become relevant in iteration N+1 if the fix changed the surrounding code. Don't carry over dismissals blindly.
Repeat until no actionable findings remain or the user is satisfied.
No actionable findings after triage. A review with only false positives or minor style suggestions counts as clean — use judgment.
codex exec invocation needs </dev/null; hang signal is absence of the OpenAI Codex v... banner after Reading additional input from stdin....codex exec review, not codex review, when running from scripts or automation. The exec variant runs non-interactively and exits when done.