Back to skills
SKILL.md
Codex Review
ASecurityRead-only code review & fix loop: lean plugin-stripped Codex CLI reviews while Antigravity fixes and verifies to `APPROVED_NO_ISSUES`. Use for Codex review, `codex-review`, or auto-review and fix changes with Codex; not feature builds (`codex`).
- 2 stars
- 0 votes
- 0 copies
- 0 views
- Added December 3, 2026
Works with
Security analysis
100/100npx -y skills add hothiennhan021/ai-review-skills --skill codex-review --agent claude-codeAre you the author of Codex Review?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/hothiennhan021-codex-review)---
name: codex-review
description: >-
Read-only code review & fix loop: lean plugin-stripped Codex CLI reviews while
Antigravity fixes and verifies to `APPROVED_NO_ISSUES`. Use for Codex review,
`codex-review`, or auto-review and fix changes with Codex; not feature builds
(`codex`).
---
# Codex Strict Review & Fix Loop v3 (`codex-review`)
Engine: `$af = "$env:USERPROFILE\.gemini\config\ai-flow.ps1"` (fallback `"D:\ai-review-skills\scripts\ai-flow.ps1"`).
## 1. Core Mechanics (`MAX_ROUNDS = 8`)
- **Lean `exec -s read-only` + `slice-diff`**: Avoids `codex review <scope> [PROMPT]` CLI flag conflicts, strips global MCPs + 10 Desktop plugins (`-3k..8k` cold tokens/call), tracks untracked files via `< 40 ms` secret-safe snapshots, and slices inter-round deltas + 1-hop callers on `r >= 2`.
- **Static-Prefix + EOF Ledger**: Append status strictly at EOF of `.ai-workflow/ISSUES_LEDGER.md` (`-Action ledger-append`) for 75%–90% KV-cache hits. Fix all valid `[P0]`–`[P2]` issues hands-free; drop `-Effort` to `low` after `[P2]`-only fixes.
## 2. Autonomous Workflow
1. **Step 0 (Scope)**: Run `& $af -Action init`. `slice-diff` auto-detects dirty uncommitted changes, `-Base <branch>`, `-Commit <sha>` (ancestor-safe), or ahead-of-default commits (stop immediately if `(no changes)`).
2. **Step 1 (Slice, Pack & Review)**:
```powershell
& $af -Action slice-diff -Round $r [-Base $b] [-Commit $c] [-FullCumulative:$isFinalCheck]
$hdr = 'Strict read-only review. Check logic, edge cases, concurrency, security, regressions, and valid P2 nits. Respect FIXED/REJECTED ledger items. Emit ONLY APPROVED_NO_ISSUES, or 1-line JSONL: {"id":"F-01","s":"P0","f":"path:line","w":"trace","x":"fix"}.'
& $af -Action pack -Header $hdr -TailFile .ai-workflow/DIFF_SLICE.md -OutFile .ai-workflow/REVIEW_IN.md
& $af -Action ask-codex -Mode readonly -Effort medium -InFile .ai-workflow/REVIEW_IN.md -OutFile .ai-workflow/CODEX_OUT.md
```
*(PS 5.1 fallback: `cmd --% /d /s /c ""codex.exe" exec -s read-only --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_OUT.md - < .ai-workflow/REVIEW_IN.md > log.txt 2> err.log"`)*.
3. **Step 2 (Convergence Gate)**: On `APPROVED_NO_ISSUES`, if `r >= 2` used an inter-round delta (`cumLines > 300`), run 1 final `low`-effort check with `-FullCumulative`; else finish!
4. **Step 3 (Triage, Fix & Verify)**: Inspect real surrounding lines, `ledger-append` `FIXED(R$r)` or `REJECTED(1-line proof)`, apply batch fixes, and run `& $af -Action verify -CommandLine "<cmd>"` before looping (fail-fast on `r >= 8`, zero-diff deadlock, `A → B → A`, or quota/auth error).
**Report**: (1) Status & rounds, (2) Per-round fixes & rejected items, (3) Verification metrics.
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.