Skip to main content

use-codex-cli

Stars11
Forks2
UpdatedJuly 11, 2026 at 18:43

Authoritative guide for driving the OpenAI Codex CLI (the `codex` binary and `codex exec`) as a subprocess from another agent โ€” for repository analysis, focused implementation, independent code review, debugging, structured JSON extraction, and multi-turn delegation. Use this skill whenever you are about to run or script `codex` โ€” codex exec, codex exec review, codex exec resume, or codex mcp-server โ€” and whenever the user says "use Codex", "ask Codex", "get a second opinion from Codex", "have Codex review this", or "delegate this to Codex". Covers non-interactive invocation, the exact per-subcommand flag positions, the sandbox and project-trust model, JSONL and last-message and JSON-schema output, session resume, exit codes, and verifying Codex's work. Consult BEFORE writing the command because flag placement and sandbox choice change what Codex can do and whether the call parses. Do not invoke for trivial work the agent can do directly, and never launch the bare `codex` TUI from automation.

Installation

Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.

File Explorer
15 files
SKILL.md
readonly