
Codex Claude Loop
- 58 installs
- 902 repo stars
- Updated June 22, 2026
- bear2u/my-skills
Codex-Claude Loop is a Claude skill that orchestrates a dual-AI loop where Claude plans and implements while Codex validates and reviews.
About
This skill orchestrates a two-way engineering loop where Claude Code plans and implements while Codex validates and reviews. It defines phases for plan validation, implementation, cross-review after each change, and iterative fixes, resuming Codex sessions to preserve context. A developer uses it to add an automated Codex review pass to Claude's coding work.
- Dual-AI loop: Claude plans and implements, Codex validates and reviews
- Cross-reviews every change and uses codex exec resume --last to continue sessions
- Stops on non-zero Codex exit codes and asks the user for direction
Codex Claude Loop by the numbers
- 58 all-time installs (skills.sh)
- Ranked #6,589 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 4, 2026 (Skillselion catalog sync)
codex-claude-loop capabilities & compatibility
- Capabilities
- code review · orchestration · refactoring
- Works with
- openai
- Use cases
- code review · orchestration
- Runs
- Runs locally
- Pricing
- Bring your own API key
What codex-claude-loop says it does
Orchestrates a dual-AI engineering loop where Claude Code plans and implements, while Codex validates and reviews, with continuous feedback for optimal code quality
Plan (Claude) → Validate Plan (Codex) → Feedback → Implement (Claude) → Review Code (Codex) → Fix Issues (Claude) → Re-validate (Codex) → Repeat until perfect
npx skills add https://github.com/bear2u/my-skills --skill codex-claude-loopAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 58 |
|---|---|
| repo stars | ★ 902 |
| Last updated | June 22, 2026 |
| Repository | bear2u/my-skills ↗ |
What it does
Run a Claude-plans-and-implements, Codex-validates-and-reviews loop with cross-review after each change.
Who is it for?
Adding an automated Codex validation and review pass to Claude's coding work.
Skip if: Tasks with no Codex CLI access or simple one-off edits.
When should I use this skill?
When the user wants a Claude-implements, Codex-reviews engineering loop.
What you get
Code planned and implemented by Claude and validated by Codex through a repeating review-and-fix loop.
By the numbers
- 6 phases from planning to iterative improvement
Files
Codex-Claude Engineering Loop Skill
Core Workflow Philosophy
This skill implements a balanced engineering loop:
- Claude Code: Architecture, planning, and execution
- Codex: Validation and code review
- Continuous Review: Each AI reviews the other's work
- Context Handoff: Always continue with whoever last cleaned up
Phase 1: Planning with Claude Code
1. Start by creating a detailed plan for the task 2. Break down the implementation into clear steps 3. Document assumptions and potential issues 4. Output the plan in a structured format
Phase 2: Plan Validation with Codex
1. Ask user (via AskUserQuestion):
- Model:
gpt-5orgpt-5-codex - Reasoning effort:
low,medium, orhigh
2. Send the plan to Codex for validation:
echo "Review this implementation plan and identify any issues:
[Claude's plan here]
Check for:
- Logic errors
- Missing edge cases
- Architecture flaws
- Security concerns" | codex exec -m --config model_reasoning_effort="" --sandbox read-only3. Capture Codex's feedback
Phase 3: Feedback Loop
If Codex finds issues: 1. Summarize Codex's concerns to the user 2. Refine the plan based on feedback 3. Ask user (via AskUserQuestion): "Should I revise the plan and re-validate, or proceed with fixes?" 4. Repeat Phase 2 if needed
Phase 4: Execution
Once the plan is validated: 1. Claude implements the code using available tools (Edit, Write, Read, etc.) 2. Break down implementation into manageable steps 3. Execute each step carefully with proper error handling 4. Document what was implemented
Phase 5: Cross-Review After Changes
After every change: 1. Send Claude's implementation to Codex for review:
- Bug detection
- Performance issues
- Best practices validation
- Security vulnerabilities
2. Claude analyzes Codex's feedback and decides:
- Apply fixes immediately if issues are critical
- Discuss with user if architectural changes needed
- Document decisions made
Phase 6: Iterative Improvement
1. After Codex review, Claude applies necessary fixes 2. For significant changes, send back to Codex for re-validation 3. Continue the loop until code quality standards are met 4. Use codex exec resume --last to continue validation sessions:
echo "Review the updated implementation" | codex exec resume --lastNote: Resume inherits all settings (model, reasoning, sandbox) from original session
Recovery When Issues Are Found
When Codex identifies problems: 1. Claude analyzes the root cause 2. Implements fixes using available tools 3. Sends updated code back to Codex for verification 4. Repeats until validation passes
When implementation errors occur: 1. Claude reviews the error/issue 2. Adjusts implementation strategy 3. Re-validates with Codex before proceeding
Best Practices
- Always validate plans before execution
- Never skip cross-review after changes
- Maintain clear handoff between AIs
- Document who did what for context
- Use resume to preserve session state
Command Reference
| Phase | Command Pattern | Purpose |
|---|---|---|
| Validate plan | `echo "plan" \ | codex exec --sandbox read-only` |
| Implement | Claude uses Edit/Write/Read tools | Claude implements the validated plan |
| Review code | `echo "review changes" \ | codex exec --sandbox read-only` |
| Continue review | `echo "next step" \ | codex exec resume --last` |
| Apply fixes | Claude uses Edit/Write tools | Claude fixes issues found by Codex |
| Re-validate | `echo "verify fixes" \ | codex exec resume --last` |
Error Handling
1. Stop on non-zero exit codes from Codex 2. Summarize Codex feedback and ask for direction via AskUserQuestion 3. Before implementing changes, confirm approach with user if:
- Significant architectural changes needed
- Multiple files will be affected
- Breaking changes are required
4. When Codex warnings appear, Claude evaluates severity and decides next steps
The Perfect Loop
Plan (Claude) → Validate Plan (Codex) → Feedback →
Implement (Claude) → Review Code (Codex) →
Fix Issues (Claude) → Re-validate (Codex) → Repeat until perfectThis creates a self-correcting, high-quality engineering system where:
- Claude handles all code implementation and modifications
- Codex provides validation, review, and quality assurance
Codex-Claude Loop 스킬 사용법
기본 사용 시나리오
1️⃣ 새로운 기능 개발
👤 사용자: "로그인 기능을 OAuth 2.0으로 구현해줘"
🤖 Claude:
[먼저 계획을 세움]
- OAuth 2.0 플로우 설계
- 보안 토큰 관리 방식
- 에러 핸들링 전략
...
[계획이 완성되면]
"이 계획을 Codex로 검증하겠습니다"
- 어떤 모델을 사용할까요? (gpt-5 / gpt-5-codex)
- Reasoning effort? (low / medium / high)
👤 사용자: "gpt-5-codex, high"
🤖 Claude:
[Codex에게 계획 검증 요청]
$ echo "Review this OAuth plan..." | codex exec -m gpt-5-codex --config model_reasoning_effort="high" --sandbox read-only
[Codex 피드백 요약]
"Codex가 2가지 이슈를 발견했습니다:
1. CSRF 토큰 검증 누락
2. Refresh token 로테이션 필요
계획을 수정하겠습니다..."
[계획 수정 후 재검증 또는 바로 구현]
👤 사용자: "구현해줘"
🤖 Claude:
[검증된 계획으로 구현 시작]
- Edit/Write 도구로 코드 작성
- 단계별로 구현
...
[구현 완료 후]
"구현이 완료되었습니다. Codex로 코드 리뷰를 받겠습니다"
$ echo "Review this implementation..." | codex exec --sandbox read-only
[Codex 리뷰 결과]
"Codex가 성능 개선 제안 1개를 발견했습니다. 적용하겠습니다..."
[수정 완료]2️⃣ 코드 리뷰 & 개선
👤 사용자: "이 코드를 Codex-Claude loop으로 리뷰해줘"
🤖 Claude:
[먼저 코드 분석]
"몇 가지 개선점을 발견했습니다..."
[Codex로 검증]
$ echo "Review this code for bugs and performance..." | codex exec --sandbox read-only
[Codex 피드백 분석]
"Codex 발견:
- 잠재적 메모리 누수 1개
- 성능 최적화 2개
- 가독성 이슈 3개
수정을 진행하겠습니다"
👤 사용자: "응"
🤖 Claude:
[Edit/Write 도구로 코드 수정]
"수정 완료! 다시 Codex로 검증하겠습니다..."
$ echo "Verify the fixes..." | codex exec resume --last3️⃣ 버그 수정
👤 사용자: "Claude가 만든 코드에 버그가 있어"
🤖 Claude:
"어떤 버그인지 확인했습니다.
수정하고 다시 Codex에게 검증받겠습니다"
[Claude가 수정]
[Edit/Write 도구로 코드 수정]
[Codex로 재검증]
$ echo "Verify this fix..." | codex exec resume --last
[Codex 검증 통과]
"수정 완료! Codex가 확인했습니다."주요 명령어 패턴
1. 계획 검증 (Codex)
echo "Review this plan: [계획내용]" | codex exec -m gpt-5-codex --config model_reasoning_effort="high" --sandbox read-only2. 구현 (Claude)
Claude가 Edit/Write/Read 등의 도구를 사용하여 직접 코드 작성
3. 코드 리뷰 (Codex)
echo "Review this implementation: [구현 설명]" | codex exec --sandbox read-only4. 수정 적용 (Claude)
Claude가 Codex 피드백을 기반으로 코드 수정
5. 재검증 (Codex)
echo "Verify the fixes" | codex exec resume --last언제 이 스킬을 쓰나?
✅ 이럴 때 사용:
- 복잡한 기능 개발 (여러 단계 필요)
- 높은 품질이 중요한 코드
- 보안/성능이 critical한 작업
- 리팩토링 대규모 작업
❌ 이럴 땐 과함:
- 간단한 일회성 수정
- 프로토타입/실험 코드
- 개인 학습용 간단한 예제
실전 팁
💡 Tip 1: 모델 선택
- gpt-5: 빠른 일반 작업
- gpt-5-codex: 복잡한 코드 분석 (권장)
💡 Tip 2: Reasoning Effort
- low: 간단한 검증
- medium: 일반적인 작업 (권장)
- high: critical한 로직, 보안 관련
💡 Tip 3: 역할 분담
Claude: 모든 코드 작성 및 수정
Codex: 모든 검증 및 리뷰💡 Tip 4: 반복 주기
구현 → 리뷰 → 수정 → 재검증
작은 변경: 1회 리뷰
중간 변경: 2-3회 반복
큰 변경: 완전 검증까지 반복실제 워크플로우 예시
1. 👤 "결제 시스템 만들어줘"
2. 🤖 Claude가 계획 수립
- Stripe API 통합
- 웹훅 처리
- 환불 로직
3. 🤖 Codex로 계획 검증
$ codex exec ... --sandbox read-only
4. 📝 피드백: "웹훅 서명 검증 추가 필요"
5. 🤖 Claude가 계획 수정
6. ✅ 재검증 통과
7. 🔨 Claude가 구현
Edit/Write 도구로 코드 작성
8. 👀 Codex가 코드 리뷰
$ codex exec ... --sandbox read-only
"성능 이슈 1개, 보안 개선 2개"
9. 🔧 Claude가 피드백 반영
Edit 도구로 코드 수정
10. ✅ Codex 재검증
$ codex exec resume --last
"모든 이슈 해결됨!"
11. ✅ 완료!핵심은 "계획 → 검증 → 구현 → 리뷰 → 수정 → 재검증" 루프입니다! 🔄