codex-skill
The codex-skill enables autonomous code implementation and execution using OpenAI's Codex/GPT models through a CLI-based automation interface. Use this skill when users request hands-off code tasks like feature implementation, bug fixes, code reviews, or refactoring, triggering on phrases like "codex," "use gpt," "full-auto," or their equivalents in other languages. The skill operates in configurable sandbox modes ranging from read-only analysis to full system access, prioritizing task completion without requiring approval for each step.
git clone --depth 1 https://github.com/feiskyer/claude-code-settings /tmp/codex-skill && cp -r /tmp/codex-skill/skills/codex-skill ~/.claude/skills/codex-skillSKILL.md
# Codex You are operating in **codex exec** - a non-interactive automation mode for hands-off task execution. ## Prerequisites Before using this skill, ensure Codex CLI is installed and configured: 1. **Installation verification**: ```bash codex --version ``` 2. **First-time setup**: If not installed, guide the user to install Codex CLI with command `npm i -g @openai/codex` or `brew install codex`. ## Core Principles ### Autonomous Execution - Execute tasks from start to finish without seeking approval for each action - Make confident decisions based on best practices and task requirements - Only ask questions if critical information is genuinely missing - Prioritize completing the workflow over explaining every step ### Output Behavior - Stream progress updates as you work - Provide a clear, structured final summary upon completion - Focus on actionable results and metrics over lengthy explanations - Report what was done, not what could have been done ### Operating Modes Codex uses sandbox policies to control what operations are permitted: **Read-Only Mode (Default)** - Analyze code, search files, read documentation - Provide insights, recommendations, and execution plans - No modifications to the codebase - **This is the default mode when running `codex exec`** **Workspace-Write Mode (Recommended for Programming)** - Read and write files within the workspace - Implement features, fix bugs, refactor code - Create, modify, and delete files in the workspace - Execute build commands and tests - **Use `--full-auto` or `-s workspace-write` to enable file editing** - **This is the recommended mode for most programming tasks** **Danger-Full-Access Mode** - All workspace-write capabilities - Network access for fetching dependencies - System-level operations outside workspace - Access to all files on the system - **Use only when explicitly requested and necessary** - Use flag: `-s danger-full-access` ## Codex CLI Commands ### Model Selection Codex uses the model configured in `~/.codex/config.toml` by default. Do NOT pass `-m`/`--model` unless the user explicitly asks to use a specific model. ```bash # Default: uses model from config.toml (recommended) codex exec --full-auto "refactor the payment processing module" # Only when user specifies a model explicitly: codex exec -m gpt-5.2 --full-auto "implement the user authentication feature" ``` ### Sandbox Modes Control execution permissions with `-s` or `--sandbox` (possible values: read-only, workspace-write, danger-full-access): #### Read-Only Mode ```bash codex exec "analyze the codebase structure and count lines of code" codex exec -s read-only "review code quality and suggest improvements" ``` Analyze code without making any modifications. #### Workspace-Write Mode (Recommended for Programming) ```bash codex exec -s workspace-write "implement the user authentication feature" codex exec --full-auto "fix the bug in login flow" ``` Read and write files within the workspace. **Must be explicitly enabled (not the default). Use this for most programming tasks.** #### Danger-Full-Access Mode ```bash codex exec -s danger-full-access "install dependencies and update the API integration" ``` Network access and system-level operations. Use only when necessary. ### Full-Auto Mode (Convenience Alias) ```bash codex exec --full-auto "implement the user authentication feature" ``` **Convenience alias for**: `-s workspace-write` (enables file editing). This is the **recommended command for most programming tasks** since it allows codex to make changes to your codebase. ### Config Overrides Override any `config.toml` value inline with `-c` or `--config`: ```bash # Override model for a single run codex exec -c model="o3" --full-auto "implement the feature" # Override sandbox permissions codex exec -c 'sandbox_permissions=["disk-full-read-access"]' "analyze all files" # Override nested config values using dotted paths codex exec -c shell_environment_policy.inherit=all --full-auto "run build" ``` ### Feature Toggles Enable or disable features with `--enable` and `--disable`: ```bash codex exec --enable multi_agent --full-auto "implement feature across multiple files" codex exec --disable plan_tool --full-auto "quick fix for typo" ``` Equivalent to `-c features.<name>=true` or `-c features.<name>=false`. ### Image Attachments Attach images to the prompt with `-i` or `--image`: ```bash codex exec -i screenshot.png "implement the UI shown in this screenshot" codex exec -i mockup.png -i spec.png --full-auto "build this component matching the design" ``` ### Code Review Run code reviews with `codex exec review`: ```bash # Review uncommitted changes (staged, unstaged, and untracked) codex exec review --uncommitted # Review changes against a base branch codex exec review --base main # Review a specific commit codex exec review --commit abc1234 # Custom review instructions codex exec review --base main "focus on security vulnerabilities and error handling" # Review with a title for the summary codex exec review --base main --title "Auth feature review" # Output review as JSON codex exec review --uncommitted --json -o review.json ``` ### Configuration Profiles Use saved profiles from `~/.codex/config.toml` with `-p` or `--profile`: ```bash codex exec -p production "deploy the latest changes" codex exec --profile development "run integration tests" ``` Profiles can specify default model, sandbox mode, and other options. ### Working Directory Specify a different working directory with `-C` or `--cd`: ```bash codex exec -C /path/to/project --full-auto "implement the feature" codex exec --cd ~/projects/myapp --full-auto "run tests and fix failures" ``` ### Additional Writable Directories Allow writing to additional directories outside the main workspace with `--add-dir`: ```bash codex exec --full-auto --add-dir /tmp/output --add-dir ~/shared "generate reports in multiple locations" ``` ### JSON Out
Create Claude Code custom slash commands with proper structure, frontmatter, and best practices. Use this skill whenever the user wants to create a new command, add a slash command, build a custom command, or mentions "create-command", "new command", "add command", or "make a command" for Claude Code. Also trigger when the user wants to turn a workflow into a reusable command.
Comprehensive session analysis and learning capture specialist. Analyzes development sessions to extract patterns, preferences, and improvements for future interactions. Use after significant work sessions to capture learnings.
GitHub issue resolution specialist. Analyzes, plans, and implements fixes for GitHub issues with proper testing and PR creation. Use when fixing specific GitHub issues.
Technical breakthrough documentation specialist. Captures and transforms significant technical insights into actionable, reusable documentation. Use when documenting important discoveries, optimizations, or problem solutions.
Analyzes and improves Claude Code instructions in CLAUDE.md. Reviews conversation history to identify areas for improvement and implements approved changes. Use to optimize AI assistant instructions based on real usage patterns.
Expert code reviewer for GitHub pull requests. Provides thorough code analysis with focus on quality, security, and best practices. Use when reviewing PRs for code quality and potential issues.
Expert UI/frontend developer for creating, modifying, or reviewing frontend code, UI components, and user interfaces. Use when building React components, responsive designs, or any frontend development tasks. PROACTIVELY use for UI/UX implementation, component architecture, and frontend best practices.
>-