skills/codex-review/SKILL.md
Code review using OpenAI Codex CLI (codex exec review). PREFERRED over /light-review for code review. Use when: (1) User says 'review', 'code review', or 'codex review', (2) After implementation when quality check is needed, (3) Child agents self-reviewing. Runs multiple codex review instances in parallel. Falls back to Claude Code if codex unresponsive.
npx skillsauth add takazudo/claude-resources codex-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.
Code review via the codex plugin companion script. Runs codex review, collects results, and synthesizes findings.
The codex plugin provides a companion script for running reviews. Resolve it dynamically:
CODEX_PLUGIN_ROOT=$(command ls -d "$HOME/.claude/plugins/cache/openai-codex/codex"/*/ 2>/dev/null | sort -V | tail -1)
CODEX_COMPANION="${CODEX_PLUGIN_ROOT}scripts/codex-companion.mjs"
If the directory or file does not exist, report "Codex plugin not installed. Run /codex:setup first." and fall back to Claude Code review.
Usage:
node "$CODEX_COMPANION" review --base <branch> --wait
Key flags:
--base <branch>: Review changes against this base branch--wait: Run in foreground (block until complete)--scope auto|working-tree|branch: Scope selection (default: auto)Before doing anything, check if Codex is currently rate-limited:
RATE_CHECK=$(node $HOME/.claude/scripts/codex-rate-limit.js check 2>&1)
RATE_EXIT=$?
If RATE_EXIT is non-zero (rate-limited), skip all codex steps and jump directly to the Fallback step. Do NOT report the rate limit to the user — silently fall back.
BRANCH=$(git branch --show-current)
BASE=$(gh pr view --json baseRefName -q '.baseRefName' 2>/dev/null)
If no PR, use default branch:
BASE=$(git remote show origin | grep 'HEAD branch' | awk '{print $NF}')
LOGDIR=$(node $HOME/.claude/scripts/get-logdir.js)
mkdir -p "$LOGDIR"
DATETIME=$(date +%Y%m%d_%H%M%S)
# Resolve codex companion script (pick latest version if multiple exist)
CODEX_PLUGIN_ROOT=$(command ls -d "$HOME/.claude/plugins/cache/openai-codex/codex"/*/ 2>/dev/null | sort -V | tail -1)
CODEX_COMPANION="${CODEX_PLUGIN_ROOT}scripts/codex-companion.mjs"
# Detect timeout command (gtimeout on macOS via coreutils, timeout on Linux/WSL)
if command -v gtimeout &>/dev/null; then
TIMEOUT_CMD="gtimeout"
elif command -v timeout &>/dev/null; then
TIMEOUT_CMD="timeout"
else
TIMEOUT_CMD=""
echo "WARNING: neither gtimeout nor timeout found. Running without timeout."
fi
Use $DATETIME in all output filenames below to avoid overwriting previous runs.
First, determine which context you're running in — this changes how Step 3 executes:
/x-wt-teams or similar). Background-task completion notifications are delivered here, so backgrounding is safe.If you are unsure which context you're in, treat it as a subagent context — the foreground path is always safe to use, it just trades a 25-minute budget for a 10-minute one (absorbed by the fallback).
Run the companion script's review command with --base and --wait:
${TIMEOUT_CMD:+$TIMEOUT_CMD} ${TIMEOUT_CMD:+1500} node "$CODEX_COMPANION" review --base "$BASE" --wait \
> "$LOGDIR/${DATETIME}-codex-review.md" \
2>"$LOGDIR/${DATETIME}-codex-review-stderr.log"
Launch as a background Bash task with a 25-minute timeout.
The Bash tool's foreground timeout caps at 10 minutes (600000 ms) — below codex's normal 25-minute budget — but a subagent must not background this call under any circumstance (see the context-split intro above). Run it as a single foreground Bash call instead, with the tool timeout set to its maximum (600000 ms):
if [ -z "$TIMEOUT_CMD" ]; then
# Neither timeout nor gtimeout is available — do not run codex uncontrolled in a
# child context (the Bash tool would kill the call and the agent couldn't recover
# cleanly). Skip straight to the Fallback step.
echo "SKIP_CODEX_NO_TIMEOUT_BINARY"
CODEX_EXIT=1
else
"$TIMEOUT_CMD" -k 15 570 node "$CODEX_COMPANION" review --base "$BASE" --wait \
> "$LOGDIR/${DATETIME}-codex-review.md" \
2>"$LOGDIR/${DATETIME}-codex-review-stderr.log"
CODEX_EXIT=$?
fi
run_in_background for this call. It must be a single blocking foreground invocation with the Bash tool timeout parameter set to 600000 ms.-k 15 570: run for up to 570s, send TERM, then SIGKILL 15s later if the process ignores TERM. This grace period stops a TERM-ignoring codex process from consuming the entire 600000 ms tool budget and getting hard-killed by the harness mid-write.CODEX_EXIT (the command's exit status). ANY nonzero exit — including timeout's 124 — triggers the Fallback step (Step 5), even if the output file has partial content.timeout nor gtimeout is available ($TIMEOUT_CMD is empty), skip codex entirely and go straight to Fallback — do not attempt to run codex without a timeout wrapper in a child context.After codex completes (or times out):
Check for rate limiting in the output files:
node $HOME/.claude/scripts/codex-rate-limit.js check-output \
"$LOGDIR/${DATETIME}-codex-review.md" \
"$LOGDIR/${DATETIME}-codex-review-stderr.log"
If exit code is non-zero (rate limit detected), jump to Fallback.
Check the output file ($LOGDIR/${DATETIME}-codex-review.md) exists and has content
If missing or empty, read the stderr log ($LOGDIR/${DATETIME}-codex-review-stderr.log) to diagnose why
Report any stderr contents to the user (auth errors, API failures, etc.)
If codex timed out, produced no output, is rate-limited, or (subagent/child-agent context) exited with any nonzero status — including the no-timeout-binary skip case:
code-reviewer subagents in parallel (like /light-review) with model: opus, reviewing the diff against $BASE.code-reviewer subagent with model: opus, reviewing the diff against $BASE. With up to 6 children live at once under /x-wt-teams, a 2-per-child fallback would blow the manager's 6-concurrent CPU budget — 1 keeps the fallback affordable at scale. Because a nested Agent call from a subagent blocks and returns synchronously, there is no notification dependency here — this stays structurally park-proof regardless of context./light-review was invoked instead (adjusted for reviewer count per context, as above)If fixes were applied, commit with a descriptive message.
gtimeout/timeout command, auto-detected), run as a background Bash task.$TIMEOUT_CMD -k 15 570, capped by the Bash tool's 600000 ms foreground maximum. Never background this in a child context (see Step 3's context-split intro for why).code-reviewer subagents (model: opus) in the interactive/manager context, 1 in a subagent/child-agent context.$LOGDIR/${DATETIME}-codex-review-*.md (timestamped to avoid overwrites)$LOGDIR/${DATETIME}-codex-review-*-stderr.log (for debugging silent failures)run_in_background / background Bash tasks are only safe in the interactive/main-session (manager) context; in a subagent or child-agent context, Step 3 MUST run as a single foreground call — see "Subagent / child-agent context (MANDATORY)" above.code-reviewer subagents at model: opus in the interactive/manager context (like /light-review), or 1 in a subagent/child-agent context. NEVER pause the workflow, NEVER report the rate limit to the user, NEVER ask what to do. Just continue with the fallback as if nothing happened. Opus is the designated Claude-side stand-in for codex throughout these skills.tools
Acceptance gate for a branch produced by an OpenAI Codex CLI run — usually Codex implementing a /big-plan epic that was handed off to it. Codex reports the work 'done' (or the user flags it WIP with corrections); this skill confirms the branch actually fulfils the original spec, fixes what falls short, and routes larger discoveries into GitHub issues. Use when: (1) User says '/finalize-codex-work', 'finalize codex work', 'confirm the codex work', 'check the codex branch', or 'codex said it's done', (2) A branch is the result of a Codex CLI session and needs verification against its spec issue/PR, (3) After assigning a /big-plan epic to Codex CLI. Pass -m/--merge to run /pr-complete -c at the end.
tools
Read a Figma design node directly from a share URL via the Figma REST API — no Dev Mode subscription, no MCP, no desktop app. Renders the node to PNG and dumps its full style/layout JSON so the design can be described, compared, or implemented. Use whenever the user gives a Figma design URL (figma.com/design/... or /file/...) and wants to see, read, inspect, reference, or implement that node — including `/fig-url-refer <url>`. This is the URL-based counterpart to `/figrefer` (which needs a Dev-plan desktop MCP); prefer this one when the input is a URL rather than a live desktop selection.
tools
Sync the user's Claude Code workflow skills into the OpenAI Codex CLI settings repo ($HOME/.codex) as Codex-native ports, fix the Codex .gitignore for new local state, then commit and push. Use when: (1) user says '/dev-codex-sync-settings-from-claude', 'sync codex settings', 'sync claude skills to codex', 'port skills to codex', or 'update codex from claude'; (2) after updating ~/.claude workflow skills (big-plan, x, x-as-pr, x-wt-teams) and Codex should catch up; (3) the $HOME/.codex repo has drifted behind $HOME/.claude. The ports are condensed Codex-native REWRITES, never file copies.
development
Analyze a video file (mov, mp4, webm, etc.) or a YouTube video by extracting still frames with ffmpeg and reading them chronologically with vision — Claude cannot ingest video files directly. Use whenever the user provides a video file path or YouTube URL and wants to know what happens in it: "read this video", "watch this video", "check this recording", "what happens in this .mov/.mp4", analyzing a screen recording of a UI bug, or verifying UI behavior captured in a video, even if they don't name this skill.