npx claudepluginhub creator-hian/claude-code-plugins --plugin codex-pluginWant just this skill?
Then install: npx claudepluginhub u/[userId]/[slug]
Dual-AI engineering loop orchestrating Claude Code (planning/implementation) and Codex (validation/review). Use when (1) complex feature development requiring validation, (2) high-quality code with security/performance concerns, (3) large-scale refactoring, (4) user requests codex-claude loop or dual-AI review. Do NOT use for simple one-off fixes or prototypes.
This skill uses the workspace's default tool permissions.
VALIDATION.mdreferences/prompt-templates.mdCodex-Claude Engineering Loop
Workflow Overview
Plan (Claude) → Validate (Codex) → Implement (Claude) → Review (Codex) → Fix → Re-validate → Done
| Role | Responsibility |
|---|---|
| Claude | Architecture, planning, code implementation (Edit/Write/Read) |
| Codex | Validation, code review, quality assurance |
Environment Notice
Non-TTY environment: See codex-cli SKILL for CLI fundamentals. Key rule: Always use
codex execin Claude Code (notcodex)
Phase 0: Pre-flight Check
Before executing any Codex command:
- Create context directory:
mkdir -p .codex-loop
Add .codex-loop/ to your project's .gitignore to avoid committing session artifacts.
- Check Git Repository Status
git rev-parse --git-dir 2>/dev/null && echo "Git OK" || echo "Not a Git repo"
-
If NOT in Git repository, ask user via
AskUserQuestion:- "This directory is not a Git repository. Codex requires Git by default."
- Options:
- "Initialize Git repository here (
git init)" - "Use
--skip-git-repo-checkflag (bypass check)" - "Cancel operation"
- "Initialize Git repository here (
-
Apply user choice:
# Option 1: Initialize Git
git init
# Option 2: Use skip flag
codex exec --skip-git-repo-check -s read-only "prompt"
- Ask user via
AskUserQuestion:- Model preference (gpt-5.3-codex, gpt-5.2, gpt-5.1-codex-max, gpt-5-codex-mini)
- Reasoning effort level (low, medium, high, xhigh)
Phase 1: Planning (Claude)
- Create detailed implementation plan
- Break down into clear steps
- Document assumptions and risks
- Save to
.codex-loop/plan.md
Phase 2: Plan Validation (Codex)
Execute with timeout: 600000:
codex exec -m MODEL -c model_reasoning_effort=LEVEL -s read-only \
"Review this plan: $(cat .codex-loop/plan.md) Check: logic, edge cases, architecture, security"
Save result: > .codex-loop/phase2_validation.md
Phase 3: Feedback Loop
If issues found in .codex-loop/phase2_validation.md:
- Summarize Codex feedback to user
- Ask via
AskUserQuestion: "Revise and re-validate, or proceed?" - If revise → Update
.codex-loop/plan.md→ Repeat Phase 2
Phase 4: Implementation (Claude)
- Implement using Edit/Write/Read tools
- Execute step-by-step with error handling
- Save summary to
.codex-loop/implementation.md
Phase 5: Code Review (Codex)
Execute with timeout: 600000:
codex exec -m MODEL -s read-only \
"Review: $(cat .codex-loop/plan.md) $(cat .codex-loop/implementation.md) Check: bugs, performance, security. Classify: Critical/Major/Minor/Info"
Save result: > .codex-loop/phase5_review.md
Claude response by severity:
- Critical → Fix immediately
- Architectural → Discuss with user
- Minor → Document and proceed
Phase 6: Iteration
- Apply fixes from
.codex-loop/phase5_review.md - Significant changes → Re-validate with Codex
- Use
codex exec resumefor session continuity - Loop until quality standards met
Context Files
.codex-loop/
├── plan.md # Implementation plan
├── phase2_validation.md # Plan validation result
├── implementation.md # Implementation summary
├── phase5_review.md # Code review result
└── iterations.md # Iteration history
Quick Reference
Always use timeout: 600000 (10 min) for all Codex commands.
Models, reasoning effort, options: See codex-cli SKILL
Error Handling
Full error reference: See codex-cli SKILL
Error Recovery Flow:
- Non-zero exit → Stop and report error message
- Summarize error via
AskUserQuestion - Confirm with user before: architectural changes, multi-file mods,
--skip-git-repo-check
Timeout Configuration
| Task Type | Recommended Timeout | Claude Code Tool |
|---|---|---|
| All Codex operations | 10 minutes | timeout: 600000 |
Approval modes: See codex-cli SKILL - valid values:
untrusted,on-failure,on-request,never
Best Practices
- Always use
codex execin Claude Code environment (non-TTY) - Always create
.codex-loop/directory at start - Always save outputs to context files for traceability
- Always validate plans before implementation
- Never skip review after changes
- Default to
-s read-onlyfor all reviews - Use
resumefor session continuity - Check Git status before first Codex command
- Ask user permission before using
--skip-git-repo-check - Set 10-minute timeout for all Codex exec commands (
timeout: 600000)
References
- Prompt templates & context file formats: See references/prompt-templates.md
- Codex CLI fundamentals: See codex-cli SKILL (models, options, error handling)
Similar Skills
Expert guidance for Next.js Cache Components and Partial Prerendering (PPR). **PROACTIVE ACTIVATION**: Use this skill automatically when working in Next.js projects that have `cacheComponents: true` in their next.config.ts/next.config.js. When this config is detected, proactively apply Cache Components patterns and best practices to all React Server Component implementations. **DETECTION**: At the start of a session in a Next.js project, check for `cacheComponents: true` in next.config. If enabled, this skill's patterns should guide all component authoring, data fetching, and caching decisions. **USE CASES**: Implementing 'use cache' directive, configuring cache lifetimes with cacheLife(), tagging cached data with cacheTag(), invalidating caches with updateTag()/revalidateTag(), optimizing static vs dynamic content boundaries, debugging cache issues, and reviewing Cache Component implementations.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.