codex

Runs OpenAI Codex CLI for independent code review, adversarial challenge, and consult sessions.

Updated Sep 13, 2026
One-click install
npx skills add https://github.com/abdulazeezoj/monovella-poc --skill codex-abdulazeezoj
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codex
Source: https://github.com/abdulazeezoj/monovella-poc/tree/main/.agents/skills/gstack/codex
Command: npx skills add https://github.com/abdulazeezoj/monovella-poc --skill codex-abdulazeezoj

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires codex CLI, python3.

What problem does it solve? Getting a genuine second opinion on code changes is hard: self-review misses blind spots, and switching tools loses context. This Skill wraps the OpenAI Codex CLI so an AI coding session can request an independent diff review, an adversarial try-to-break-it pass, or a free-form consultation without leaving the workflow. ## Core Features & Use Cases - Review mode: Runs codex review --base <branch> against the current diff with a fail-closed pass/fail gate keyed on P0/P1 severity markers, plus a custom-instructions path via codex exec when a focus area is given. - Challenge mode: Sends the branch diff to Codex with an adversarial prompt that hunts edge cases, race conditions, security holes, and failure modes, streaming reasoning traces via JSONL parsing. - Consult mode: Asks Codex free-form questions or plan reviews with session continuity (resume via saved thread ID), embedding plan content directly since Codex is sandboxed to the repo root. - Use Case: Before merging a feature branch, run the review mode to get a gated verdict on the diff, then run challenge mode to attack the riskiest changes, and compare findings against the host model's own review with the cross-model analysis output. ## Quick Start Ask the assistant to run a codex review of the current branch diff against the base branch and report the gate verdict.

Frequently Asked Questions about codex

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I get a second opinion on a code diff with Codex CLI?

Run codex review with the --base flag pointed at your base branch so the CLI scopes the review to the branch diff. The skill gates the result: any P0 or P1 finding, empty output, or non-zero exit fails the gate.

How to run an adversarial code review that tries to break my code?

Use challenge mode, which sends the branch diff to codex exec with an adversarial prompt targeting edge cases, race conditions, security holes, and failure modes. Output streams as JSONL and is parsed to show reasoning traces and tool calls.

Can I pass custom instructions to codex review with a base branch?

No. The Codex CLI rejects a prompt argument alongside --base, --commit, or --uncommitted. The skill works around this by routing custom-instruction reviews through codex exec with the diff inlined between DIFF_START and DIFF_END markers.

Does codex exec resume save tokens compared to a new session?

No. Measured usage shows every codex exec call pays the full session prelude of roughly 21K tokens, and resume does not amortize it. Resume buys conversational continuity only, so batch questions into one call when possible.

Why does the codex review gate fail even with no critical findings?

The gate fails closed: a non-zero exit, empty output, or output without any P0/P1/P2 severity tags all count as FAIL because a clean pass cannot be mechanically verified. Only tagged output with exclusively P2 findings passes.

What happens when the Codex CLI stalls or times out?

A timeout wrapper fires before the harness gate, producing exit 124 with an explicit stall message naming common causes like model API stalls or network issues. The event is logged and the gate fails closed rather than reading silence as no findings.