codex-review
Run OpenAI Codex code review on current changes or review a plan/design. Use when user asks to review code, review implementation, or run codex review.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run OpenAI Codex code review on current changes or review a plan/design. Use when user asks to review code, review implementation, or run codex review.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Create conventional commit messages without co-author labels. Use when committing code changes or formatting git history.
Create pull requests with conventional titles using gh CLI. Use when creating PRs, opening pull requests, or pushing branches for review.
基于 SOC 职业分类
| name | codex-review |
| description | Run OpenAI Codex code review on current changes or review a plan/design. Use when user asks to review code, review implementation, or run codex review. |
| metadata | {"version":"1.4.0"} |
Run OpenAI Codex CLI to review code changes or implementation plans.
Determine which mode to use based on what the user wants reviewed:
codex review)Use when the user wants to review actual code changes (committed or uncommitted).
Indicators: "review my changes", "review this PR", "review the diff", or no specific context (default).
codex exec)Use when the user wants to review a plan, design, or suggested implementation that exists in conversation context — NOT as code diffs.
Indicators: "review the suggested implementation", "review this plan", "review the design", "review what was proposed", or when there are no relevant code changes on the branch.
Always pass a compact-output instruction via heredoc stdin to reduce context window usage. codex review does NOT accept a prompt as a positional argument alongside flags, but it does read from stdin via heredoc.
COMPACT_PROMPT="Be concise. For each finding output ONLY: severity (critical/warning/info), file:line, and a one-line description. Group by severity. No code snippets unless critical. No preamble or summary paragraph."
Run git status to check for uncommitted changes
Choose the appropriate review target:
Uncommitted changes (staged, unstaged, or untracked):
codex review --uncommitted <<'EOF'
$COMPACT_PROMPT
EOF
Specific commit SHA:
codex review --commit <SHA> <<'EOF'
$COMPACT_PROMPT
EOF
Base branch comparison:
codex review --base <BRANCH> <<'EOF'
$COMPACT_PROMPT
EOF
No uncommitted changes — review latest commit:
codex review --commit HEAD <<'EOF'
$COMPACT_PROMPT
EOF
Present the output and offer to help fix issues
Use codex exec in read-only sandbox mode. Pipe the plan text via stdin.
Collect the plan/design text from the conversation context
Write it to a temp file, then run:
codex exec --sandbox read-only -o /dev/stdout - <<'PLAN_EOF'
Review the following implementation plan for a codebase at $PWD.
Identify issues, missing edge cases, security concerns, and incorrect assumptions.
Be concise. List issues as bullet points with severity (critical/warning/info).
--- PLAN ---
<paste plan text here>
PLAN_EOF
Or if the plan references files that already exist, let codex read them:
codex exec --sandbox read-only "$REVIEW_PROMPT"
Where $REVIEW_PROMPT includes the plan text and instructions to read relevant files.
Present the output and offer to help address issues
If the user provides arguments (e.g. "focus on security"), prepend them to the compact prompt in the heredoc:
# Mode A
codex review --uncommitted <<'EOF'
Focus on security. $COMPACT_PROMPT
EOF
# Mode B
codex exec --sandbox read-only "focus on security. $REVIEW_PROMPT"
codex CLI must be installed and authenticated (codex login)/codex-review --verbose and you should omit the heredoc--sandbox read-only since no writes are needed