phx-codex-loop

Iterates Codex CLI reviews and fixes on Elixir/Phoenix diffs until findings are clean.

537|38|Updated Feb 12, 2026
One-click install
npx skills add https://github.com/oliver-kriska/claude-elixir-phoenix --skill phx-codex-loop
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: phx-codex-loop
Source: https://github.com/oliver-kriska/claude-elixir-phoenix/tree/main/targets/codex/skills/phx-codex-loop
Command: npx skills add https://github.com/oliver-kriska/claude-elixir-phoenix --skill phx-codex-loop

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Getting an external code review on Elixir/Phoenix changes and then actually fixing every finding is a slow, manual back-and-forth. This Skill automates a bounded critic-refiner loop where the Codex CLI reviews your diff and Claude applies, verifies, and re-reviews fixes until the review comes back clean.

Core Features & Use Cases

  • Automated review-fix loop: Runs codex exec review against a base branch, uncommitted changes, or a commit, triages findings by priority (P0-P3), applies approved fixes, and re-reviews up to a configurable maximum of rounds.
  • Verification before re-review: Enforces mix format, mix compile --warnings-as-errors, and scoped tests before spending another Codex review round, stopping with a blocker report after repeated verification failures.
  • Iron Law guardrails: Declines Codex suggestions that violate project Iron Laws, never commits or pushes, and reports every finding as fixed, declined, or deferred.
  • Use Case: Before opening a PR on a Phoenix feature branch, run the loop with --auto so P0-P2 findings from Codex are fixed and verified automatically, ending with a clean review or a report of remaining findings.

Quick Start

Ask the AI to run the phx-codex-loop skill on your current branch diff so Codex reviews it and approved findings are fixed until the review is clean.

Frequently Asked Questions about phx-codex-loop

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run an automated Codex CLI review loop on my Elixir code?

Invoke the skill with a diff mode such as --base main or --uncommitted. It runs codex exec review, triages findings by priority, applies approved fixes, verifies with mix compile and tests, then re-reviews until clean or the round limit is reached.

How do I review uncommitted changes with the Codex CLI?

Pass the --uncommitted flag so the review covers staged, unstaged, and untracked changes. Without flags, the skill auto-detects the mode: commits ahead of the default branch use --base, otherwise it falls back to --uncommitted.

What happens if the Codex CLI is not installed?

The skill stops at preflight with an install hint (brew install codex or npm i -g @openai/codex, then codex login) and suggests the phx-review skill as a Codex-free alternative instead of crashing.

Does the Codex review loop commit or push my changes?

No. The skill never commits or pushes; all git operations are left to the user. It only applies approved code fixes and reports the outcome of each finding.

Why does codex exec review exit with code 0 even when it finds issues?

The Codex CLI returns exit code 0 even when findings exist, so the skill parses the output file for - [P{n}] bullets instead of branching on the exit code. No priority bullets means the review is clean.

What are the limitations of the Codex review loop?

Rounds are bounded by --max-rounds (default 3) to control quota usage, and custom instructions cannot be combined with diff-mode flags in the CLI. Review rubrics must come from the AGENTS.md Review guidelines section installed by phx-init.