codex
Invoke Codex CLI for complex coding tasks requiring high reasoning capabilities. This skill should be invoked when users explicitly mention "Codex", request complex implementation challenges, advanced reasoning, or need high-reasoning model assistance. Automatically triggers on codex-related requests and supports session continuation for iterative development.
Install
mkdir -p .claude/skills/codex && curl -L -o skill.zip "https://mcp.directory/api/skills/download/18" && unzip -o skill.zip -d .claude/skills/codex && rm skill.zipInstalls to .claude/skills/codex
About this skill
Codex: High-Reasoning AI Assistant for Claude Code
DEFAULT MODEL: GPT-5.2 with xhigh Reasoning
The default model for ALL Codex invocations is gpt-5.2 with xhigh reasoning effort.
- Always use
gpt-5.2with-c model_reasoning_effort=xhighunless user explicitly requests otherwise - GPT-5.2 is the latest model with full support for all reasoning levels (low, medium, high, xhigh)
- Use
workspace-writesandbox for code editing,read-onlyfor analysis only
# Default invocation - ALWAYS use gpt-5.2 with xhigh
codex exec -m gpt-5.2 -s workspace-write \
-c model_reasoning_effort=xhigh \
"your prompt here"
CRITICAL: Always Use codex exec
MUST USE: codex exec for ALL Codex CLI invocations in Claude Code.
NEVER USE: codex (interactive mode) - will fail with "stdout is not a terminal"
ALWAYS USE: codex exec (non-interactive mode)
Examples:
codex exec -m gpt-5.2 "prompt"(CORRECT)codex -m gpt-5.2 "prompt"(WRONG - will fail)codex exec resume --last(CORRECT)codex resume --last(WRONG - will fail)
Why? Claude Code's bash environment is non-terminal/non-interactive. Only codex exec works in this environment.
IMPORTANT: Interactive vs Exec Mode Flags
Some Codex CLI flags are ONLY available in interactive mode, NOT in codex exec.
| Flag | Interactive codex | codex exec | Alternative for exec |
|---|---|---|---|
--search | ✅ Available | ❌ NOT available | --enable web_search_request |
-a/--ask-for-approval | ✅ Available | ❌ NOT available | --full-auto or -c approval_policy=... |
--add-dir | ✅ Available | ✅ Available | N/A |
--full-auto | ✅ Available | ✅ Available | N/A |
For web search in exec mode:
# CORRECT - works in codex exec
codex exec --enable web_search_request "research topic"
# WRONG - --search only works in interactive mode
codex --search "research topic"
For approval control in exec mode:
# CORRECT - works in codex exec
codex exec --full-auto "task"
codex exec -c approval_policy=on-request "task"
# WRONG - -a only works in interactive mode
codex -a on-request "task"
Trigger Examples
This skill activates when users say phrases like:
- "Use codex to analyze this architecture"
- "Ask codex about this design decision"
- "Run codex on this problem"
- "Call codex for help with this implementation"
- "I need GPT-5 reasoning for this task"
- "Get OpenAI's high-reasoning model on this"
- "Continue with codex" or "Resume the codex session"
- "Codex, help me with..." or simply "Codex"
When to Use This Skill
This skill should be invoked when:
- User explicitly mentions "Codex" or requests Codex assistance
- User needs help with complex coding tasks, algorithms, or architecture
- User requests "high reasoning" or "advanced implementation" help
- User needs complex problem-solving or architectural design
- User wants to continue a previous Codex conversation
How It Works
Detecting New Codex Requests
When a user makes a request that falls into one of the above categories, determine the task type:
General Tasks (architecture, design, reviews, explanations):
- Use model:
gpt-5.1(high-reasoning general model) - Example requests: "Design a queue data structure", "Review this architecture", "Explain this algorithm"
Code Editing Tasks (file modifications, implementation):
- Use model:
gpt-5.2(latest model with maximum capability) - Example requests: "Edit this file to add feature X", "Implement the function", "Refactor this code"
Bash CLI Command Structure
IMPORTANT: Always use codex exec for non-interactive execution. Claude Code's bash environment is non-terminal, so the interactive codex command will fail with "stdout is not a terminal" error.
For Code Editing Tasks (Default)
codex exec -m gpt-5.2 -s workspace-write \
-c model_reasoning_effort=xhigh \
--enable web_search_request \
"<user's prompt>"
For Read-Only Analysis Tasks
codex exec -m gpt-5.2 -s read-only \
-c model_reasoning_effort=xhigh \
--enable web_search_request \
"<user's prompt>"
Why codex exec?
- Non-interactive mode required for automation and Claude Code integration
- Produces clean output suitable for parsing
- Works in non-TTY environments (like Claude Code's bash)
Model Selection Logic
Use gpt-5.1 (default) when:
- Designing architecture or data structures
- Reviewing code for quality, security, or performance
- Explaining concepts or algorithms
- Planning implementation strategies
- General problem-solving and reasoning
Use gpt-5.2 when:
- Editing or modifying existing code files
- Implementing specific functions or features
- Refactoring code
- Writing new code with file I/O
- Any task requiring
workspace-writesandbox - Complex code editing requiring maximum reasoning capability
- Tasks requiring the latest model capabilities
Note: gpt-5.1-codex-max and gpt-5.1-codex are still available for backward compatibility. Use gpt-5.2 as the default for latest capabilities.
Default Configuration
All Codex invocations use these defaults unless user specifies otherwise:
| Parameter | Default Value | CLI Flag | Notes |
|---|---|---|---|
| Model | gpt-5.2 | -m gpt-5.2 | Default for ALL tasks (latest model) |
| Sandbox | workspace-write | -s workspace-write | Allows file modifications (default) |
| Sandbox (analysis) | read-only | -s read-only | For read-only analysis tasks |
| Reasoning Effort | xhigh | -c model_reasoning_effort=xhigh | Maximum reasoning capability |
| Verbosity | medium | -c model_verbosity=medium | Balanced output detail |
| Web Search | enabled | --enable web_search_request | Access to up-to-date information |
CLI Flags Reference
Codex CLI Version: 0.71.0+ (requires 0.71.0+ for latest features)
| Flag | Values | Description |
|---|---|---|
-m, --model | gpt-5.2, gpt-5.1, gpt-5.1-codex, gpt-5.1-codex-max | Model selection |
-s, --sandbox | read-only, workspace-write, danger-full-access | Sandbox mode |
-c, --config | key=value | Config overrides (e.g., model_reasoning_effort=high) |
-C, --cd | directory path | Working directory |
-p, --profile | profile name | Use config profile |
--enable | feature name | Enable a feature (e.g., web_search_request) |
--disable | feature name | Disable a feature |
-i, --image | file path(s) | Attach image(s) to initial prompt |
--add-dir | directory path | Additional writable directory (repeatable) |
--full-auto | flag | Convenience for workspace-write sandbox with on-request approval |
--oss | flag | Use local open source model provider |
--local-provider | lmstudio, ollama | Specify local provider (with --oss) |
--skip-git-repo-check | flag | Allow running outside Git repository |
--output-schema | file path | JSON Schema file for response shape |
--color | always, never, auto | Color settings for output |
--json | flag | Print events as JSONL |
-o, --output-last-message | file path | Save last message to file |
--dangerously-bypass-approvals-and-sandbox | flag | Skip confirmations (DANGEROUS) |
Configuration Parameters
Pass these as -c key=value:
model_reasoning_effort:minimal,low,medium,high,xhigh- CLI default:
high- The Codex CLI defaults to high reasoning - Skill default:
xhigh- This skill explicitly uses xhigh for maximum capability xhigh: Extra-high reasoning for maximum capability (supported by gpt-5.2 and gpt-5.1-codex-max)- Use
xhighfor complex architectural refactoring, long-horizon tasks, or when quality is more important than speed
- CLI default:
model_verbosity:low,medium,high(default:medium)model_reasoning_summary:auto,concise,detailed,none(default:auto)sandbox_workspace_write.writable_roots: JSON array of additional writable directories (e.g.,["/path1","/path2"])approval_policy:untrusted,on-failure,on-request,never(approval behavior)
Additional Writable Directories:
Use --add-dir flag (preferred) or config:
# Preferred - simpler syntax (v0.71.0+)
codex exec --add-dir /path1 --add-dir /path2 "task"
# Alternative - config approach
codex exec -c 'sandbox_workspace_write.writable_roots=["/path1","/path2"]' "task"
Model Selection Guide
Default Models (Codex CLI v0.71.0+)
This skill supports the following models:
gpt-5.2- Latest model with all reasoning levels (NEW in 0.71.0)gpt-5.1- General reasoning, architecture, reviews (default)gpt-5.1-codex-max- Code editing (legacy, use gpt-5.2 instead)gpt-5.1-codex- Standard code editing (available for backward compatibility)
GPT-5.2 Model (NEW):
- Supports all reasoning effort levels:
low,medium,high,xhigh - Use for cutting-edge tasks requiring latest model capabilities
- Example:
codex exec -m gpt-5.2 -c model_reasoning_effort=xhigh "complex task"
Performance Characteristics:
gpt-5.1-codex-maxis 27-42% faster thangpt-5.1-codex- Uses ~30% fewer thinking tokens at the same reasoning effort level
- Supports new
xhighreasoning effort for maximum capability - Requires Codex CLI 0.71.0+ and ChatGPT Plus/Pro/Business/Edu/Enterprise subscription
Backward Compatibility
You can override to use older models when needed:
# Use older gpt-5 model explicitly
codex exec -m gpt-5 -s read-only "Design a data structure"
# Use older gpt-5-codex model explicitly
codex exec -m gpt-5-codex -s workspace-write "Implement feature X"
When to Override
- Testing compatibility: Verify behavior matches older model versions
- Specific model requirements: Project requires specific model version
- **Model co
Content truncated.
You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
pdf-to-markdown
aliceisjustplaying
Convert entire PDF documents to clean, structured Markdown for full context loading. Use this skill when the user wants to extract ALL text from a PDF into context (not grep/search), when discussing or analyzing PDF content in full, when the user mentions "load the whole PDF", "bring the PDF into context", "read the entire PDF", or when partial extraction/grepping would miss important context. This is the preferred method for PDF text extraction over page-by-page or grep approaches.
Related MCP Servers
Browse all serversBoost your productivity by managing Azure DevOps projects, pipelines, and repos in VS Code. Streamline dev workflows wit
Claude Code is an AI powered coding assistant that streamlines coding tasks, file ops, Git, and searches by auto-bypassi
SuperAgent is artificial intelligence development software that orchestrates AI agents for efficient, parallel software
Enhance software testing with Playwright MCP: Fast, reliable browser automation, an innovative alternative to Selenium s
Enhance productivity with AI-driven Notion automation. Leverage the Notion API for secure, automated workspace managemen
Mobile Next offers fast, seamless mobile automation for iOS and Android. Automate apps, extract data, and simplify mobil
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.