MCPInstall

codex-claude-cursor-loop

Orchestrates a triple-AI engineering loop where Claude plans, Codex validates logic and reviews code, and Cursor implements, with continuous feedback for optimal code quality

Installs
47
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/bear2u/my-skills --skill codex-claude-cursor-loop
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads codex-claude-cursor-loop automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

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

  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-5 or gpt-5-codex
    • Reasoning effort: low, medium, or high
  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 <model> --config model_reasoning_effort="<effort>" --sandbox read-only
  1. Capture Codex's feedback and summarize to user

Phase 3: Plan Refinement Loop

If Codex finds issues in the plan:

  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 implementation?"
  4. Repeat Phase 2 if needed until plan is solid

Phase 4: Implementation with Cursor Agent

Once the plan is validated by Codex:

Session Management

  1. 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
  2. If resuming:

   # List available sessions
   cursor-agent ls

   # Let user select session ID
   # Store session ID for subsequent calls
  1. Ask user (via AskUserQuestion): Which Cursor model to use (e.g., composer-1, claude-3.5-sonnet, gpt-4o)

Implementation

  1. 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]"
  1. IMPORTANT: Store the session ID from the output for all subsequent Cursor calls
  2. Capture what was implemented and which files were modified

Phase 5: Codex Code Review

After Cursor implements:

  1. 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
  1. Capture Codex's code review feedback
  2. Summarize findings to user

Phase 6: Claude's Final Review

After Codex code review:

  1. Claude reads the implemented code using Read tool
  2. Claude analyzes both:
    • Codex's review findings
    • The actual implementation
  3. 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
  4. Summarize overall quality and readiness

Phase 7: Iterative Improvement Loop

If issues are found (by Codex or Claude):

  1. Claude creates a detailed fix plan based on:
    • Codex's code review findings
    • Claude's final review insights
  2. 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]"
  1. After Cursor fixes, repeat from Phase 5 (Codex code review)
  2. Continue the loop until all validations pass
  3. 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):

  1. Claude analyzes Codex's concerns
  2. Refines the plan addressing all issues
  3. Re-submits to Codex for validation
  4. Repeats until Codex approves

When Codex finds code issues (Phase 5):

  1. Claude reviews Codex's findings
  2. Creates detailed fix plan
  3. Sends to Cursor for fixes
  4. After Cursor fixes, back to Codex review
  5. Repeats until Codex approves

When Claude finds issues (Phase 6):

  1. Claude creates comprehensive fix plan
  2. Sends to Cursor for implementation
  3. After fixes, Codex reviews again
  4. Claude does final check
  5. Repeats until Claude approves

Best Practices

  • Always validate plans with Codex before implementation
  • Never skip Codex code review after Cursor implements
  • Never skip Claude's final review for architectural oversight
  • Maintain clear handoff between all three AIs
  • Document who did what for context
  • Use same models throughout (same Codex model, same Cursor model)
  • Session Management:
    • Always use --resume with same session ID for iterative fixes
    • Store session ID at the start and reuse throughout
    • Use cursor-agent ls to find previous sessions
    • Only start new session when beginning completely new feature

Command Reference

PhaseWhoCommand PatternPurpose
1. PlanClaudeTodoWrite, Read, analysis toolsClaude creates detailed plan
2. Validate planCodexecho "plan" | codex exec -m <model> --config model_reasoning_effort="<effort>" --sandbox read-onlyCodex validates logic/security
3. RefineClaudeAnalyze Codex feedback, update planClaude fixes plan issues
4. Session setupClaude + UserAsk new/resume, cursor-agent ls if neededSetup or resume Cursor session
5. ImplementCursorcursor-agent --model "<model>" -p --force "prompt" OR cursor-agent --resume="<id>" -p --force "prompt"Cursor implements validated plan
6. Review codeCodexecho "review" | codex exec --sandbox read-onlyCodex reviews for bugs/performance
7. Final reviewClaudeRead tool, analysisClaude final architectural check
8. Fix planClaudeCreate detailed fix planClaude plans fixes from all feedback
9. Apply fixesCursorcursor-agent --resume="<id>" -p --force "fixes"Cursor implements fixes in same session
10. Re-reviewCodex + ClaudeRepeat phases 6-7Validate fixes until perfect

