skills/codex-code-review/SKILL.md
Automate code review remediation loops with the codex CLI. Requests reviews from codex, classifies findings by severity (P0-P4), fixes critical issues (P0/P1) through iterative cycles, defers quality improvements to backlog, and escalates after 3 review cycles. Use when working with code that needs structured remediation: 'codex review' in a request triggers this workflow.
npx skillsauth add nickcrew/claude-cortex codex-code-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill orchestrates the complete remediation workflow for code under review by the codex agent. It handles:
codex --full-auto c CLIorigin:ai-review labelsTrigger this skill when code requires codex review. Common usage patterns:
Do not trigger on questions. Only activate for direct review requests.
ENTRY: User requests codex review or skill is triggered by "codex review" in a message
┌──────────────────────────┐
│ 1. INVOKE CODEX REVIEW │ ← Run: codex --full-auto c [--uncommitted|--commit <SHA>|--base <BRANCH>]
└──────┬───────────────────┘ Output goes to .agent/reviews/review-<timestamp>.md
│
▼
┌──────────────────────────┐
│ 2. READ & PARSE REVIEW │ ← Read markdown file, extract P0/P1/P2-P4 findings and verdict
└──────┬───────────────────┘
│
├─────────────────────────────────────────┐
│ │
▼ ▼
ANY P0/P1? NO FILE P2-P4 ISSUES → Exit loop
│ (via backlog CLI)
│ YES Create issue per finding with
│ - label: origin:ai-review
┌────────────────┐ - Implementation plan
│ 3. REMEDIATE │ - Priority (P2 or P3)
│ P0/P1 FINDINGS │
└────┬───────────┘
│ (amend commit or new changes)
│
▼
┌──────────────────────┐
│ 4. LOOP CHECK │
│ Cycle count < 3? │
└────┬───────────────┬─┘
│ YES │ NO
│ └─→ SUMMARIZE & ASK USER TO CONTINUE
│ (or exit if user declines)
▼
Re-run codex review (step 1, same files/scope)
Loop back to step 2
For each P2/P3 finding, decide:
remediationP2 or P3origin:ai-reviewExamples:
# P2 finding deferred to backlog
backlog task create "Code clarity: add docstring to validateInput()" \
-d "Review finding: missing documentation on public function" \
-l remediation -p 2 \
--ac "Add docstring explaining parameter types and return value" \
--plan "Add JSDoc comment above function definition per project style"
Exit the loop. Code is clean. Proceed to test review (if applicable) or commit for merge.
In a monorepo with multiple agents, be selective about what you commit and what scope you review.
If the working directory has ONLY your changes:
codex --full-auto c --uncommitted
Commit your changes once review loop completes.
If there are untracked or uncommitted changes from other agents:
git add <your-files-only>
git commit -m "Your commit message"
codex --full-auto c --commit <SHA>
git add <fixed-files>
git commit --amend --no-edit
(Preserve the original message; the amend adds the fixes)Result: One clean commit with your changes and fixes. Other agents' work remains separate.
.agent/reviews/review-<timestamp>.md (relative to project root)codex --full-auto c invocationSee references/codex-cli-reference.md for:
--uncommitted vs. --commit vs. --baseSee references/review-format.md for:
See references/backlog-integration.md for:
See scripts/parse_codex_review.sh for:
After 3 review cycles, if P0/P1 findings persist:
Escalation usually indicates the original task spec needs clarification or the code requires architectural changes beyond remediation scope.
backlog task create with origin:ai-review label1. User: "codex review"
│
▼
2. Invoke: codex --full-auto c --uncommitted
│
▼
3. Read: .agent/reviews/review-<timestamp>.md
│
├─────────────────────────────────────────┐
▼ ▼
P0/P1 FOUND? NO FILE P2-P4 ISSUES
├─ YES: Fix + Loop ────────────────► backlog task create ... --plan "..."
└─ NO: File P2-P4 → Exit (each finding = one issue)
│
├─ Cycle 1 → Fix → Review
├─ Cycle 2 → Fix → Review
├─ Cycle 3 → Fix → Review
│
└─ If P0/P1 remain → Summarize + Ask User
│
└─► Continue? (rare) / Stop & Escalate
development
Product vision, roadmap development, and go-to-market execution with structured prioritization frameworks. Use when evaluating features, planning product direction, or assessing market fit.
development
Complete operational workflow for implementer agents (Codex, Gemini, etc.) making code changes and writing tests. Drives all work through atomic commits — each loop operates on the smallest complete, reviewable change. Defines the Code Change Loop, Test Writing Loop, Lint Gate, and Issue Filing process with circuit breakers, severity levels, and escalation rules. Requires `cortex git commit` for all commits. Includes bundled provider-aware review scripts that keep same-model shell-outs as the last resort, plus a fresh-context Codex fallback for code review and test audit. Use this skill when starting any implementation task.
development
Use this skill when writing product requirements documents, prioritizing features, creating user stories, defining acceptance criteria, or setting product metrics. Trigger phrases: 'write a PRD for', 'prioritize this feature backlog', 'write user stories for', 'help me define acceptance criteria', 'what metrics should we track for'. Not for writing code, designing UI mockups, or conducting user research interviews.
tools
Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.