From copeee-skills
Use Codex to review code changes AND optionally execute fixes. Two modes — (1) review-only (默认,输出 findings 不动代码); (2) review-and-fix (autonomous, 找出 BLOCKER/MAJOR 后直接派 codex exec 修,最多 N 轮,每轮 Claude 重审). TRIGGER when 用户要 review 代码 / audit a diff / inspect uncommitted work / check branch vs base / 用 codex 修 bug / "review 完顺便修" / "review and fix" / "review 并改" / "review 后自动修"; user mentions /codex-review or invokes Codex for code work. DO NOT trigger for: 单纯写新代码 / feature implementation without prior review intent (let user pick the right entry point), broad architecture discussion without concrete diff.
How this skill is triggered — by the user, by Claude, or both
Slash command
/copeee-skills:codex-reviewThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Codex 既是 reviewer 也是 executor。两种模式:
Codex 既是 reviewer 也是 executor。两种模式:
| Mode | 触发 | Codex 做什么 | Claude 做什么 |
|---|---|---|---|
| review-only | 默认 / 用户只说"review" | 跑 codex exec review,输出 findings | 把 findings 摘要给用户 |
| review-and-fix | 用户提到"修"/"fix"/"自动改" / 被 ultra-plan 类 orchestrator 调用 | review → 输出 findings → 派 codex exec --full-auto 按 findings 修 → 重审,最多 N 轮 | 编排 + 在每轮之间 judge 是否还需要再修 |
Use this skill when the request is about:
Do not use this skill for:
Choose the narrowest review scope that matches the task.
codex exec review --uncommitted
Use when the target is the current working tree.
codex exec review --base main
Use when the target is the current branch versus a base branch.
codex exec review --commit <sha>
Use when the user wants review for one specific commit.
codex exec review --base main "Focus on correctness, regressions, edge cases, and missing tests. Findings first."
Add a custom prompt only to focus the review. Do not restate obvious instructions.
Bias the review toward:
Avoid spending review budget on style nits unless the user explicitly asks for them.
Present findings first.
Use this structure:
FindingsOpen QuestionsResidual RiskChange Summary (optional, short)Each finding should include:
If no findings are found, say that explicitly and mention any testing or context limits.
Use this when the user did not provide custom review instructions:
Review the changes for correctness, regressions, edge cases, and missing tests. Prioritize concrete findings with file references. Findings first. Do not focus on style unless it affects behavior. Do NOT modify any files — this is review-only.
触发条件之一:
流程:
# 1. 先 review 出 findings.md(review-only prompt)
codex exec review --uncommitted \
> findings.md
# 或: codex exec review --base main > findings.md
# 2. Claude 读 findings.md,判断有没有 BLOCKER / MAJOR
# 没有 → 直接交 findings;只有 MINOR → 列在汇报里但不修
# 3. 有 BLOCKER 或 MAJOR → 启 fix loop
iteration=1
MAX_ITER=${MAX_ITER:-2}
while [ "$iteration" -le "$MAX_ITER" ]; do
codex exec --full-auto -c 'sandbox_mode="danger-full-access"' "$(cat <<EOF
被 codex-review skill 第 $iteration 轮 fix 模式调用。
findings.md: <绝对路径>
按 findings.md 里 severity = BLOCKER 和 MAJOR 的条目逐条修。
约束:
- 不修 MINOR(用户没要求)
- 修复同时不要破坏其他通过的测试
- 如某条修复需要新增外部依赖(新 API key / 装新 deps)→ 停下来在 stdout 输出
'DEP_NEEDED: <什么 dep>',由 Claude 上报用户
完成后跑相关测试做自检(grep findings 里的 test 路径 + 相关 git diff)。
EOF
)" 2>&1 | tee fix_iter${iteration}.log
# Claude 重审:再次跑 review-only 看 findings 还剩什么
codex exec review --uncommitted > findings.md
# 判断是否还要继续
if grep -qE "^\\s*##\\s*(BLOCKER|MAJOR)" findings.md; then
iteration=$((iteration+1))
else
break
fi
done
每轮上限默认 MAX_ITER=2。轮数上限改:MAX_ITER=3 之类传入。
fix loop 退出后:
DEP_NEEDED → 转用户拍板("是否同意新增 ")If codex exec review is unavailable, fall back to:
codex exec -s read-only "Review the current changes for correctness, regressions, edge cases, and missing tests. Findings first with file references."
State clearly that this is a fallback path. Fallback path 不支持 review-and-fix 模式。
ultra-plan 不再调用本 skill 做 Phase 4a 的初次 review(那一步现在是 Claude 自己读 diff)。本 skill 现在是:
Skill(codex-review) 调用ultra-plan Phase 4c auto-fix 是直接派 codex exec --full-auto,不绕本 skill —— 因为它有自己的 findings.md 来源(Claude review 出来的)。
npx claudepluginhub copeeetang/copeee-skills --plugin copeee-skillsGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.