This is a structured workflow for taking a finalized plan and executing it through repeated Claude-Codex collaboration. You hand it a plan file, and Claude orchestrates while Codex does all the actual coding. Claude reviews each batch of changes, writes up issues by severity in a shared review file, then sends Codex back to fix them until the code passes. It enforces hard limits from your CLAUDE.md (800 line files, 50 line functions, 3-level nesting) and reuses Codex sessions so context carries forward. The strict division of labor is interesting: Claude never touches code, only reads and reviews. It's essentially a CI pipeline run by an AI pair, complete with build checks and multi-round iteration. Works best when you already have a detailed plan and want mechanical execution with quality gates.
npx -y skills add longranger2/claude-gpt-workflow --skill plan-execute --agent claude-codeInstalls into .claude/skills of the current project.
When the user runs /plan-execute {plan-file-path}, start the "orchestrated plan execution" workflow:
reviews/ directory, then ask Codex to inspect and fix the issues.Core principle: I do not write or edit code myself. I only do two things: review code and orchestrate Codex. All code changes, including implementation and fixes, are performed by Codex.
/plan-execute plans/my-feature-plan.md
After each Codex invocation, extract session_id=xxx from the script output and save it as the session ID for the current task. In later Codex calls for the same task, pass --session <id> to reuse context so Codex remembers prior implementation and fix history instead of rereading the entire codebase every time.
Read the specified plan file and understand:
CLAUDE.mdIf the plan already contains a checklist (- [ ] / - [x]), use those items as execution units.
If it does not define clear steps, split the work into reasonable batches, with no more than 5 file changes per batch.
Use the /codex skill and give Codex the following instruction:
Implement the code according to the plan in {plan-file-path}.
Current execution scope: {specific step or batch description}
Requirements:
- Follow the design in the plan exactly. Do not improvise beyond it.
- Obey the Code Quality Hard Limits defined in `CLAUDE.md`.
- Single file <= 800 lines, single function <= 50 lines, nesting <= 3 levels
- Run `pnpm build` after implementation to confirm compilation succeeds
- If the plan includes a checklist, mark completed steps as `[x]`
After implementation, list all changed files and provide a summary of each change.
After Codex finishes, I perform a code review. Important: I only read code and write reviews. I never directly modify source files.
pnpm build to confirm the compilation status.Append the review to reviews/{topic}-review.md (shared with plan-review):
---
## Code Review Round {N} — {YYYY-MM-DD}
**Scope**: {code scope covered in this review}
**Build Status**: PASS / FAIL
### Issues
#### Issue 1 ({severity}): {title}
**File**: {file-path:line}
{issue description}
**Fix**: {specific fix recommendation}
...
### Verdict: NEEDS_FIX / APPROVED
If Verdict: NEEDS_FIX, call /codex and have Codex fix the issues instead of editing them myself:
Read the latest Code Review round in {review-file-path}.
Check each issue one by one. Fix the valid issues, and explain why any disputed item is not actually a problem.
After making fixes, run `pnpm build` to confirm compilation succeeds.
List the issues that were fixed and the corresponding code changes.
If Verdict: APPROVED, skip to Step 6.
After Codex applies fixes, I review again, still without editing code directly:
Verdict: APPROVEDAfter each batch is completed, ask Codex to update the checklist in the plan file (- [ ] -> - [x]).
If unfinished steps remain, go back to Step 2 for the next batch.
Once all work is complete, move to the wrap-up.
Report the following to the user:
| Level | Meaning | Must Fix |
|---|---|---|
| Critical | Causes runtime failures or security vulnerabilities | Yes |
| High | Violates project conventions or has obvious design flaws | Yes |
| Medium | Code quality issue that should be improved | Recommended |
| Low | Style or preference issue | Optional |
| Suggestion | Optimization suggestion | Optional |
Verdict rules:
NEEDS_FIXAPPROVED with optional improvement notesplan-review: reviews/{topic}-review.md{topic} is the plan file name without .md## Round {N} for plan review and ## Code Review Round {N} for code reviewmattpocock/skills