Back to skills
SKILL.md
Codex
ASecurityDual-model build pipeline: Gemini designs, pre-slices context & reviews while Codex CLI implements and verifies (zero Gemini code edits). Use for `codex`, "gọi codex", "nhờ codex làm", "codex làm chính"; not review-only (`codex-review`).
- 2 stars
- 0 votes
- 0 copies
- 1 view
- Added December 3, 2026
Works with
Security analysis
100/100npx -y skills add hothiennhan021/ai-review-skills --skill codex --agent claude-codeAre you the author of Codex?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/hothiennhan021-codex)---
name: codex
description: >-
Dual-model build pipeline: Gemini designs, pre-slices context & reviews while
Codex CLI implements and verifies (zero Gemini code edits). Use for `codex`,
"gọi codex", "nhờ codex làm", "codex làm chính"; not review-only
(`codex-review`).
---
# Gemini ↔ Codex v3 (`codex`)
Engine: `$af = "$env:USERPROFILE\.gemini\config\ai-flow.ps1"` (fallback `"D:\ai-review-skills\scripts\ai-flow.ps1"`). **Gemini NEVER edits project source files.**
## 1. Roles & Lean Codex Bindings
- **Gemini (YOU)**: Chief Brain, `0`-token Context Slicer (`map -Targets` cuts Codex shell turns by 50%–75%), and Final Reviewer.
- **Codex (`ask-codex`)**: Plugin/MCP-stripped worker (`-Mode write`) & sanity critic (`-Mode readonly`).
- *(PS 5.1 fallback: `cmd --% /d /s /c ""codex.exe" exec -s workspace-write -c "approval_policy='never'" --ephemeral -c "mcp_servers={}" -c "plugins={}" -c "notify=[]" --disable plugins --disable apps --disable browser_use --disable computer_use --disable image_generation -c "model_reasoning_effort='medium'" -o .ai-workflow/CODEX_REPORT.md - < in.md > log.txt 2> err.log"` — never use removed `--full-auto`)*.
## 2. Autonomous Workflow (`.ai-workflow/`)
1. **Phase 0 & 1 (Map & Wave Spec)**:
- Run `& $af -Action init` and `map -Targets <files>` (`flash` subagent on large repos to stay `< 35k` context), then write `.ai-workflow/REQUIREMENTS.md`.
- **Fast-Path (`<= 2` files)**: Lock `DESIGN_SPEC.md` (`M1`) → Phase 2.
- **Full Mode (`> 2` files)**: Draft `DESIGN_DRAFT.md` (`## Global Invariants & Shared Contracts`, `## Milestone M1..Mk` with disjoint `owned_files`), run 1 `ask-codex -Mode readonly -Effort low` critique, and lock `DESIGN_SPEC.md`.
2. **Phase 2 (Codex Build & Gemini Review, `MAX_ROUNDS = 6`)**:
- **Single task**: `pack -SpecFile .ai-workflow/DESIGN_SPEC.md -Milestone Mi` + `REPO_MAP.md + TARGET_SLICE.md` → `ask-codex -Mode write`.
- **Parallel Wave tasks**: `wave-init -WaveTask <id>` → concurrent `codex.exe` workers in detached worktrees → `wave-merge -WaveTask <id> -OwnedFiles <list>`.
- **Review**: Run `-Action verify` and `slice-diff -Round $k` (includes 1-hop callers). Inspect against `DESIGN_SPEC.md` + `ISSUES_LEDGER.md`; if clean → mark `MILESTONE_APPROVED` in `STATE.md`; else `ledger-append`, write `FIX_PLAN.md`, `pack`, and re-run `ask-codex -Mode write`.
3. **Phase 3 (Sign-Off)**: Full `-Action verify` + `-FullCumulative` diff check against `REQUIREMENTS.md` → `PROJECT_COMPLETE` in `STATE.md` (fail-fast on quota/auth error or `A → B → A` churn).
Attribution
Related skills
View all in ai-agents →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.