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.
npx skills add https://github.com/oliver-kriska/claude-elixir-phoenix --skill phx-codex-loop
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 /phx-review (Claude panel)
— run either or both before a PR.
/phx-codex-loop # diff vs default branch, interactive
/phx-codex-loop --uncommitted # staged + unstaged + untracked
/phx-codex-loop --base develop # explicit base branch
/phx-codex-loop --auto # auto-approve P0/P1/P2, skip P3
/phx-codex-loop --max-rounds 2 # default 3
costs 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
/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 /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 /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):
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
(/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).
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.
## 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 /phx-compound for non-obvious fixes, then commit/PR.
On MAX ROUNDS: list remaining findings; offer /phx-plan to convert them
into a follow-up plan.
implement → /phx-codex-loop (YOU ARE HERE) → clean → commit/PR → /phx-watch-pr --codex
↑ or arrive from /phx-review --codex verdict REQUIRES CHANGES
references/codex-cli.md — invocation recipes, parsepatterns, verified gotchas (CLI 0.142.5)
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
Take oliver-kriska/claude-elixir-phoenix-opencode-phx-codex-loop from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference npm, brew.
Without those the skill loads but fails at the first command.