Agent skill

Phx Codex Loop

by oliver-kriska in oliver-kriska/claude-elixir-phoenix

Fix Elixir/Phoenix code until Codex CLI review comes back clean — bounded review, fix, verify loop before opening a PR.

MITAuto-check passedAI & LLM Engineering

Install Phx Codex Loop

skills CLI
$ npx skills add oliver-kriska/claude-elixir-phoenix --skill phx-codex-loop -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install oliver-kriska/claude-elixir-phoenix phx-codex-loop --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/oliver-kriska/claude-elixir-phoenix.git skills-src && mkdir -p .claude/skills && cp -r skills-src/targets/pi/skills/phx-codex-loop .claude/skills/phx-codex-loop && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
phx-codex-loop
GitHub stars
565
Token cost
~1.3k tokens
SKILL.md length
525 words
Files
2 (incl. references)
Skills in repo
105
Repo updated
First seen
Licence
MIT

At a glance

Fix Elixir/Phoenix code until Codex CLI review comes back clean — bounded review, fix, verify loop before opening a PR.

  • Works in 4 steps: Preflight → Detect Diff Mode → Round Loop (max --max-rounds, default 3) → …
  • Codex is installed and you want an external cross-model critic on your changes before pushing
  • SKILL.md covers Usage, Iron Laws, Workflow and Integration, plus 1 more section
  • Calls codex, brew and npm

What it does

