/upamune-skills:codex-review-loopfrom upamune-skills
Run a tight GitHub PR review loop with @Codex review: wait for the exact head commit, address every finding, test, push, and repeat until Codex returns no findings. Use when a PR exists and the user asks to keep fixing Codex review feedback until the PR is clean.
Ships in upamune-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Drive a pull request through a tight review -> fix -> verify -> push loop. Do not declare success from a stale review or from resolving only the newest comments: the latest PR head must receive a completed Codex review with zero new findings, and no applicable Codex thread may remain unresolved.
@codex review.Require git and authenticated gh. Resolve the repository and PR:
gh repo view --json nameWithOwner --jq .nameWithOwner
gh pr view <PR_OR_CURRENT_BRANCH> \
--json number,url,state,headRefName,headRefOid,baseRefName,isCrossRepository
git status --short
git rev-parse HEAD
Read the repository's applicable AGENTS.md files before changing code.
headRefOid agree after pushing.Fetch every unresolved Codex-authored review thread on the PR with GitHub GraphQL reviewThreads, including each thread's id, root comment database id, path, line, and body. Build the initial backlog:
blocked and stop for user direction.Process applicable backlog items with the fix, verification, commit, push, reply, and exact-thread resolution rules in steps D and E before posting the first new review trigger.
This step is complete when the repository, PR number, head branch, exact head SHA, and pre-existing worktree state are known; every previously unresolved Codex thread is addressed or explicitly blocked; and the agent can safely push fixes.
Repeat at most the configured number of iterations. Each posted @codex review comment consumes one iteration, even if the response later becomes stale or fails.
Push committed fixes first. Capture the current PR head as EXPECTED_SHA, then create the trigger comment through the API so its id and timestamp are unambiguous:
gh api "repos/$REPO/issues/$PR/comments" \
-f body='@codex review' \
--jq '{id,created_at,html_url}'
If the user supplied a focus, use @codex review for <focus> instead. Record the trigger comment id and created_at.
Do not post another trigger for the same iteration. A visible eyes reaction is acknowledgement, not completion.
Poll every 30 seconds for up to 20 minutes. During every poll, verify that the PR head is still EXPECTED_SHA. If another actor changes the head, discard the stale wait result and stop the run with both SHAs. Do not reset, rebase, merge, force-push, or silently adopt concurrent changes; the user can restart the skill from the new head.
The current GitHub author is chatgpt-codex-connector[bot]. Inspect events created by that author after the recorded trigger:
gh api "repos/$REPO/pulls/$PR/reviews" --paginate
gh api "repos/$REPO/pulls/$PR/comments" --paginate
gh api "repos/$REPO/issues/$PR/comments" --paginate
gh api "repos/$REPO/issues/comments/$TRIGGER_ID/reactions" --paginate
gh api "repos/$REPO/issues/$PR/reactions" --paginate
Accept completion only when one of these signals belongs to this trigger and EXPECTED_SHA:
commit_id is EXPECTED_SHA.+1 reaction from Codex on either the trigger comment or the PR itself, which is the no-findings signal used by some GitHub integration versions. For a PR-level reaction, require its created_at to be at or after the recorded trigger time; a pre-existing reaction does not count.Treat a Codex error, authentication message, missing acknowledgement, or timeout as a blocked iteration. Report it; do not pretend that silence means zero findings.
This step is complete only when a terminal Codex response is correlated with the trigger and the unchanged expected head.
For a submitted review, select root pull-request review comments whose pull_request_review_id matches that review id. Exclude replies and comments from earlier reviews because those were handled in the initial backlog. The review body may summarize the same inline findings; do not double-count it.
If there are no root comments and Codex gave a clean completion signal, the loop is green. Go to the final gate.
Otherwise make an iteration ledger containing every finding's comment id, priority if present, path, line, and disposition:
fix: the issue is valid and can be corrected safely.not-applicable: the claim is false or intentional; retain concrete evidence.blocked: fixing it needs product intent, unavailable access, or a prohibited/destructive action.Do not optimize for silence by weakening tests, deleting safeguards, changing repository review rules, or making speculative broad rewrites. A repeated disputed finding is not a clean review.
This step is complete when every finding from exactly one Codex review appears once in the ledger with evidence-backed disposition.
For each fix item:
For not-applicable, reply in the thread with concise evidence rather than changing correct code. Stop for user direction if any item is blocked.
Never use destructive cleanup or data-loss operations as a shortcut to make validation pass. Follow repository-specific safety instructions exactly.
This step is complete when every non-blocked finding is fixed or rebutted with evidence and all required validation passes.
Review the diff before staging. Stage only the files or hunks owned by this iteration; never use a blanket stage when pre-existing changes exist. Follow the repository's commit convention, with this fallback:
git commit -m "fix: address Codex review findings"
git push
Reply to each addressed Codex comment with the fix commit or the evidence. Resolve only the exact threads represented in the ledger, and only after the fix is pushed and verified. Never bulk-resolve unrelated or unaddressed threads.
Refresh the PR and confirm its headRefOid equals the pushed local HEAD. Return to step A with a new iteration number.
This step is complete when the verified fixes are on the PR head, addressed threads are accounted for, and local and remote SHAs match.
Report success only when all of these are true:
headRefOid.Hitting the iteration limit, timing out, receiving an integration error, or leaving a disputed or blocked finding is an incomplete result, not success.
Codex Review Loop complete.
PR: <url>
Clean head: <sha>
Iterations: <n>
Findings fixed: <n>
Findings rebutted:<n>
Remaining: 0
For an incomplete result, replace complete with stopped, give the stopping reason, and list every remaining finding with path, line, priority, and disposition.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
107 skills in this plugin
/animateBuild an animation from scratch, making the decisions in the order that determines whether it feels right — should it animate at all, what purpose, which tool, which properties, which curve and duration, how it interrupts, how it exits. Writes the implementation. Use when asked to animate something, add motion, make a component feel alive, or build a transition. For critiquing existing motion use review-animations; for auditing a whole codebase use improve-animations./animation-vocabularyReverse-lookup glossary that turns a vague description of a web animation or motion effect into its exact term ("the bouncy thing when a popover opens" → Pop in; "the iOS rubber-band scroll" → Rubber-banding). Use when the user asks "what's it called when…", or describes a motion effect without knowing its name and wants the right word to prompt an AI or designer with. For naming an effect, not designing or building one./apple-designApple's approach to interface design and fluid, physical motion, translated for the web. Use when building or reviewing gesture-driven UI, spring animations, drag/swipe/sheet interactions, momentum and interruptible transitions, translucent materials and depth, typography (optical sizing, tracking, leading), reduced-motion, or the design foundations (feedback, spatial consistency, restraint) behind Apple-style interfaces./archifyCreate validated architecture, workflow, sequence, data-flow, lifecycle/state, ERD, class, tree, timeline, and waterfall diagrams as explorable standalone HTML with dark/light themes, motion and image/SVG/WebM export. Accept requirements or Mermaid; inspect repository evidence for code-backed diagrams. Use when visualizing systems, API calls, pipelines, schemas, histories, timings, or everyday steps, parts, relationships and states. Also turn an answer into a one-page explainer, with the conclusion first, structured panels, native diagrams and charts, when the user asks for a page, an explainer or an answer to share (做成一页, 用页面讲), or proactively when the user's rules opt in with an [archify explainer: ...] line. Not for dashboards./architectSketch types, signatures, and module structure before code, then stay in the loop while implementation fills in. Use for /architect, 'architect this', 'design this', or non-trivial work where jumping to code would lock in the wrong shape./arenaSpawn N parallel candidates at the same task, pick a base, graft the strongest parts of the losers into it. Use for /arena, 'arena this', 'throw it in the arena', or when one attempt at a non-trivial artifact would lock in the wrong shape.npx claudepluginhub upamune/skills --plugin upamune-skills