Claude Skill

Codex Skill Guide

Use when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing

Reviewed community sourceInstallable3 sections3 related pages

Editor's Note

Use when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing Covers running a task, following up, critical evaluation of codex output.

Editorial Guide

What to do with this skill

Start with the workflow below, then drop into the upstream source only after the page has narrowed the job for you.

What this skill does

Use when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing

When to use it

the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing

Install and setup notes

  • Open the upstream source before treating this page as install-ready, because not every official record is meant to be dropped into a workflow unchanged.
  • Keep the context narrow. These skills are usually strongest when you load only the branch, reference set, or workflow step that matches the current task.
  • If you plan to standardize on this skill for team use, pin the upstream repo and check for updates periodically instead of assuming the official defaults are static.

Example workflow

  1. Start with a concrete task that clearly matches this skill's intended trigger: the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing
  2. Read the overview and first source section, then choose the smallest branch of guidance or references that solves the task in front of you.
  3. Run the change on a real file, command, or workflow, verify the result, and only then widen the skill into a repeatable team pattern.

Compatible agents

This skill is explicitly marked for Claude Code.

Claude Code

Install source

This page does not expose a single copy-paste install command in the normalized record. Use the upstream install source below to confirm the exact steps, file paths, and current setup expectations before you add it to your stack.

Page Outline

Running a TaskFollowing UpCritical Evaluation of Codex Output

Source Content

Normalized top-level metadata comes from the directory layer. The body below is the upstream source content for this item.

Codex Skill Guide

Running a Task

  • Ask the user (via `AskUserQuestion`) which model to run (`gpt-5.5`, `gpt-5.4`, `gpt-5.4-mini`, `gpt-5.3-codex-spark`, or `gpt-5.3-codex`) AND which reasoning effort to use (`xhigh`, `high`, `medium`, or `low`) in a **single prompt with two questions**.
  • Select the sandbox mode required for the task; default to `--sandbox read-only` unless edits or network access are necessary.
  • Assemble the command with the appropriate options:
  • `-m, --model <MODEL>`
  • `--config model_reasoning_effort="<xhigh|high|medium|low>"`
  • `--sandbox <read-only|workspace-write|danger-full-access>`
  • `--full-auto`
  • `-C, --cd <DIR>`
  • `--skip-git-repo-check`
  • `"your prompt here"` (as final positional argument)
  • Always use --skip-git-repo-check.
  • When continuing a previous session, use `codex exec --skip-git-repo-check resume --last` via stdin. When resuming don't use any configuration flags unless explicitly requested by the user e.g. if he species the model or the reasoning effort when requesting to resume a session. Resume syntax: `echo "your prompt here" | codex exec --skip-git-repo-check resume --last 2>/dev/null`. All flags have to be inserted between exec and resume.
  • **IMPORTANT**: By default, append `2>/dev/null` to all `codex exec` commands to suppress thinking tokens (stderr). Only show stderr if the user explicitly requests to see thinking tokens or if debugging is needed.
  • Run the command, capture stdout/stderr (filtered as appropriate), and summarize the outcome for the user.
  • **After Codex completes**, inform the user: "You can resume this Codex session at any time by saying 'codex resume' or asking me to continue with additional analysis or changes."

Quick Reference

| Use case | Sandbox mode | Key flags | | --- | --- | --- | | Read-only review or analysis | `read-only` | `--sandbox read-only 2>/dev/null` | | Apply local edits | `workspace-write` | `--sandbox workspace-write --full-auto 2>/dev/null` | | Permit network or broad access | `danger-full-access` | `--sandbox danger-full-access --full-auto 2>/dev/null` | | Resume recent session | Inherited from original | `echo "prompt" \| codex exec --skip-git-repo-check resume --last 2>/dev/null` (no flags allowed) | | Run from another directory | Match task needs | `-C <DIR>` plus other flags `2>/dev/null` |

Following Up

  • After every `codex` command, immediately use `AskUserQuestion` to confirm next steps, collect clarifications, or decide whether to resume with `codex exec resume --last`.
  • When resuming, pipe the new prompt via stdin: `echo "new prompt" | codex exec resume --last 2>/dev/null`. The resumed session automatically uses the same model, reasoning effort, and sandbox mode from the original session.
  • Restate the chosen model, reasoning effort, and sandbox mode when proposing follow-up actions.

Critical Evaluation of Codex Output

Codex is powered by OpenAI models with their own knowledge cutoffs and limitations. Treat Codex as a **colleague, not an authority**.

Guidelines

  • **Trust your own knowledge** when confident. If Codex claims something you know is incorrect, push back directly.
  • **Research disagreements** using WebSearch or documentation before accepting Codex's claims. Share findings with Codex via resume if needed.
  • **Remember knowledge cutoffs** - Codex may not know about recent releases, APIs, or changes that occurred after its training data.
  • **Don't defer blindly** - Codex can be wrong. Evaluate its suggestions critically, especially regarding:
  • Model names and capabilities
  • Recent library versions or API changes
  • Best practices that may have evolved

When Codex is Wrong

  • State your disagreement clearly to the user
  • Provide evidence (your own knowledge, web search, docs)
  • O

<!-- truncated -->

Recommended skills

Next places to browse

Sponsored
MoltAwards: Turn AI agents loose on government contracts & jobs! logo

Turn AI agents loose on government contracts

Learn more