From ai4ss-skills
Delegates coding tasks to OpenAI Codex CLI (GPT-5.3-codex) for second opinions, sandboxed execution, and automated code editing. Supports session resume/fork and structured JSON output.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ai4ss-skills:codexThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Codex CLI is OpenAI's terminal-based coding agent. This skill delegates tasks to it via `codex exec` (non-interactive mode), where Claude constructs the command and summarizes the result.
Codex CLI is OpenAI's terminal-based coding agent. This skill delegates tasks to it via codex exec (non-interactive mode), where Claude constructs the command and summarizes the result.
Attribution: This skill builds upon the original codex skill by @davila7. Key additions: updated model table (GPT-5.3-codex), streamlined interaction (no AskUserQuestion overhead), additional CLI flags documentation, and bilingual trigger support.
| Task | Sandbox | Command Pattern |
|---|---|---|
| Analysis / review | read-only | codex exec --skip-git-repo-check -s read-only "prompt" 2>/dev/null |
| Apply edits | workspace-write | codex exec --skip-git-repo-check --full-auto "prompt" 2>/dev/null |
| Network / broad access | danger-full-access | codex exec --skip-git-repo-check -s danger-full-access --full-auto "prompt" 2>/dev/null |
Always include --skip-git-repo-check — Codex normally requires a git repo, but we're running it from within Claude Code's working directory where this check can fail.
Always append 2>/dev/null — Codex streams thinking/progress tokens to stderr. Suppressing stderr keeps Claude's output clean. Only show stderr when debugging.
Use --full-auto when the task involves edits — it enables workspace-write sandbox with automatic approval for file changes. Without it, Codex pauses for approval that nobody can give in non-interactive mode.
Default model: gpt-5.3-codex with xhigh reasoning effort. Override with -m <model> or --config model_reasoning_effort="<level>".
codex exec --skip-git-repo-check \
-m gpt-5.3-codex \
--config model_reasoning_effort="xhigh" \
-s read-only \
"Review code/R/processing.R for potential bugs and edge cases" \
2>/dev/null
Use -C <DIR> to run Codex in a different directory:
codex exec --skip-git-repo-check -C /path/to/project --full-auto "fix the failing tests" 2>/dev/null
Codex persists sessions. To continue a previous one:
# Pass prompt as argument (preferred):
codex exec --skip-git-repo-check resume --last "now fix the edge cases you found" 2>/dev/null
# Or pipe via stdin:
echo "now fix the edge cases" | codex exec --skip-git-repo-check resume --last 2>/dev/null
--last resumes the most recent session in the current directory. Add --all to search across directories.exec and resume.| Model ID | Role | API Pricing (input/output per 1M tokens) |
|---|---|---|
gpt-5.3-codex | Flagship — best agentic coding | $1.75 / $14.00 |
gpt-5.3-codex-spark | Near-instant realtime (Pro only) | — |
gpt-5.2-codex | Previous gen, still capable | $1.75 / $14.00 |
gpt-5.1-codex-max | Extended reasoning | $1.25 / $10.00 |
gpt-5.1-codex | Older flagship | $1.25 / $10.00 |
All models support 400K context. Cached input gets 90% discount ($0.175/M for 5.3-codex).
Reasoning effort: --config model_reasoning_effort="<level>"
xhigh — deep analysis (default)high — refactoring, architecturemedium — standard feature worklow — formatting, docs, quick fixes| Flag | Purpose |
|---|---|
--json | JSONL event stream — useful for parsing Codex output programmatically |
-o <path> | Write final assistant message to a file |
--output-schema <path> | Constrain response to a JSON Schema |
-i <image> | Attach image(s) to prompt |
--search | Enable live web search |
--ephemeral | Don't persist session (one-off tasks) |
--add-dir <path> | Grant write access to additional directories beyond workspace |
codex exec exits non-zero, report the error and ask for direction — do not retry automatically.--full-auto or danger-full-access, confirm with the user unless they already granted permission.npx claudepluginhub siyaozheng/ai4ss-skills --plugin ai4ss-skillsRuns Codex CLI tasks with configurable model, reasoning effort, and sandbox mode. Handles session resume and stdin redirection to prevent hangs.
Use when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing
Delegates complex code generation, refactoring, architectural analysis, and review tasks to OpenAI's Codex CLI (GPT-5.3-codex models) via safe workflows with sandboxing and approvals. Activates on explicit triggers like 'use codex' or 'codex exec'.