Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Fix Elixir/Phoenix code until Codex CLI review comes back clean — bounded review, fix, verify loop before opening a PR. Use when codex is installed and you want an external cross-model critic on your changes before pushing.
.claude/skills/oliver-kriska-phx-codex-loop/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-07 | ✗→✓ | ▲ Improved | 62% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -7% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 31% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 96% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 48% | 0% |
Critic→Refiner loop with the Codex CLI as external critic: review → fix approved findings → verify → re-review, until codex is clean or rounds run out. Codex reviews; Claude fixes. Complements /skill:phx-review (Claude panel) — run either or both before a PR.
/skill:phx-codex-loop # diff vs default branch, interactive
/skill:phx-codex-loop --uncommitted # staged + unstaged + untracked
/skill:phx-codex-loop --base develop # explicit base branch
/skill:phx-codex-loop --auto # auto-approve P0/P1/P2, skip P3
/skill:phx-codex-loop --max-rounds 2 # default 3costs codex quota; report remaining findings instead of looping on
mix compile --warnings-as-errors + testsmust pass before burning a codex round on broken code
violate an Iron Law, with explanation in the round report
fixed, declined (with reason), or deferred-by-user
/skill:phx-review as the codex-free alternative; never crash
Run command -v codex. If missing: STOP. Show the install hint (brew install codex or npm i -g @openai/codex, then codex login; codex doctor to diagnose) and suggest /skill:phx-review.
Then two cheap checks that save review rounds:
git status --short, only when using --base): codexinspects working-tree state too and WILL flag local dirt (stray edits, dirty submodules) as findings. Surface the dirt and ask: clean/stash first, or proceed knowing round 1 may spend findings on it.
AGENTS.md has no ## Review guidelinessection, note once that /skill:phx-init installs the Elixir rubric that steers codex priorities — then proceed (it works without, on defaults).
--base/--uncommitted) → use as given--base {default}--uncommitted--max-rounds, default 3)timeout: 600000(large diffs run 10+ min). On timeout with the process alive: ONE until [ -f {out} ]; do sleep 5; done wait — never poll-spam or pkill a running review (quota is spent either way). ALWAYS silence the streams — only the -o file matters (10k+ lines otherwise):
bash codex exec review --base {branch} --ephemeral \ -o /tmp/codex-round-{n}.md > /tmp/codex-round-{n}.log 2>&1
NEVER pass custom instructions with a diff-mode flag — the CLI rejects the combination; the rubric comes from AGENTS.md ## Review guidelines (/skill:phx-init). Parse the output file, NOT the exit code (0 even with findings). Recipes: references/codex-cli.md.
- [P{n}] bullets meansCLEAN → go to Step 4.
(# | P | file:line | title | proposed action) as visible response text BEFORE any AskUserQuestion call — a table composed only in thinking never renders. Then ask approve-or-skip per finding (AskUserQuestion). With --auto: approve P0/P1/P2, skip P3 (list skipped in the round report).
against Iron Laws first (Law 4).
bash mix format {changed_files} && \ mix compile --warnings-as-errors && mix test {affected_tests}
If verification fails 3 times, STOP with a BLOCKER report — do not burn another codex round on broken code.
markdown## Codex Loop Report — {CLEAN | MAX ROUNDS REACHED | BLOCKED} Rounds: {n}/{max} | Fixed: {n} | Declined (Iron Law): {n} | Deferred: {n} {per-round: findings → outcome} {remaining findings if not CLEAN}
On CLEAN: suggest /skill:phx-compound for non-obvious fixes, then commit/PR. On MAX ROUNDS: list remaining findings; offer /skill:phx-plan to convert them into a follow-up plan.
textimplement → /skill:phx-codex-loop (YOU ARE HERE) → clean → commit/PR → /skill:phx-watch-pr --codex ↑ or arrive from /skill:phx-review --codex verdict REQUIRES CHANGES
references/codex-cli.md — invocation recipes, parsepatterns, verified gotchas (CLI 0.142.5)
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 4,217 | 4,761 | +13% | 1 | 1 | 0% | 188 | 1,655 | +780% | 0 | 0 | — |
case-07 | fail→pass | 6,951 | 3,018 | -57% | 1 | 1 | 0% | 1,169 | 1,899 | +62% | 0 | 0 | — |
case-02 | fail→fail | 4,664 | 4,727 | +1% | 1 | 1 | 0% | 780 | 1,644 | +111% | 0 | 0 | — |
case-03 | fail→fail | 3,949 | 3,734 | -5% | 1 | 1 | 0% | 610 | 1,603 | +163% | 0 | 0 | — |
case-04 | fail→pass | 16,420 | 7,299 | -56% | 1 | 1 | 0% | 2,875 | 2,685 | -7% | 0 | 0 | — |
case-05 | fail→pass | 12,131 | 6,951 | -43% | 1 | 1 | 0% | 2,038 | 2,665 | +31% | 0 | 0 | — |
case-06 | fail→pass | 6,134 | 2,673 | -56% | 1 | 1 | 0% | 953 | 1,869 | +96% | 0 | 0 | — |
case-08 | fail→pass | 7,653 | 2,417 | -68% | 1 | 1 | 0% | 1,242 | 1,833 | +48% | 0 | 0 | — |
case-09 | fail→pass | 8,158 | 2,049 | -75% | 1 | 1 | 0% | 1,250 | 1,691 | +35% | 0 | 0 | — |
case-10 | fail→pass | 11,056 | 4,373 | -60% | 1 | 1 | 0% | 1,988 | 2,272 | +14% | 0 | 0 | — |
case-11 | fail→pass | 8,090 | 3,282 | -59% | 1 | 1 | 0% | 1,206 | 1,932 | +60% | 0 | 0 | — |
case-12 | pass→fail | 9,730 | 2,013 | -79% | 1 | 1 | 0% | 1,399 | 1,703 | +22% | 0 | 0 | — |
case-13 | fail→pass | 13,300 | 5,121 | -61% | 1 | 1 | 0% | 2,153 | 2,301 | +7% | 0 | 0 | — |
case-14 | fail→pass | 9,794 | 4,559 | -53% | 1 | 1 | 0% | 1,537 | 2,129 | +39% | 0 | 0 | — |
case-15 | pass→pass | 9,630 | 2,893 | -70% | 1 | 1 | 0% | 1,710 | 1,869 | +9% | 0 | 0 | — |
case-16 | fail→pass | 8,211 | 3,934 | -52% | 1 | 1 | 0% | 1,279 | 2,000 | +56% | 0 | 0 | — |
case-17 | pass→pass | 9,673 | 3,004 | -69% | 1 | 1 | 0% | 1,504 | 1,906 | +27% | 0 | 0 | — |
case-18 | pass→pass | 9,463 | 5,062 | -47% | 1 | 1 | 0% | 1,449 | 2,256 | +56% | 0 | 0 | — |
case-19 | fail→pass | 12,653 | 2,696 | -79% | 1 | 1 | 0% | 1,890 | 1,869 | -1% | 0 | 0 | — |
case-20 | fail→pass | 18,073 | 4,912 | -73% | 1 | 1 | 0% | 3,054 | 2,237 | -27% | 0 | 0 | — |
case-21 | fail→pass | 16,079 | 6,755 | -58% | 1 | 1 | 0% | 2,799 | 2,544 | -9% | 0 | 0 | — |
case-22 | pass→pass | 9,056 | 3,944 | -56% | 1 | 1 | 0% | 1,550 | 2,033 | +31% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 19 counted toward the lift figure. The other 3 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +59 percentage points is the difference between those two pass rates over the 19 comparable cases. 2 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.