From claude-resources
Runs code review using OpenAI Codex CLI in parallel instances with fallback to Claude Code. Activates on 'review' commands or after implementation for quality checks.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-resources:codex-reviewThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Code review via the codex plugin companion script. Runs codex review, collects results, and synthesizes findings.
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.
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.
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, or is rate-limited:
code-reviewer subagents in parallel (like /light-review) with model: opus, reviewing the diff against $BASE. Opus is the designated Claude-side stand-in for codex: roughly comparable quality, no quota-loud failure mode./light-review was invoked insteadIf fixes were applied, commit with a descriptive message.
gtimeout/timeout command, auto-detected)code-reviewer subagents with model: opus)$LOGDIR/${DATETIME}-codex-review-*.md (timestamped to avoid overwrites)$LOGDIR/${DATETIME}-codex-review-*-stderr.log (for debugging silent failures)code-reviewer subagents at model: opus, like /light-review). 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 — the user already chose -co to mean "give me the better reviewer," so dropping to Opus matches the spirit of that choice when codex is unavailablenpx claudepluginhub takazudo/claude-resources --plugin claude-resourcesRuns official Codex code review on code changes, diffs, branches, or commits, then double-checks each finding by reading source code and classifying agree/disagree/nuance.
Reviews code diffs using GitHub Copilot CLI, with fallback to Claude Code sub-agents if Copilot is unavailable or quota-exhausted.
Performs deep code review via Codex CLI with full disk access. Use for uncommitted changes and full codebase analysis. Outputs severity-grouped findings and merge gate.