Error Handling

  1. Monitor Cursor Agent output for errors
  2. Summarize Cursor's implementation results and Claude's review
  3. Ask for user direction via AskUserQuestion if:
    • Significant architectural changes needed
    • Multiple files will be affected
    • Breaking changes are required
  4. When issues appear, Claude creates a detailed fix plan before sending to Cursor

The Perfect Loop

1. Plan (Claude)
   ↓
2. Validate Plan (Codex) → if issues → refine plan → repeat
   ↓
3. Implement (Cursor)
   ↓
4. Code Review (Codex) → captures bugs/performance issues
   ↓
5. Final Review (Claude) → architectural check
   ↓
6. Issues found? → Fix Plan (Claude) → Implement Fixes (Cursor) → back to step 4
   ↓
7. All passed? → Done! ✅

This creates a triple-validation, self-correcting, high-quality engineering system where:

  • Claude: All planning, architecture, and final oversight
  • Codex: All validation (plan logic + code quality)
  • Cursor Agent: All implementation and coding

FAQ

What does the codex-claude-cursor-loop skill do?

Orchestrates a triple-AI engineering loop where Claude plans, Codex validates logic and reviews code, and Cursor implements, with continuous feedback for optimal code quality

How do I install codex-claude-cursor-loop?

Run npx skills add https://github.com/bear2u/my-skills --skill codex-claude-cursor-loop in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/codex-claude-cursor-loop/ (personal) or .claude/skills/codex-claude-cursor-loop/ (project).

Which AI agents can use codex-claude-cursor-loop?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is codex-claude-cursor-loop safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains codex-claude-cursor-loop?

It is published by bear2u in bear2u/my-skills. It has 47 recorded installs.

More from bear2u/my-skills

View all →

landing-page-guide-v2

bear2u/my-skills

Create distinctive, high-converting landing pages that combine proven conversion elements with exceptional design quality. Build beautiful, memorable landing pages using Next.js 14+ and ShadCN UI that avoid generic AI aesthetics while following the 11 essential elements framework.

Frontend & Design1.3K installs

card-news-generator-v2

bear2u/my-skills

Create 600x600 Instagram-style card news series automatically with optional background images. User provides topic, colors, and optional images - Claude generates content and creates multiple cards with proper text wrapping.

Media & Creative211 installs

landing-page-guide

bear2u/my-skills

Comprehensive guide for creating effective landing pages using Next.js or React. This skill should be used when users request to create landing pages, marketing pages, or product pages that require the 11 essential elements for high-converting landing pages. Specifically designed for Next.js 14+ App Router with ShadCN UI components.

codex-claude-loop

bear2u/my-skills

Orchestrates a dual-AI engineering loop where Claude Code plans and implements, while Codex validates and reviews, with continuous feedback for optimal code quality

73 installs

gemini-logo-remover

bear2u/my-skills

Remove Gemini logos, watermarks, or AI-generated image markers using OpenCV inpainting. Use this skill when the user asks to remove Gemini logo, AI watermark, or any logo/watermark from images.

AI & Agents64 installs

Advanced 7-step hierarchical design prompt generator for AI web development tools (Lovable, Cursor, Bolt). Generates domain-aware, user-journey-based design prompts with emotional design considerations. Triggers on "디자인 프롬프트", "웹 디자인", "Lovable 프롬프트", "랜딩페이지 만들어줘", or any AI web builder prompt requests.

AI & Agents62 installs

Popular other skills

View category →

hyperframes-cli

heygen-com/hyperframes

The HyperFrames CLI by job - scaffold, check, look at frames, edit the timeline, preview, render locally or in the cloud, publish, project history - plus reading its JSON and recovering from build or render failures.

1.3M installs

triage

mattpocock/skills

Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.

1M installs

ask-matt

mattpocock/skills

Ask which skill or flow fits your situation. A router over the skills in this repo.

778.4K installs

to-questionnaire

mattpocock/skills

Turn a decision you can't fully answer into a questionnaire for someone else to fill in.

508.9K installs

wait-what

mattpocock/skills

Stop. That last message did not land: re-pitch it.

459.7K installs

loop-me

mattpocock/skills

Grill me about specs for the workflows I want to build, within this workspace.

447.9K installs