skill-packs/codex-review/skills/codex-pr-review/SKILL.md
Peer debate between Claude Code and Codex on PR quality and merge readiness. No code modifications.
npx skillsauth add lploc94/codex_skill codex-pr-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Peer debate on branch changes before merge -- code quality, PR description, commit hygiene, scope, merge readiness.
Before opening or merging a PR. More thorough than /codex-impl-review for pre-merge scenarios.
RUNNER="{{RUNNER_PATH}}" SKILLS_DIR="{{SKILLS_DIR}}" json_esc() { printf '%s' "$1" | node -e 'let d="";process.stdin.on("data",c=>d+=c);process.stdin.on("end",()=>process.stdout.write(JSON.stringify(d)))'; }
printf '%s' "$PROMPT" | node "$RUNNER" ... -- NEVER echo. JSON via heredoc.init output must start with CODEX_SESSION:. start/resume must return valid JSON. CODEX_NOT_FOUND->tell user install codex.status === "completed" means Codex's turn is done -- NOT that the debate is over. MUST check Loop Decision table.failed->retry once (re-poll 15s). timeout->report partial, suggest lower effort. stalled+recoverable->stop->recovery resume->poll; not recoverable->report partial. Cleanup sequencing: finalize+stop ONLY after recovery resolves.finalize + stop, even on failure/timeout.Read references/protocol.mdBase-branch: git symbolic-ref refs/remotes/origin/HEAD, fallback main/master. Validate git rev-parse --verify.
Effort: <10 files=medium, 10-50=high, >50=xhigh. Announce defaults.
Inputs: base branch, PR title/description (optional), branch diff, commit log, file stats, effort.
Pre-flight: diff must exist, commits ahead > 0.
Init: node "$RUNNER" init --skill-name codex-pr-review --working-dir "$PWD"
Render: template=round1. Placeholders: PR_TITLE, PR_DESCRIPTION, BASE_BRANCH, COMMIT_COUNT, COMMIT_LIST, USER_REQUEST, SESSION_CONTEXT.
Start: printf '%s' "$PROMPT" | node "$RUNNER" start "$SESSION_DIR" --effort "$EFFORT"
INFORMATION BARRIER: MUST NOT read Codex output.
Render: template=claude-analysis. Read diff, commits, file stats, PR description. Write FINDING-{N} per references/claude-analysis-template.md. Overall Assessment + Merge Readiness Pre-Assessment. COMPLETE before Step 4.
Poll + report activities.
Parse review.blocks[] + review.overall_assessment (code_quality, pr_description_accuracy, commit_hygiene, scope_appropriateness). Fallback: review.raw_markdown.
Compare Claude FINDING-{N} vs Codex ISSUE-{N}: Agreement, Disagreement, Claude-only, Codex-only, Same Direction Different Severity.
Claude orchestration is authoritative -- Codex VERDICT is advisory.
Render: template=round2+. Placeholders: SESSION_CONTEXT, PR_TITLE, BASE_BRANCH, COMMIT_COUNT, COMMIT_LIST, AGREED_POINTS, DISAGREED_POINTS, NEW_FINDINGS, CONTINUE_OR_CONSENSUS_OR_STALEMATE.
Resume + back to Poll.
| # | Condition | Action | |---|-----------|--------| | 1 | Full/Partial Consensus (no severity >= medium disagreements) | EXIT -> step 5 | | 2 | convergence.stalemate === true | EXIT -> step 5 (stalemate) | | 3 | Disagreements severity >= medium remain | CONTINUE -> Cross-Analysis |
Report: Review Summary (Rounds, Verdict, Findings, Agreed/Disagreed), FINDING<->ISSUE Mapping, Overall Assessment table (Code quality/PR description/Commit hygiene/Scope), Merge Readiness Scorecard (must-pass: bug, security; conditional: edge-case if high+). Merge Recommendation: any agreed critical must-pass=REJECT; >=3 agreed high must-pass=REJECT; any agreed high must-pass=REVISE; else MERGE. Stalemate: produce scorecard from agreed findings, present disagreements, defer to user.
finalize + stop. Always run. (-> references/protocol.md for error handling)
SKILL_START, POLL_WAITING, CODEX_RETURNED, THINK_PEER, THINK_AGREE, THINK_DISAGREE, SEND_REBUTTAL, LATE_ROUND, APPROVE_VICTORY, STALEMATE_DRAW, FINAL_SUMMARY
git commit, git add, git rebase, or modify code/history.development
Peer debate between Claude Code and Codex on any technical question. Both think independently, challenge each other, converge to consensus or explicit disagreement.
development
Security-focused code review using OWASP Top 10 and CWE patterns. Detects vulnerabilities through adversarial debate.
tools
Review/debate plans before implementation between Claude Code and Codex CLI. Can run in plan mode — debates the plan and edits the plan file to fix accepted issues.
development
Parallel independent review by 4 Claude agents + Codex, followed by merge, debate, and consensus report.