From nickcrew-claude-ctx-plugin
Automates codex CLI code review remediation: classifies P0-P4 findings, fixes P0/P1 iteratively up to 3 cycles, defers P2-P4 to backlog, handles monorepos. Triggered by 'codex review'.
npx claudepluginhub nickcrew/claude-cortexThis skill uses the workspace's default tool permissions.
This skill orchestrates the complete remediation workflow for code under review by the codex agent. It handles:
Automates iterative code reviews using OpenAI Codex CLI with fix-and-review cycles until validation passes or limit reached. For features needing automated validation, security, and quality checks.
Performs code reviews for PRs, audits, and changes using Codex MCP. Outputs severity-grouped findings and merge gates. Variants: fast (diff), full (lint/build checks), branch.
Runs automated PR review loop until clean: internal subagents, fixes, external reviewers (Codex CLI/bot, Gemini). Also handles uncommitted changes on main via Codex CLI.
Share bugs, ideas, or general feedback.
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