gitmyhub

arbitrage

★ 135 updated 29d ago

A Claude Code skill for token arbitrage: keep premium model tokens for judgment, dispatch all code-writing to codex.

Arbitrage is a skill file for Claude Code, the AI coding assistant from Anthropic. It addresses a cost problem: when you use a top-tier AI model to write code, you spend expensive tokens on work that a cheaper model could handle just as well. This skill teaches the expensive model to be more selective about what it does itself.

The idea is a split. The premium model keeps the work that actually needs its judgment: planning, writing specifications, reviewing what was built, validating frontend visuals, and deciding whether the result is acceptable. It hands off the actual code writing to Codex, OpenAI's coding agent, which runs in the background on a separate quota. For many users, their Codex subscription sits mostly unused, making this a way to get more out of what they are already paying for.

The workflow follows a pattern. Before any code is written, the premium model drafts a spec: what the goal is, the constraints, what test must pass, and what should not be touched. It then dispatches implementation to Codex and continues planning or reviewing in parallel rather than waiting. When Codex finishes, the diff comes back, the premium model reviews it, and commits are made from the main session. Codex never interacts with git directly.

For frontend work, the skill adds a visual loop. Codex writes the UI, the premium model takes a screenshot, judges it against the original design intent, and sends Codex back with specific corrective feedback until the result looks right.

There is a built-in escape hatch. If Codex fails twice in a row even after corrective feedback, the premium model steps in and writes the code itself, salvaging whatever it can from Codex's incomplete attempt. Installation is a single git clone into the appropriate skills directory. The project is released under the MIT license.