A skill your agent uses when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing

MITAuto-check passedDevelopment

Install Codex

skills CLI
$ npx skills add skills-directory/skill-codex --skill codex -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install skills-directory/skill-codex codex --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/skills-directory/skill-codex.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/skill-codex/skills/codex .claude/skills/codex && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
codex
GitHub stars
1.5k
Used in
3 other repos
Token cost
~1.8k tokens
SKILL.md length
897 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing

  • Works in 9 steps: For a new session (resumes inherit the… → Select the sandbox mode required for the… → Assemble the command with the… → …
  • The user asks to run Codex CLI (codex exec
  • SKILL.md covers Running a Task, Execution timeouts, Following Up and Critical Evaluation of Codex…, plus 1 more section
  • Calls codex

What it does

Codex is an agent skill from skills-directory/skill-codex. Use when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Refactoring. It works with OpenAI and Git. The repository describes itself as: A claude code skill to delegate prompts to codex. The licence is MIT.

When your agent uses it

  • The user asks to run Codex CLI (codex exec
  • References OpenAI Codex for code analysis
  • Automated editing

Example prompts

  • “/codex”

Workflow steps

9 steps, taken from the first numbered list in SKILL.md.

  1. For a new session (resumes inherit the prior model/effort — see step 5), ask the user (via AskUserQuestion) which model AND which…
  2. Select the sandbox mode required for the task; default to --sandbox read-only unless edits or network access are necessary.
  3. Assemble the command with the appropriate options
  4. Always use --skip-git-repo-check.
  5. When continuing a previous session, use codex exec --skip-git-repo-check resume --last via stdin. When resuming don't use any…
  6. IMPORTANT: By default, append 2>/dev/null to all codex exec commands to suppress thinking tokens (stderr). Only show stderr if the user…
  7. IMPORTANT (stdin): codex exec always reads stdin and concatenates it with the positional prompt -- even when the prompt is fully supplied…
  8. Run the command, capture stdout/stderr (filtered as appropriate), and summarize the outcome for the user.
  9. After Codex completes, inform the user: "You can resume this Codex session at any time by saying 'codex resume' or asking me to continue…

What it can do on your machine

Read from SKILL.md and the folder at commit 0cf3e4b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • codex

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Codex loads about 1.8k tokens when it runs. Until then it costs about 38 tokens; SKILL.md has 897 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~38
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from skills-directory/skill-codex at commit 0cf3e4b, republished under its MIT licence (© skills-directory). 897 words, ~1,794 tokens.

Download SKILL.mdSave it as .claude/skills/codex/SKILL.md (or your agent's skills folder).
name
codex
description
Use when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing

Codex Skill Guide

Running a Task

  1. For a new session (resumes inherit the prior model/effort — see step 5), ask the user (via AskUserQuestion) which model AND which reasoning effort to use, in a single prompt with two questions. When the user expresses no preference, default to gpt-6-astra at high.
    • Model — default gpt-6-astra:
      • GPT-6: gpt-6-astra (frontier / most capable — default)
      • GPT-5.6: gpt-5.6-sol (reliable agentic workhorse), gpt-5.6-terra (balanced, everyday), gpt-5.6-luna (fast & affordable)
      • Legacy (kept for compatibility): gpt-5.5, gpt-5.4, gpt-5.4-mini, gpt-5.3-codex-spark, gpt-5.3-codex
    • Reasoning effort — default high: low, medium, high, xhigh, max, ultra.
      • max/ultra require a GPT-6 or GPT-5.6 model; ultra is only on astra/sol/terra (luna caps at max); legacy models cap at xhigh.
      • ultra = maximum reasoning with automatic task delegation (slowest and most expensive — reserve for the hardest jobs).
      • If the chosen effort exceeds the chosen model's maximum, fall back to that model's highest supported effort and tell the user.
  2. Select the sandbox mode required for the task; default to --sandbox read-only unless edits or network access are necessary.
  3. Assemble the command with the appropriate options:
    • -m, --model <MODEL>
    • --config model_reasoning_effort="<low|medium|high|xhigh|max|ultra>" (max/ultra only on GPT-6 / GPT-5.6 models; ultra only on astra/sol/terra — see step 1)
    • --sandbox <read-only|workspace-write|danger-full-access>
    • --full-auto
    • -C, --cd <DIR>
    • --skip-git-repo-check
    • "your prompt here" (as final positional argument)
  4. Always use --skip-git-repo-check.
  5. 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.
  6. 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.
  7. IMPORTANT (stdin): codex exec always reads stdin and concatenates it with the positional prompt -- even when the prompt is fully supplied as a positional argument. If stdin is not closed, codex blocks forever. When invoking from a harness (background tasks, hooks, scripts where stdin is not a TTY but also not closed), explicitly redirect stdin: append </dev/null to the command, e.g. codex exec ... "prompt" </dev/null 2>/dev/null. Symptom of getting this wrong: zero bytes of stdout, zero CPU accumulated, process appears hung indefinitely.
  8. Run the command, capture stdout/stderr (filtered as appropriate), and summarize the outcome for the user.
  9. 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 caseSandbox modeKey flags
Read-only review or analysisread-only--sandbox read-only 2>/dev/null
Apply local editsworkspace-write--sandbox workspace-write --full-auto 2>/dev/null
Permit network or broad accessdanger-full-access--sandbox danger-full-access --full-auto 2>/dev/null
Resume recent sessionInherited from originalecho "prompt" | codex exec --skip-git-repo-check resume --last 2>/dev/null (no flags allowed)
Run from another directoryMatch task needs-C <DIR> plus other flags 2>/dev/null

Execution timeouts

Codex produces no intermediate output — it writes the result only at completion. If the process is killed before finishing, the output file is silently empty (no error).

Preferred approach: run synchronously — eliminates timeout risk entirely and the conversation waits for the result anyway.

If running in background, set the execution timeout based on reasoning effort:

Reasoning effortTimeout
low150s
medium300s
high600s
xhigh1200s
max1800s
ultra1800s
Show full SKILL.md (351 more words)Show less

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
  1. State your disagreement clearly to the user
  2. Provide evidence (your own knowledge, web search, docs)
  3. Optionally resume the Codex session to discuss the disagreement. Identify yourself as Claude so Codex knows it's a peer AI discussion. Use your actual model name (e.g., the model you are currently running as) instead of a hardcoded name:
    bash
    echo "This is Claude (<your current model name>) following up. I disagree with [X] because [evidence]. What's your take on this?" | codex exec --skip-git-repo-check resume --last 2>/dev/null
  4. Frame disagreements as discussions, not corrections - either AI could be wrong
  5. Let the user decide how to proceed if there's genuine ambiguity

Error Handling

  • Stop and report failures whenever codex --version or a codex exec command exits non-zero; request direction before retrying.
  • Before you use high-impact flags (--full-auto, --sandbox danger-full-access, --skip-git-repo-check) ask the user for permission using AskUserQuestion unless it was already given.
  • When output includes warnings or partial results, summarize them and ask how to adjust using AskUserQuestion.

© skills-directory, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/skill-codex/skills/codex of skills-directory/skill-codex.

Open the folder on GitHubat commit 0cf3e4b

Used in 4 other repositories

We found 5 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 3 other GitHub owners. This page covers the copy in skills-directory/skill-codex, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Codex next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Codex compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Codex this skillskills-directory/skill-codex1.5k3 repos~1.8kAutomated safety check: PassMIT
Codexdavila7/claude-code-templates32k4 repos~1.3kAutomated safety check: PassMIT
Codexpoteto/noodle420—~894Automated safety check: PassMIT
Open Code Review CLIalibaba/open-code-review44k—~3.1kAutomated safety check: PassApache-2.0
Changeset Validationopenai/openai-agents-js3.9k—~607Automated safety check: PassMIT
Openai Security Ownership Maptrailofbits/skills-curated5125 repos~2.2kAutomated safety check: NotesCC-BY-SA-4.0

Similar skills

  • Codex

    davila7/claude-code-templates

    A skill your agent uses when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing.

    32k GitHub starsUsed in 4 repos~1.3k tokens
    DevelopmentAuto-check passed
  • Codex

    poteto/noodle

    Run Codex CLI (exec, resume) for parallel work, delegating tasks to another model, or background code generation.

    420 GitHub stars~894 tokensUpdated 6 mo ago
    DevelopmentAuto-check passed
  • Open Code Review CLI

    alibaba/open-code-review

    Runs the ocr command-line tool to review Git changes, a commit or a branch comparison with an AI model, returning line-level comments and optionally applying fixes.

    44k GitHub stars~3.1k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Changeset Validation

    openai/openai-agents-js

    Official

    Validate changesets in openai-agents-js using LLM judgment against git diffs (including uncommitted local changes).

    3.9k GitHub stars~607 tokensUpdated today
    DevelopmentAuto-check passed
  • Openai Security Ownership Map

    trailofbits/skills-curated

    Official

    Analyze git repositories to build a security ownership topology (people-to-file), compute bus factor and sensitive-code ownership, and export CSV/JSON for graph databases and visualization.

    512 GitHub starsUsed in 5 repos~2.2k tokens
    DevelopmentAuto-check: notes
  • Nexus Mapper

    Haaaiawd/Nexus-skills

    Generate a persistent .nexus-map/ knowledge base that lets any AI session instantly understand a codebase's architecture, systems, dependencies, and change hotspots.

    166 GitHub starsUsed in 1 repo~2.5k tokens
    DevelopmentAuto-check: notes

Works with

Categories

Questions about Codex

What does Codex do?

A skill your agent uses when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing. Codex is an agent skill from skills-directory/skill-codex.

When should I use Codex?

Codex fits situations like: the user asks to run Codex CLI (codex exec; references OpenAI Codex for code analysis; automated editing.

How do I install Codex in Claude Code?

Run `npx skills add skills-directory/skill-codex --skill codex -a claude-code`. Or copy the skill folder (plugins/skill-codex/skills/codex in skills-directory/skill-codex) into .claude/skills/codex in your project. Claude Code loads it when a task matches its description.

How do I install Codex in Codex?

Run `npx skills add skills-directory/skill-codex --skill codex -a codex`. Or copy the skill folder (plugins/skill-codex/skills/codex in skills-directory/skill-codex) into .agents/skills/codex in your project. Codex loads it when a task matches its description.

Can I use Codex in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add skills-directory/skill-codex --skill codex -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/codex, .gemini/skills/codex, .github/skills/codex and .opencode/skills/codex in your project.

What does Codex need to run?

Going by SKILL.md and its folder, Codex needs the command-line tools its instructions call (codex).

Does Codex access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Codex safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Codex use?

Codex is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Codex use?

About 1.8k tokens (SKILL.md is roughly 7.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Codex?

Skills that share tags, products or a category with Codex: Codex (davila7/claude-code-templates, 32k stars), Codex (poteto/noodle, 420 stars), Open Code Review CLI (alibaba/open-code-review, 44k stars) and Changeset Validation (openai/openai-agents-js, 3.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Codex?

skills-directory (a GitHub organization) maintains it in skills-directory/skill-codex, which has 1,455 GitHub stars. The repository was last updated on September 13, 2026.

Source: skills-directory/skill-codex on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.