com um clique
ralphex-review
Codex reviews, Claude filters and fixes, repeat until clean
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
Codex reviews, Claude filters and fixes, repeat until clean
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Baseado na classificação ocupacional SOC
| name | ralphex-review |
| description | Codex reviews, Claude filters and fixes, repeat until clean |
| argument-hint | Optionally describe what to focus the review on |
| disable-model-invocation | true |
| allowed-tools | Bash(*) |
Execute an iterative review loop where Codex reviews your existing code, you (Claude Code) filter the suggestions and implement fixes, then Codex reviews again. Loop until there is no relevant corrections to implement in Codex's review.
head -c 4 /dev/urandom | od -An -tx1 | tr -d ' \n' via Bash. Store the output as session_id..claude/ralphex.local.md exists in the project root.base_branch: The branch to diff against (default: main)codex_model: The Codex model to use (REQUIRED - if missing, ask the user)codex_reasoning_effort: Reasoning effort for Codex reviews (default: high)command -v codex via Bash. If the command exits with a non-zero status (codex not found), inform the user: "Codex CLI is not installed. Install it from https://github.com/openai/codex and try again." and stop. Otherwise, ask the user:
main)gpt-5.4, gpt-5.4-mini, gpt-5.5)high; valid values: low, medium, high, xhigh)
Then create .claude/ralphex.local.md with their answers.\git status. If there are uncommitted changes, use AskUserQuestion to present these options:
a. Commit modified tracked files: Run git add -u to stage all modified tracked files. Ask the user for a commit message, then commit with that message.
b. Commit all changes (modified + untracked): Run git add -A to stage everything including untracked files. Ask the user for a commit message, then commit with that message.
c. Stash changes: Generate a unique stash name by running date +%s and using "ralphex-review-stash-{timestamp}". Run git stash push -m "ralphex-review-stash-{timestamp}". Store the full stash message for later cleanup.
d. Cancel: Stop the review.git rev-parse --abbrev-ref HEAD to get the current branch. Compute a review_target value:
base_branch, set review_target = base_branch.base_branch, check if origin/{base_branch} exists by running git rev-parse --verify origin/{base_branch}. If it exists, set review_target = origin/{base_branch}. If it does not exist, inform the user that there is no remote to compare against and stop.git diff --stat {review_target}...HEAD. If the diff is empty, inform the user there are no changes to review and stop.Store session_id, review_target, codex_model, and codex_reasoning_effort for use throughout the workflow. Use review_target (not base_branch) in all subsequent git and Codex commands.
Run Codex to review the branch changes:
Run this command via Bash, replacing {review_target}, {codex_model}, and {codex_reasoning_effort} with the resolved values from Step 1, unless the user prompt "$ARGUMENTS" says otherwise:
codex exec --sandbox read-only -m {codex_model} -c model_reasoning_effort="{codex_reasoning_effort}" -o /tmp/ralphex-review-{session_id}.txt "Review the committed changes of this branch against {review_target}. $ARGUMENTS" 2>/dev/null
Check the exit code. If the command exits with a non-zero status, inform the user that Codex failed (include the exit code). Perform Cleanup: Restore Stashed Changes if a stash was created in Step 1, then stop.
Read the contents of /tmp/ralphex-review-{session_id}.txt.
Do NOT blindly accept all suggestions. Codex can be wrong, pedantic, or suggest changes outside the task scope. For each suggestion in the review, independently evaluate and classify it:
Display your verdicts to the user in this format:
**Iteration {N} - Codex Review Evaluation:**
- ✅ Accept: {summary of accepted suggestion}
- ❌ Reject: {summary and reason for rejection}
- ⏭️ Defer: {summary and reason for deferral}
Then decide:
Implement the accepted corrections:
Create a clean git state for Codex to review again:
git add (be specific about which files. Do NOT use git add . or git add -A).git status.After committing, go back to Step 2: Codex Code Review for the next iteration.
If a stash was created in Step 1, restore it before stopping:
git stash list and find the entry whose message contains the stash name stored in Step 1 (e.g., "ralphex-review-stash-{timestamp}").stash@{N} reference from the matching line.git stash pop stash@{N}.git stash pop manually.