mcpbeat Sign in

Codex Skill for 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. Uses GPT-5.2 by default for state-of-the-art software engineering.

2k tokens
context cost
the whole folder, loaded on every use
2
files
instructions only
0
copies elsewhere
how many repositories repackaged it
239
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/jdrhyne/agent-skills --skill codex

The instruction itself

8 sections, as written by the author

Codex Skill Guide

Running a Task

  • Default to gpt-5.2 model. Ask the user (via AskUserQuestion) which reasoning effort to use (xhigh,high, medium, or low). User can override model if needed (see Model Options below).
  • 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="<high|medium|low>"
  • --sandbox <read-only|workspace-write|danger-full-access>
  • --full-auto
  • -C, --cd <DIR>
  • --skip-git-repo-check
  • 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."

Safety Boundaries

  • Do not run codex exec until the user has explicitly asked to use Codex for the task.
  • Do not select --full-auto or a broader sandbox mode than the task requires.
  • Do not overwrite user files, create commits, or perform destructive operations without explicit user approval.
  • Do not use networked or danger-full-access runs unless the user requested work that actually needs them.

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 |

Model Options

| Model | Best for | Context window | Key features |

| --- | --- | --- | --- |

| gpt-5.2-max | Max model: Ultra-complex reasoning, deep problem analysis | 400K input / 128K output | 76.3% SWE-bench, adaptive reasoning |

| gpt-5.2 ⭐ | Flagship model: Software engineering, agentic coding workflows | 400K input / 128K output | 76.3% SWE-bench, adaptive reasoning |

| gpt-5.2-mini | Cost-efficient coding (4x more usage allowance) | 400K input / 128K output | Near SOTA performance |

| gpt-5.1-thinking | Ultra-complex reasoning, deep problem analysis | 400K input / 128K output | Adaptive thinking depth, runs 2x slower on hardest tasks |

GPT-5.2 Advantages: 76.3% SWE-bench (vs 72.8% GPT-5), 30% faster on average tasks, better tool handling, reduced hallucinations, improved code quality. Knowledge cutoff: September 30, 2024.

Reasoning Effort Levels:

  • xhigh - Ultra-complex tasks (deep problem analysis, complex reasoning, deep understanding of the problem)
  • high - Complex tasks (refactoring, architecture, security analysis, performance optimization)
  • medium - Standard tasks (refactoring, code organization, feature additions, bug fixes)
  • low - Simple tasks (quick fixes, simple changes, code formatting, documentation)

Cached Input Discount: Cached context is substantially cheaper than first-pass context. Check current vendor pricing before quoting costs.

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.

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.

CLI Version

Requires Codex CLI v0.57.0 or later for GPT-5.2 model support. The CLI defaults to gpt-5.2 on macOS/Linux and gpt-5.2 on Windows. Check version: codex --version

Use /model slash command within a Codex session to switch models, or configure default in ~/.codex/config.toml.

Other skills for the same job

different authors, same section of the catalogue
Changelog Generator
by frostant
×9

Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.

774 tokens
Codex
by softaworks
×2

Use when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing. Uses GPT-5.2 by default for state-of-the-art software engineering.

2k tokens
Memory Safety Patterns
by ComeOnOliver
×2

Implement memory-safe programming with RAII, ownership, smart pointers, and resource management across Rust, C++, and C. Use when writing safe systems code, managing resources, or preventing memory bugs.

6k tokens
Pysam
by K-Dense-AI
×1

Python/HTSlib workflows for genomic files. Use when reading, querying, filtering, or writing SAM/BAM/CRAM, VCF/BCF, FASTA/FASTQ, or tabix data with pysam, including pileup, coverage, indexing, and CRAM references.

34k tokens scripts
Scientific Critical Thinking
by K-Dense-AI
×1

Evaluate scientific claims and evidence quality. Use for assessing experimental design validity, identifying biases and confounders, applying evidence grading frameworks (GRADE, Cochrane Risk of Bias), or teaching critical analysis. Best for understanding evidence quality, identifying flaws. For formal peer review writing use peer-review.

26k tokens
Gh Fix CI
by openai
vendor ×1

Use when a user asks to debug or fix failing GitHub PR checks that run in GitHub Actions; use `gh` to inspect checks and logs, summarize failure context, draft a fix plan, and implement only after explicit approval. Treat external providers (for example Buildkite) as out of scope and report only the details URL.

8k tokens scripts
Declarative Agent Developer
by microsoft
vendor ×1

> Create, build, deploy, and localize declarative agents for M365 Copilot and Teams. USE THIS SKILL for ANY task involving a declarative agent — including localization, scaffolding, editing manifests, adding capabilities, and deploying. Localization requires tokenized manifests and language files that only this skill knows how to produce. "scaffold an agent", "new agent project", "add a capability", "add a plugin", "configure my agent", "deploy my agent", "fix my agent manifest", "edit my agent", "localize my agent", "add localization", "translate my agent", "multi-language agent", "add an API plugin", "add an MCP plugin", "add OAuth to my plugin", "review instructions", "improve instructions", "fix my instructions"

66k tokens
Documentation
by lingxling
×1

Documentation generation workflow covering API docs, architecture docs, README files, code comments, and technical writing.

1k tokens

How to use it

Copy the folder

Take jdrhyne/codex from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.