/codex-exec - Execute Codex CLI Commands banner
alirezarezvani alirezarezvani

/codex-exec - Execute Codex CLI Commands

Development community intermediate

Description

**Easy wrapper for running Codex CLI commands from Claude Code with proper syntax.** ---

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

Repository README

This is the README for alirezarezvani/claude-code-skill-factory, shared by 13 entries in this directory. It describes the repository, not this entry specifically.

/codex-exec - Execute Codex CLI Commands

**Easy wrapper for running Codex CLI commands from Claude Code with proper syntax.**


Usage

/codex-exec [analysis|edit|search|resume] "your task"
/codex-exec --model [gpt-5|gpt-5-codex] "your task"
/codex-exec --help

What This Command Does

**Executes Codex CLI commands with**:

  • ✅ Correct syntax (always uses codex exec)
  • ✅ Intelligent model selection
  • ✅ Appropriate sandbox modes
  • ✅ High reasoning effort
  • ✅ Error handling

**CRITICAL**: Always uses `codex exec` not plain `codex` (required for Claude Code environment)


Command Types

Analysis (Read-Only)

Safe code analysis without modifications.

**Usage**:

/codex-exec analysis "analyze security vulnerabilities"

**Executes**:

codex exec -m gpt-5 -s read-only \
  -c model_reasoning_effort=high \
  --skip-git-repo-check \
  "analyze security vulnerabilities"

**Use for**:

  • Code review
  • Security analysis
  • Architecture review
  • Documentation reading
  • Performance analysis

Edit (Workspace Write)

Code editing and file modifications.

**Usage**:

/codex-exec edit "refactor main.py for async patterns"

**Executes**:

codex exec -m gpt-5-codex -s workspace-write \
  -c model_reasoning_effort=high \
  --full-auto \
  --skip-git-repo-check \
  "refactor main.py for async patterns"

**Use for**:

  • Code refactoring
  • Bug fixes
  • Feature implementation
  • Test generation
  • Documentation updates

Search (Web Search Enabled)

Tasks requiring latest information from the web.

**Usage**:

/codex-exec search "research latest Python async patterns"

**Executes**:

codex exec -m gpt-5 -s read-only \
  -c model_reasoning_effort=high \
  --search \
  --skip-git-repo-check \
  "research latest Python async patterns"

**Use for**:

  • Technology research
  • Best practices lookup
  • Library comparisons
  • Latest trends
  • Documentation lookup

Resume (Continue Session)

Resume previous Codex session.

**Usage**:

/codex-exec resume

**Executes**:

codex exec resume --last

**Use for**:

  • Continuing previous work
  • Adding to prior analysis
  • Iterative development
  • Follow-up questions

Model Selection

GPT-5 (General Reasoning)

**Default for**: Analysis, Search, General tasks

**Best for**:

  • Architecture design
  • Code review
  • Documentation
  • Planning
  • Research

**Characteristics**:

  • High reasoning capability
  • General-purpose
  • Best for non-coding tasks

GPT-5-Codex (Code Specialized)

**Default for**: Edit tasks

**Best for**:

  • Code refactoring
  • Bug fixing
  • Feature implementation
  • Test generation
  • Code translation

**Characteristics**:

  • Optimized for coding
  • Better at code editing
  • Specialized knowledge

Examples

Example 1: Security Analysis

**User**:

/codex-exec analysis "analyze this codebase for security vulnerabilities"

**What happens**:

  1. Uses GPT-5 (general reasoning)
  2. Rea