Phx Codex Loop is an agent skill from oliver-kriska/claude-elixir-phoenix. 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.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/codex-cli.md`).

It sits in AI & LLM Engineering, covering LLM observability. It works with Elixir. The repository describes itself as: Claude Code plugin for Elixir/Phoenix/LiveView — 26 specialist agents, Iron Laws enforcement, and Tidewave MCP integration. Plan features with parallel research agents, execute… The licence is MIT.

When your agent uses it

  • Codex is installed and you want an external cross-model critic on your changes before pushing
  • Tasks that involve LLM observability

Example prompts

  • “/phx-codex-loop”

Requirements

  • Node.js

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Preflight
  2. Detect Diff Mode
  3. Round Loop (max --max-rounds, default 3)
  4. Final Report

What it can do on your machine

Read from SKILL.md and the folder at commit 9767a82. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • codex
    • brew
    • npm
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm and git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Phx Codex Loop loads about 1.3k tokens when it runs, and up to ~2.2k if it reads all its reference files. Until then it costs about 60 tokens; SKILL.md has 525 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~60
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from oliver-kriska/claude-elixir-phoenix at commit 9767a82, republished under its MIT licence (© oliver-kriska). 525 words, ~1,265 tokens.

Download SKILL.mdSave it as .claude/skills/phx-codex-loop/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
phx-codex-loop
description
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.

Codex Loop (fix until clean)

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.

Usage

/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 3

Iron Laws

  1. BOUNDED rounds — never exceed --max-rounds (default 3) — each round costs codex quota; report remaining findings instead of looping on
  2. Verify BEFORE re-review — mix compile --warnings-as-errors + tests must pass before burning a codex round on broken code
  3. NEVER commit or push — leave git to the user
  4. Codex findings get Iron Law scrutiny — decline suggestions that violate an Iron Law, with explanation in the round report
  5. Skipped findings are reported, never dropped — every finding ends as fixed, declined (with reason), or deferred-by-user
  6. Missing CLI stops the skill with an install hint — suggest /skill:phx-review as the codex-free alternative; never crash

Workflow

Step 1: Preflight

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:

  • Dirty tree (git status --short, only when using --base): codex inspects 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.
  • Missing rubric: if AGENTS.md has no ## Review guidelines section, note once that /skill:phx-init installs the Elixir rubric that steers codex priorities — then proceed (it works without, on defaults).
Step 2: Detect Diff Mode
  • Flag passed (--base/--uncommitted) → use as given
  • Commits ahead of the default branch → --base {default}
  • No commits yet → --uncommitted
Show full SKILL.md (263 more words)Show less
Step 3: Round Loop (max --max-rounds, default 3)
  1. Review — ONE foreground Bash call, explicit 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.

  2. Clean check — parse the output file; no - [P{n}] bullets means CLEAN → go to Step 4.

  3. Triage — emit the findings table (# | 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).

  4. Fix — apply approved fixes with user-visible diffs. Check each against Iron Laws first (Law 4).

  5. Verify — scoped, before the next round:

    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.

  6. Next round (n+1).

Step 4: Final Report
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.

Integration

text
implement → /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

  • references/codex-cli.md — invocation recipes, parse patterns, verified gotchas (CLI 0.142.5)

© oliver-kriska, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in targets/pi/skills/phx-codex-loop of oliver-kriska/claude-elixir-phoenix.

  • SKILL.md
  • references/codex-cli.md

Open the folder on GitHubat commit 9767a82

Compare with similar skills

Phx Codex Loop next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Phx Codex Loop compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Phx Codex Loop this skilloliver-kriska/claude-elixir-phoenix565—~1.3kAutomated safety check: PassMIT
Elixir Architectmaxim-ist/elixir-architect145—~7.6kAutomated safety check: PassMIT
Phoenix Frameworkpodlove/radiator136—~562Automated safety check: PassMIT
Elixir Expertpass-agent/loomkin1811 repos~796Automated safety check: PassMIT
Usage Rulesbradleygolden/claude-marketplace-elixir176—~4.9kAutomated safety check: NotesMIT
Elixir Prodavila7/claude-code-templates32k8 repos~486Automated safety check: PassMIT

Similar skills

  • Elixir Architect

    maxim-ist/elixir-architect

    A skill your agent uses when designing or architecting Elixir/Phoenix applications, creating comprehensive project documentation, planning OTP supervision trees, defining domain models with Ash…

    145 GitHub stars~7.6k tokensUpdated 10 mo ago
    AI & LLM EngineeringAuto-check passed
  • Phoenix Framework

    podlove/radiator

    Use this skill working with Phoenix Framework. An agent skill from podlove/radiator.

    136 GitHub stars~562 tokensUpdated 13 days ago
    AI & LLM EngineeringAuto-check passed
  • Elixir Expert

    pass-agent/loomkin

    Expert in Elixir, Phoenix Framework, and OTP. An agent skill from pass-agent/loomkin.

    181 GitHub starsUsed in 1 repo~796 tokens
    AI & LLM EngineeringAuto-check passed
  • Usage Rules

    bradleygolden/claude-marketplace-elixir

    Search for package-specific usage rules and best practices from Elixir packages.

    176 GitHub stars~4.9k tokensUpdated 8 mo ago
    AI & LLM EngineeringAuto-check: notes
  • Elixir Pro

    davila7/claude-code-templates

    Write idiomatic Elixir code with OTP patterns, supervision trees, and Phoenix LiveView.

    32k GitHub starsUsed in 8 repos~486 tokens
    AI & LLM EngineeringAuto-check passed
  • Phoenix

    ericrisco/rsc-harness

    A skill your agent uses when building an Elixir web app with Phoenix — contexts, Ecto schemas, changesets and migrations, LiveView, channels and PubSub, the generators, and the boundary between…

    167 GitHub stars~2.9k tokensUpdated today
    AI & LLM EngineeringAuto-check: notes

More from oliver-kriska/claude-elixir-phoenix

All 105 skills in this repo
  • Phx Brief

    oliver-kriska/claude-elixir-phoenix

    Interactive briefing of a plan file — explains reasoning, schema decisions, component choices.

    565 GitHub starsUsed in 1 repo~1.2k tokens
    Auto-check passed
  • Codex Ab

    oliver-kriska/claude-elixir-phoenix

    Run an A/B codex review experiment — holistic codex review vs 3 focused dimension passes (security, ecto, liveview) on the branch diff, classify findings, report a panel-value verdict.

    565 GitHub stars~977 tokensUpdated 2 days ago
    Auto-check passed
  • Audit

    oliver-kriska/claude-elixir-phoenix

    Project health audit and health check — architecture, performance, tests, dependencies, code quality.

    565 GitHub stars~2k tokensUpdated 2 days ago
    Auto-check passed
  • Compound Docs

    oliver-kriska/claude-elixir-phoenix

    Searchable Elixir/Phoenix/Ecto solution documentation system with; Use when consulting past solutions…

    565 GitHub stars~528 tokensUpdated 2 days ago
    Auto-check passed
  • Compound Docs

    oliver-kriska/claude-elixir-phoenix

    Searchable Elixir/Phoenix/Ecto solution documentation system with YAML frontmatter.

    565 GitHub stars~547 tokensUpdated 2 days ago
    Auto-check passed
  • Deploy

    oliver-kriska/claude-elixir-phoenix

    Elixir/Phoenix deployment patterns — Dockerfile, fly.toml, runtime.exs, mix release, rel/ overlays.

    565 GitHub stars~1.1k tokensUpdated 2 days ago
    Auto-check passed

Works with

Questions about Phx Codex Loop

What does Phx Codex Loop do?

Fix Elixir/Phoenix code until Codex CLI review comes back clean — bounded review, fix, verify loop before opening a PR. Phx Codex Loop is an agent skill from oliver-kriska/claude-elixir-phoenix. Fix Elixir/Phoenix code until Codex CLI review comes back clean — bounded review, fix, verify loop before opening a PR.

When should I use Phx Codex Loop?

Phx Codex Loop fits situations like: Codex is installed and you want an external cross-model critic on your changes before pushing; tasks that involve LLM observability.

How do I install Phx Codex Loop in Claude Code?

Run `npx skills add oliver-kriska/claude-elixir-phoenix --skill phx-codex-loop -a claude-code`. Or copy the skill folder (targets/pi/skills/phx-codex-loop in oliver-kriska/claude-elixir-phoenix) into .claude/skills/phx-codex-loop in your project. Claude Code loads it when a task matches its description.

How do I install Phx Codex Loop in Codex?

Run `npx skills add oliver-kriska/claude-elixir-phoenix --skill phx-codex-loop -a codex`. Or copy the skill folder (targets/pi/skills/phx-codex-loop in oliver-kriska/claude-elixir-phoenix) into .agents/skills/phx-codex-loop in your project. Codex loads it when a task matches its description.

Can I use Phx Codex Loop in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add oliver-kriska/claude-elixir-phoenix --skill phx-codex-loop -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/phx-codex-loop, .gemini/skills/phx-codex-loop, .github/skills/phx-codex-loop and .opencode/skills/phx-codex-loop in your project.

What does Phx Codex Loop need to run?

Going by SKILL.md and its folder, Phx Codex Loop needs the command-line tools its instructions call (codex, brew, npm and git). Our summary lists: Node.js.

Does Phx Codex Loop access the network?

SKILL.md contains no URLs. Its commands use npm and git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Phx Codex Loop safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Phx Codex Loop use?

Phx Codex Loop is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Phx Codex Loop use?

About 1.3k tokens (SKILL.md is roughly 5.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 972 tokens, read only when the agent opens those files.

What are the alternatives to Phx Codex Loop?

Skills that share tags, products or a category with Phx Codex Loop: Elixir Architect (maxim-ist/elixir-architect, 145 stars), Phoenix Framework (podlove/radiator, 136 stars), Elixir Expert (pass-agent/loomkin, 181 stars) and Usage Rules (bradleygolden/claude-marketplace-elixir, 176 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Phx Codex Loop?

oliver-kriska (a GitHub user) maintains it in oliver-kriska/claude-elixir-phoenix, which has 565 GitHub stars. The repository holds 105 skills in this directory. The repository was last updated on October 5, 2026.

Source: oliver-kriska/claude-elixir-phoenix on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.