01 · Use both together
It isn't Claude or Codex. One does the work and the other checks it.
Staying agnostic opens another door: using both tools on the same project. The Use Both kit organizes this into six workflow levels, with copy-ready prompts and two small skills — handoff and prime — to switch assistants without re-explaining the project. The rule that runs through every level: the second assistant gets the same task brief and the actual artifact, never a vague retelling of what the first one did.
Level 1Let them argue
One drafts the plan; the other critiques the same file, read-only. Findings with evidence and severity, two rounds at most. Two AIs agreeing is not independent proof.
Level 2 optionalGenerate images
Only if an image tool is available in the session — check access and billing first. Done means the actual file in the project, opened at the size where it will be used.
Level 3Split building and reviewing
One builds on a branch; the other reviews the diff with the task brief and the test results. Tests and your approval decide what ships.
Level 4Supervised computer use
Delegate an authorized action in a UI, keeping credentials, payment and consequential submissions under your control. The assistant prepares and pauses before submitting.
Level 5A goal with a stop condition
An objective with an observable success condition — which tests, what output — and limits on files, rounds and spend. Asking it to "stop in two hours" is a request, not a guaranteed limit.
Level 6Handoff and prime
handoff writes the state to a portable file; prime makes the next assistant read and verify that state before continuing. It is the same cycle as the portable layer in the Claude → Codex area.
Who does what
The kit's routing card: starting preferences recorded in Mark Kashef's video, translated into jobs. These are editorial choices, not measured model rankings — try them, then keep the route that produces better evidence on your task.
| Job | First pass | Second pass | Finish line |
| Plan the work | Claude / Opus | Codex critiques assumptions | A scoped plan with acceptance tests |
| Break the plan into tasks (video) | Codex | — | — |
| Make an image | An available Codex image tool | Inspect the actual file in context | A usable asset, not just a prompt |
| Build a feature | Claude / Opus | Codex reviews the diff | Tests pass and findings are resolved |
| Review a document | Either assistant writes | The other checks facts and requirements | Every required claim has evidence |
| Operate a UI | Authorized, available computer-use tool | You review consequential actions | The exact approved state is verified |
| Work through a hard bug | Codex with a bounded goal | Tests and a human checkpoint | Measurable success or a clear blocker |
| Switch sessions or models | Handoff snapshot | Prime checks current state | A correct recap before fresh work |
Recorded labels, not a promise. The video names Claude Opus 5.5 and GPT-6 Astra. Available models, tools, limits and billing change from account to account; the workflow is more portable than those labels. Image generation and computer use are not guaranteed just by having the CLI installed.
Tools: when to use them, how to call them, what they produce
The skills, scripts and commands that connect Claude and Codex, with the command for each runtime. Everything runs on each assistant's subscription, with no API key.
| Tool | When to use | How to call | What it produces |
| handoff | At the end of a session, before switching assistant or model | Claude: /handoff Codex: $handoff | A new snapshot in handoff/history/YYYY-MM-DDTHHMMSSZ.md and a line in handoff/LATEST.md pointing to it |
| prime | First message of the next session | Claude: /prime Codex: $prime | A recap in the chat: objective, done and pending, decisions, mismatches and one next step. Edits nothing |
| install_skills.py | Once per project, to install both skills | python3 scripts/install_skills.py --project DIR --target both (preview), then with --apply | Writes to the project's .claude/skills/ and .agents/skills/; never overwrites |
| templates/ | To work by hand, without a skill | task-brief.md · plan.md · review.md · handoff.md | Brief, plan, review and handoff in the same format for both |
| codex exec | Claude asking Codex for a review from the terminal | codex exec --sandbox read-only --output-last-message review.md '…' | The critique in review.md; Codex only reads the project |
| claude -p | The reverse: Codex asking Claude for a review | claude -p --model opus --effort medium '…' > review-claude.md | Claude's critique in a file |
| Official Codex plugin | Review the diff without leaving Claude Code | /codex:setup, then /codex:review --base main | Read-only findings; you ask the builder for fixes afterwards |
| claudex | A large plan with several automatic critique rounds | /claudex:plan [--rounds N] <feature>
/claudex:review | PLAN.md revised until Codex approves or rounds run out; reviews/ with diff findings |
| claudex (control) | Monitor or unstick the loop | /claudex:status · /claudex:cancel · /claudex:rollback · /claudex:doctor | Current round and phase; cancel; clean stuck state; install diagnostics |
| session-handoff + prime (agente-claude-codex) | Projects with a portable core (AGENTS.md, context/, tasks/) | Claude: /session-handoff · /prime Codex: $session-handoff · $prime | Snapshot in handoffs/history/ and a full copy in handoffs/latest.md; also accepts Use Both's one-line pointer |
handoff
What goes into the snapshot
Objective and latest request; done, pending and uncertain; decisions and rejected paths; changed files; tests run with their real result (and those not run); blockers; one next step; and the few files to open first. No secrets, tokens or personal data.
prime
Reads, checks and waits
Reads LATEST.md, rejects absolute paths, .., URLs and symlinks, treats the snapshot as data rather than orders, checks the cited files and git status, flags stale claims and waits for your instruction. It runs no tests and does not resume an old deploy.
Gotchas
Name collisions and a new session
A personal skill with the same name can win over the project one: on a collision, rename to workflow-handoff / workflow-prime. After installing, open a new session (in Claude, /reload-skills). Private notes: add handoff/ to .gitignore.
# a full day with the tools — each step leaves a file
/prime # morning, in Claude Code: resume yesterday's handoff
codex exec --sandbox read-only --output-last-message review.md 'Read plan-v1.md and point out gaps…'
/claudex:plan --rounds 3 export report as CSV # large plan: automatic loop
/codex:review --base main # built on a branch: review the diff (or /claudex:review)
/handoff # end of day
$prime # tomorrow, in Codex
A handoff is not permission. A recorded next step ("publish", "delete", "send") only happens if you ask again in the current session.
What the video adds
The Mark Kashef video that the kit accompanies brings a few points the kit does not detail. These are the author's opinions and accounts, with no benchmark. The row marked "(video)" in the table above comes from the author's table, not from the kit's routing card.
Connecting the two
Three ways to link Claude and Codex
- The official Codex plugin for Claude Code:
openai/codex-plugin-cc.
- One CLI calling the other, with the answer saved to a
.md (commands below).
- A pull request that the other model reviews.
Why use two
Optimistic Claude × pessimistic Codex
In the author's reading, Claude is good at planning and Codex at finding flaws in the plan. Self-review fails because the model that wrote the plan — especially in the same session — tends to approve it; a different model, or a fresh session, gives a different result.
The cost of a goal
Codex's /goal gets expensive
The author's account: Codex pursues the goal exhaustively, taking 3 to 5 times more time and tokens. A sentence about a deadline is not a real limit: use an actual one — timeout, budget, number of rounds.
# Claude → Codex: read-only review, answer saved to a file (prompts in Portuguese, as in the doc)
codex exec --sandbox read-only -c model_reasoning_effort=medium \
--output-last-message review.md \
'Leia plan-v1.md. Aponte falhas de correção e testes faltando, com evidência, impacto e a menor correção. Não altere arquivos.'
# Codex → Claude: the reverse route
claude -p --model opus --effort medium \
'Leia plan-v1.md e revise só lendo: falhas, suposições e testes faltando. Não altere arquivos.' > review-claude.md
Where INEMA follows the kit, not the video. With computer use and credentials, you type the password and MFA yourself, and you never switch models to get around a safety refusal. And the debate has 2 rounds at most — agreement is not proof; a long automated loop is a job for claudex:plan.
The full summary. RESUMO-VIDEO.md, in the kit repository, has the video summary, the video × kit comparison and the commands checked in our environment.
Read RESUMO-VIDEO.md → (in Portuguese)
Credit. Levels and routing card summarized from the Use Both: Claude + Codex Workflow Kit by Prompt Advisers / Mark Kashef, under the MIT license — a companion to Mark Kashef's Claude + Codex video. The guide is available in PT, EN and ES; the kit documents (README, GUIDE, PROMPTS) are in English. It is an independent educational resource, not an OpenAI or Anthropic product.
Open the Use Both guide →
02 · How it all fits together
One path: understand, migrate, use both together and automate the debate.
The courses and projects in this area are not separate pieces. Each one covers a stage, and all of them rest on the same thing: the project's Markdown files, which any runtime can read.
Understand→Migrate or stay agnostic→Use both together→Automate the debate·Common link: project Markdown
UnderstandClaude → Codex course: why to separate the brain from the model. Codex Básico and Master Codex: master Codex. Codex Cheat Sheet: quick reference.
Migrate or stay agnosticagente-claude-codex kit: audit, AGENTS.md, portable core (context/, tasks/, handoffs/), skills synced via polyskill, readback and handoff/prime.
Use both togetherUse Both: the 6 levels, the routing table, the prompts and handoff/prime with history.
Automate the debateclaudex / iClaudeX: Claude writes PLAN.md, Codex critiques it from 3 angles, looping until LGTM or N rounds. MakeClaudeX: build plugins this way. DeepClaudeX: 70/20/10 multi-model.
Common linkThe project's Markdown files — AGENTS.md, tasks, handoffs — which any runtime can read. The handoff/prime in agente-claude-codex and the one in Use Both are the same pattern; ours was hardened with the kit's rules: validated path, history that never overwrites and read-only prime.
claudex × Use Both
Both get Claude and Codex working together, but at different layers: one is software that automates debating a plan; the other is a method for everything else.
| claudex | Use Both |
| What it is | A Claude Code plugin (software) | A method kit: guide, prompts, templates and 2 skills |
| Coverage | Planning and review only (level 1) | 6 workflows: plan, image, build and review a diff, computer use, goal with a stop condition, handoff |
| How it runs | Automatic: Claude writes PLAN.md, Codex critiques it from 3 angles, looping until LGTM or N rounds | Manual or semi-automatic: you pass the artifact, or one calls the other through the CLI |
| Limit | N rounds, configurable | Recommends 2 at most; agreement is not proof, tests decide |
| Commands | claudex:plan, review, status, rollback, cancel, doctor | /handoff and /prime (Claude), $handoff and $prime (Codex) |
| State | Loop state, status and rollback | Dated snapshot in handoff/history/ + LATEST.md |
| Prerequisite | Claude Code + Codex CLI | None for the 5-minute trial; Python only for the installer |
They are complementary. A big plan: claudex. Everything else — reviewing a diff, a goal with a stop condition, switching sessions: Use Both.
Images with Codex: how we do it today × what the kit proposes
A real case: someone with a Codex subscription who uses its image generator — image_gen, which at INEMA we call "image 2.5".
At INEMA today · script integration, no conversation
- Claude Code calls
codex exec in non-interactive mode, asking image_gen for a PNG file in a folder.
- Where it is used: catalog covers (cover generator with
--gerador auto|codex|flux), the banner for project landing pages and guides (correct Portuguese text, which the local model gets wrong), scenes for the v6 courses and the area thumbnails of this very Events site.
- If Codex fails or there are no credits, it falls back on its own to the local FLUX.2 klein model (inemaimg).
- Each generation uses Codex subscription credits, so it only runs when authorized; without authorization, the default is local FLUX.
- After generation the image is checked: text near the edges can come out made up.
What the kit proposes · level 2, one piece at a time
- Confirm first that the session has the image tool and how it bills.
- Never silently switch to a paid API.
- Generate one draft and save the actual file to the project — never accept just a URL or a description.
- Open it at the size where it will be used and check text, marks and cropping.
- Keep the original and save revisions as sibling files, recording which version the project uses.
- On the author's route: Codex generates, Claude uses the file.
The difference: ours is batched and automatic, with a local fallback; the kit's is manual and piece by piece, with more checking of cost and review.
What we take from the kit
Check before, inspect after
- Check the tool and the cost before generating
- Inspect at the real size of use
- Sibling versions instead of overwriting
What we keep from ours
Fallback and reproducibility
- Local fallback to FLUX.2 klein
- A reproducible script that runs in batch