.claude/skills/codex-cli/SKILL.md
Run OpenAI Codex CLI for coding tasks and second-opinion audits. Use when a user asks to run/ask/use Codex, says "codex prompt", or wants Claude to delegate a logic/code review to OpenAI models.
npx skillsauth add georgekhananaev/claude-skills-vault codex-cliInstall 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.
Run OpenAI Codex CLI locally for second-opinion audits, code review, and non-interactive task execution.
Codex CLI must be installed and authenticated:
npm install -g @openai/codexcodex logincodex --versionUse codex exec for delegated prompts (non-interactive):
codex exec "Your prompt here"
When the user says "codex prompt", treat it as:
codex exec "<user prompt>"
Prefer gpt-5.4 unless the user asks for a different model.
Default reasoning effort is medium. Only escalate when explicitly needed:
medium for most coding, reviews, refactors, second-opinion audits, and one-off taskshigh only for: repeated/failing tasks that need deeper analysis, complex multi-step planning, or when the user explicitly asks for deeper reasoningcodex exec -c 'model="gpt-5.4"' -c 'model_reasoning_effort="medium"' "Your prompt"
Fallback note:
gpt-5.4 is unavailable, fall back to the newest available GPT-5 or Codex modelThese rules prevent CLI errors. Follow them exactly.
codex exec-m flag works: codex exec -m gpt-5.4 "prompt"-c config overrides work: codex exec -c 'model="gpt-5.4"' "prompt"- replaces the prompt — do NOT pass both - and a quoted prompt stringcat file.txt | codex exec -s read-only -c 'model="gpt-5.4"' -cat file.txt | codex exec -s read-only - "Some extra prompt" (two positional args)codex review-m flag does NOT work with codex review — use -c 'model="gpt-5.4"' instead--commit <SHA> and [PROMPT] are MUTUALLY EXCLUSIVE — cannot combine them--base <BRANCH> and [PROMPT] CAN be combined--uncommitted and [PROMPT] CAN be combinedcodex review --commit abc123 "Review for security" (will error)codex review --commit abc123 -c 'model="gpt-5.4"'codex review --base main "Focus on security"Since --commit cannot take a prompt, pipe the diff to codex exec instead:
git diff <SHA>~1..<SHA> > /tmp/diff.txt && cat /tmp/diff.txt | codex exec -s read-only -c 'model="gpt-5.4"' -c 'model_reasoning_effort="medium"' -
This is the recommended pattern for reviewing specific commits with custom review instructions.
# Basic task (default model + medium effort)
codex exec -c 'model="gpt-5.4"' -c 'model_reasoning_effort="medium"' "Audit this logic for edge cases"
# Full-auto mode (sandboxed, lower friction)
codex exec --full-auto -c 'model="gpt-5.4"' -c 'model_reasoning_effort="medium"' "Implement the requested refactor"
# Read-only sandbox (analysis only)
codex exec -s read-only -c 'model="gpt-5.4"' -c 'model_reasoning_effort="medium"' "Find bugs in this code path"
# Workspace-write sandbox
codex exec -s workspace-write -c 'model="gpt-5.4"' -c 'model_reasoning_effort="medium"' "Apply the fix and update tests"
# Custom working directory
codex exec -C /path/to/project -c 'model="gpt-5.4"' "Evaluate this repository"
# Save final output to file
codex exec -o output.txt -c 'model="gpt-5.4"' "Summarize key risks"
# Pipe context from stdin (no additional prompt argument!)
cat context.txt | codex exec -s read-only -c 'model="gpt-5.4"' -c 'model_reasoning_effort="medium"' -
# Pipe diff for commit review with custom instructions
git diff HEAD~1..HEAD > /tmp/diff.txt && cat /tmp/diff.txt | codex exec -s read-only -c 'model="gpt-5.4"' -c 'model_reasoning_effort="medium"' -
Use codex review for repository diffs. Model must be set via -c, not -m.
# Review uncommitted changes
codex review --uncommitted -c 'model="gpt-5.4"' -c 'model_reasoning_effort="medium"'
# Review against a base branch
codex review --base main -c 'model="gpt-5.4"' -c 'model_reasoning_effort="medium"'
# Review a specific commit (NO prompt allowed with --commit)
codex review --commit abc123 -c 'model="gpt-5.4"' -c 'model_reasoning_effort="medium"'
# Custom review instructions (only with --base or --uncommitted, NOT --commit)
codex review --uncommitted -c 'model="gpt-5.4"' "Focus on security issues"
codex review --base main -c 'model="gpt-5.4"' "Check for performance regressions"
--search and -a/--ask-for-approval are top-level flags. Put them before exec or review.
Correct:
codex --search -a on-request exec "Your prompt"
codex --search -a on-request review --uncommitted
WRONG:
codex exec --search "Your prompt"
codex exec -a on-request "Your prompt"
| Flag | Description |
|------|-------------|
| -c 'model="gpt-5.4"' | Set model (works everywhere, preferred over -m) |
| -m | Model shorthand (works with exec only, NOT review) |
| -s | Sandbox: read-only, workspace-write, danger-full-access |
| -a | Approval policy (top-level flag, before subcommand) |
| -C | Working directory |
| -o | Write last message to file |
| --full-auto | Sandboxed auto-execution (-a on-request -s workspace-write) |
| --json | JSONL event output |
| --search | Enable web search tool (top-level flag) |
| --add-dir | Additional writable directories |
| -c key=value | Override any config value |
medium reasoning effort — it covers most use cases wellhigh for repeated failures, complex planning, or explicit user requestcodex exec for delegated prompts instead of interactive codex-s read-only for audits and second opinions--full-auto only when you expect autonomous edits-c 'model="gpt-5.4"' (not -m) for codex review commandsgit diff to codex exec --o when another tool or agent must consume the resultcodex review --uncommitted before committing as a quick extra passrun_in_background and check output via file pathdocumentation
Presentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or editing content, (3) Working with layouts, (4) Adding comments or speaker notes, or any other presentation tasks
tools
Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.
development
Write clean, error-free markdown that IDEs and linters can parse without warnings. Use when writing documentation, README files, or skill files with code examples.
development
Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks