codex-claude-cursor-loop
from bear2u/my-skills
자주 사용하는 스킬들을 모은 나의 클로드 스킬들입니다.
704 stars187 forksUpdated Jan 9, 2026
npx skills add https://github.com/bear2u/my-skills --skill codex-claude-cursor-loopSKILL.md
Codex-Claude-Cursor Engineering Loop Skill
Core Workflow Philosophy
This skill implements a 3-way sequential validation engineering loop:
- Claude Code: Architecture and planning, final review
- Codex: Plan validation (logic/security), code review (bugs/performance)
- Cursor Agent: Code implementation and execution
- Sequential Validation: Claude plans → Codex validates → Cursor implements → Codex reviews → Claude final check → repeat
Phase 1: Planning with Claude Code
- Start by creating a detailed plan for the task
- Break down the implementation into clear steps
- Document assumptions and potential issues
- Output the plan in a structured format
Phase 2: Plan Validation with Codex
- Ask user (via
AskUserQuestion):- Model:
gpt-5orgpt-5-codex - Reasoning effort:
low,medium, orhigh
- Model:
- 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 <model> --config model_reasoning_effort="<effort>" --sandbox read-only
- Capture Codex's feedback and summarize to user
Phase 3: Plan Refinement Loop
If Codex finds issues in the plan:
- Summarize Codex's concerns to the user
- Refine the plan based on feedback
- Ask user (via
AskUserQuestion): "Should I revise the plan and re-validate, or proceed with implementation?" - Repeat Phase 2 if needed until plan is solid
Phase 4: Implementation with Cursor Agent
Once the plan is validated by Codex:
Session Management
-
Ask user (via
AskUserQuestion): "Do you want to start a new Cursor session or resume an existing one?"- New session: Start fresh
- Resume session: Continue previous work
-
If resuming:
# List available sessions
cursor-agent ls
# Let user select session ID
# Store session ID for subsequent calls
- Ask user (via
AskUserQuestion): Which Cursor model to use (e.g.,composer-1,claude-3.5-sonnet,gpt-4o)
Implementation
- Send the validated plan to Cursor Agent:
For new session:
cursor-agent --model "<model-name>" -p --force "Implement this plan:
[Validated plan here]
Please implement the code following these specifications exactly."
For resumed session:
cursor-agent --resume="<session-id>" -p --force "Continue implementation:
[Validated plan here]"
- IMPORTANT: Store the session ID from the output for all subsequent Cursor calls
- Capture what was implemented and which files were modified
Phase 5: Codex Code Review
After Cursor implements:
- Send Cursor's implementation to Codex for code review:
echo "Review this implementation for:
- Bugs and logic errors
- Performance issues
- Security vulnerabilities
- Best practices violations
- Code quality concerns
Files modified: [list of files]
Implementation summary: [what Cursor did]" | codex exec --sandbox read-only
- Capture Codex's code review feedback
- Summarize findings to user
Phase 6: Claude's Final Review
After Codex code review:
- Claude reads the implemented code using Read tool
- Claude analyzes both:
- Codex's review findings
- The actual implementation
- Claude provides final assessment:
- Verify if it matches the original plan
- Confirm Codex's findings are valid
- Identify any additional concerns
- Make final architectural decisions
- Summarize overall quality and readiness
Phase 7: Iterative Improvement Loop
If issues are found (by Codex or Claude):
- Claude creates a detailed fix plan based on:
- Codex's code review findings
- Claude's final review insights
- Send the fix plan to Cursor Agent using the same session:
# IMPORTANT: Use --resume with the stored session ID
cursor-agent --resume="<session-id>" -p --force "Fix these issues:
[Detailed fix plan]
Issues from Codex: [list]
Issues from Claude: [list]"
- After Cursor fixes, repeat from Phase 5 (Codex code review)
- Continue the loop until all validations pass
- Note:
- Use same Codex model for consistency
- Always use the same Cursor session ID to maintain context
- Session maintains full history of changes
Recovery When Issues Are Found
When Codex finds plan issues (Phase 2):
- Claude analyzes Codex's concerns
- Refines the plan addressing all issues
- Re-submits to Codex for validation
- Repeats until Codex approves
When Codex finds code issues (Phase 5):
- Claude reviews Codex's findings
- Creates detailed fix plan
- Sends to Cursor for fixes
- After Cursor fixes, back to Codex review
- Repeats until Codex approves
When Claude finds issues (Phase 6):
- Claude creates comprehensive fix plan
- Sends to Cursor for implementation
- After fixes, Codex reviews again
- Claude does final check
- Repeats u
...
Repository
bear2u/my-skillsParent repository
Repository Stats
Stars704
Forks187