ワンクリックで
codex-review-loop
Adversarial PR code review using Codex CLI. Codex review (~20-50 min) -> structured findings -> HITL approval -> fix loop.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Adversarial PR code review using Codex CLI. Codex review (~20-50 min) -> structured findings -> HITL approval -> fix loop.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks.
Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete.
Archive multiple completed changes at once. Use when archiving several parallel changes.
Continue working on an OpenSpec change by creating the next artifact. Use when the user wants to progress their change, create the next artifact, or continue their workflow.
Enter explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements. Use when the user wants to think through something before or during a change.
Fast-forward through OpenSpec artifact creation. Use when the user wants to quickly create all artifacts needed for implementation without stepping through each one individually.
| name | codex-review-loop |
| description | Adversarial PR code review using Codex CLI. Codex review (~20-50 min) -> structured findings -> HITL approval -> fix loop. |
| metadata | {"author":"codex-lb","version":"2.0.0","argument-hint":"[--pr <N>] [--base <branch>] [--uncommitted]"} |
Adversarial code review via Codex CLI, structured finding analysis, HITL-gated fix loop, optional re-verification.
--pr <N> — review PR number N (default: auto-detect most recent open PR)--base <branch> — review changes against base branch--uncommitted — review uncommitted local changesDetermine the review target and extract the base branch.
gh pr view / gh pr list to resolve base branch
and display PR metadata (title, file count, additions/deletions).--base): Use specified base branch directly.--uncommitted): Review working tree changes.If no argument is given, auto-detect the user's most recent open PR and confirm.
Launch the adversarial review as a background process.
run_in_background=true:
bash <skill-dir>/scripts/codex-subagent.sh --base <branch>
Note: Codex CLI v0.105.0+ does not support combining --base/--commit
with a custom prompt. The built-in review logic is used automatically.
For --uncommitted mode (no diff target), pipe stdin for custom instructions:
cat <prompt-file> | bash <skill-dir>/scripts/codex-subagent.sh --uncommitted
| Exit code | Meaning | Action |
|---|---|---|
| 0 | Success | Proceed to Phase 3 |
| 1 | Codex error | Show error, offer retry or abort |
| 127 | codex not found | Guide: npm i -g @openai/codex |
| Variable | Purpose |
|---|---|
CODEX_REVIEW_MODEL | Override Codex model |
CODEX_REVIEW_REASONING | Override reasoning effort |
Parse the raw Codex output into structured findings.
references/schemas/review-findings.md — field definitions,
severity/category/effort enums, status lifecycle.agents/skills/project-conventions/conventions.md —
project coding conventions to cross-referencetypingconventionarchitecturetestingPresent all findings to the user as a summary table (ID, severity, category, file:line, title, effort).
Ask the user to choose a fix scope:
For each approved finding, execute an atomic fix-verify-commit cycle.
uvx ruff check .uvx ruff format --check . (auto-fix and re-check if needed)uv run ty checkuv run pytest (mapped test files, or full suite if no mapping found)fix(review): P{i} - {title}skipped, continue to next.After all fixes are committed, automatically re-run the Codex review to check for regressions or new issues introduced by the fixes.
--base <branch>) against the same base.wont_fix and skip in subsequent iterations.At each re-review result, the user may choose:
Output a summary including: