Skip to content

brian93512/opus-codex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

opus-codex

Opus plans, Codex executes. A Claude Code skill that uses Claude Opus to produce detailed implementation plans, then hands them off to OpenAI Codex CLI for autonomous execution.

Install — 15 seconds

Requirements: Claude Code, Git, OpenAI Codex CLI (npm i -g @openai/codex)

Codex auth: Either codex auth login (interactive) or set OPENAI_API_KEY env var.

Option A: Install globally (all projects)

Open Claude Code and paste this. Claude does the rest.

Install opus-codex: run git clone --single-branch --depth 1 https://github.com/brian93512/opus-codex.git ~/.claude/skills/opus-codex && cd ~/.claude/skills/opus-codex && ./setup then add an "opus-codex" section to CLAUDE.md that lists the available skill: /opus-codex, and mentions it requires /model opus. Add a "Default workflow" section that says: for all implementation tasks, use /opus-codex (Opus plans, Codex executes).

Option B: Install in a single project

Install opus-codex for this project only: run git clone --single-branch --depth 1 https://github.com/brian93512/opus-codex.git .claude/skills/opus-codex && rm -rf .claude/skills/opus-codex/.git && cd .claude/skills/opus-codex && ./setup then add an "opus-codex" section to this project's CLAUDE.md that lists the available skill: /opus-codex, and mentions it requires /model opus.

Real files get committed to your repo (not a submodule), so teammates get it automatically on git clone.

Usage

  1. Start Claude Code
  2. Switch to Opus: /model opus
  3. Run: /opus-codex
  4. Describe your task
  5. Review the plan, choose execution mode (full-auto or manual approvals)
  6. Codex executes the plan autonomously
  7. Opus reviews the diff and reports results

See it work

You:    /model opus
You:    /opus-codex
You:    Add rate limiting middleware to our Express API

Claude: [reads codebase — finds existing middleware patterns, route structure]
        [produces detailed plan: 3 files, code snippets, edge cases, test cases]

        Ready to hand off to Codex. How should it run?
        A) Full-auto    B) Manual approvals    C) Edit plan    D) Cancel

You:    A

Claude: [hands plan to codex exec --full-auto --sandbox workspace-write]
        ...
        Codex executed successfully. Changes to 3 files (65 insertions):

        src/middleware/rate-limit.ts   (new, 38 lines)
        src/app.ts                    (3 lines added)
        tests/rate-limit.test.ts      (new, 24 lines)

        Tests: 3 passed (verified by Codex)
        Diff review: PASS — no issues found. Ready to commit.

Opus thinks. Codex types. You ship.

When to use it

Task size Recommendation
< 500 LOC Pure Opus is cheaper
500–800 LOC Either approach
> 800 LOC opus-codex saves ~9%+

Opus+Codex reduces output tokens by ~50% on large tasks by offloading code generation to Codex. See benchmark details.

How it works

  1. Opus plans — reads your codebase, produces a detailed implementation plan with file paths, code snippets, edge cases, and verification steps
  2. You approve — review the plan, choose full-auto or manual approvals
  3. Codex executescodex exec runs the plan autonomously in a sandbox
  4. Opus reviews — extracts test results from Codex log, reviews the unified diff

License

MIT

About

Opus plans, Codex executes. A Claude Code skill to save tokens and automate development.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages