Agent skill

Local Codex

by daymade in daymade/claude-code-skills

Launches and manages the local OpenAI Codex CLI as a non-interactive coding sub-agent via ChatGPT Pro OAuth, never API keys.

MITAuto-check passedBackend & APIs

Install Local Codex

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

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

GitHub CLI
$ gh skill install daymade/claude-code-skills local-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/daymade/claude-code-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/daymade-codex/local-codex .claude/skills/local-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
local-codex
GitHub stars
1.4k
Token cost
~1.6k tokens
SKILL.md length
759 words
Files
3 (incl. scripts, references)
Skills in repo
102
Repo updated
First seen
Licence
MIT

At a glance

Launches and manages the local OpenAI Codex CLI as a non-interactive coding sub-agent via ChatGPT Pro OAuth, never API keys.

  • Works in 3 steps: Basic exec (single task) → Code review → Check status
  • Delegate coding tasks to Codex
  • SKILL.md covers When to Use, Authentication (OAuth /…, Codex CLI Path and Usage Patterns, plus 5 more sections
  • Runs Python scripts from its folder; calls codex and python3; needs OPENAI_API_KEY

What it does

Local Codex is an agent skill from daymade/claude-code-skills. Launches and manages the local OpenAI Codex CLI as a non-interactive coding sub-agent via ChatGPT Pro OAuth, never API keys. Use to delegate coding tasks to Codex, run codex exec, generate or refactor code, or get a Codex code review; phrases like 'codex', 'run codex', 'codex exec', 'delegate to codex'.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including scripts and reference files (for example `references/oauth-guide.md` and `scripts/codex_wrapper.py`).

It sits in Backend & APIs, covering OAuth and OpenID Connect, Subagents and Code review. It works with OpenAI. The repository describes itself as: Professional Claude Code skills marketplace featuring production-ready skills for enhanced development workflows. The licence is MIT.

When your agent uses it

  • Delegate coding tasks to Codex
  • Get a Codex code review
  • Phrases like codex
  • Delegate to codex

Example prompts

  • “run codex”
  • “codex exec”
  • “delegate to codex”
  • “/local-codex”

Requirements

  • Python 3
  • A credential in OPENAI_API_KEY

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Basic exec (single task)
  2. Code review
  3. Check status

What it can do on your machine

Read from SKILL.md and the folder at commit 3c268d6. 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

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • codex
    • python3

    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 these keys or tokens, usually read from environment variables:

    • OPENAI_API_KEY

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

Context cost

Local Codex loads about 1.6k tokens when it runs, and up to ~2.7k if it reads all its reference files. Until then it costs about 79 tokens; SKILL.md has 759 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~79
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.7k

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); the scripts in this folder are not scanned.

SKILL.md

The full file from daymade/claude-code-skills at commit 3c268d6, republished under its MIT licence (© daymade). 759 words, ~1,644 tokens.

Download SKILL.mdSave it as .claude/skills/local-codex/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
local-codex
description
Launches and manages the local OpenAI Codex CLI as a non-interactive coding sub-agent via ChatGPT Pro OAuth, never API keys. Use to delegate coding tasks to Codex, run codex exec, generate or refactor code, or get a Codex code review; phrases like 'codex', 'run codex', 'codex exec', 'delegate to codex'.

Local Codex

Delegate coding tasks to the local OpenAI Codex CLI agent using your ChatGPT Pro subscription (OAuth, no API charges).

When to Use

  • User wants to generate, refactor, or review code via Codex
  • User wants to run codex exec for non-interactive tasks
  • User wants to use Codex's GPT-5.5 agent capabilities
  • User mentions "codex", "run codex", "delegate to codex"

Authentication (OAuth / ChatGPT Pro)

CRITICAL: This skill uses OAuth authentication from ~/.codex/auth.json (ChatGPT Pro flat-rate subscription). Do NOT set OPENAI_API_KEY or pass API keys — that would switch to pay-per-use billing.

  • The ChatGPT.app desktop bundle and CLI share the same auth cache
  • If auth fails, run codex login in terminal (browser OAuth flow)
  • For auth issues, see references/oauth-guide.md

Codex CLI Path

The skill auto-detects Codex CLI in this order:

  1. CODEX_BIN env var, if set — explicit override. A non-executable path fails loudly instead of silently falling through to a different build (that would make whatever the wrapper measured unattributable).
  2. which codex — whatever is first on PATH. This is the build the surrounding environment actually runs, so it is the right default: npm global installs under nvm (~/.nvm/versions/node/*/bin/codex) resolve here.
  3. /Applications/ChatGPT.app/Contents/Resources/codex — the copy bundled inside ChatGPT.app, fallback only. Its version tracks the Desktop app and can diverge from the npm build, so it is deliberately last.

If a bad CODEX_BIN was set, the wrapper exits 1 with {"error": "CODEX_BIN not executable", "path": <value>} — the offending value is in the error itself, and searched_paths is not emitted for this case (no other search step ran). If neither PATH nor the app bundle has a codex, the wrapper exits 1 with the actual search order in searched_paths.

Whichever binary wins, attribute behaviour to it by versioning the binary that ran, not codex --version: the bare command always resolves the PATH copy, which is the wrong build to quote when the fallback picked the app-bundled one. Use the codex_path field from the wrapper's status output:

"<codex_path from status output>" --version

Two builds on one machine is the normal state, not an anomaly.

Usage Patterns

1. Basic exec (single task)
bash
python3 scripts/codex_wrapper.py exec "<prompt>" [<workdir>] [<model>] [<sandbox>] [<timeout>]

Example:

bash
python3 scripts/codex_wrapper.py exec \
  "Write a Python function to calculate fibonacci" \
  /tmp \
  gpt-5.5 \
  workspace-write \
  300
2. Code review
bash
python3 scripts/codex_wrapper.py review [<workdir>] [<model>] [uncommitted:true] [<timeout>]

Example:

bash
python3 scripts/codex_wrapper.py review \
  /path/to/repo \
  gpt-5.5 \
  true \
  300
3. Check status
bash
python3 scripts/codex_wrapper.py status

Output Format

The wrapper returns JSON with:

  • success: bool
  • exit_code: int
  • elapsed_seconds: float
  • stdout: raw output
  • stderr: error stream (truncated)
  • parsed_jsonl: parsed JSONL events (if --json)
  • final_message: extracted assistant text (if available)

Parameters

ParameterDefaultOptions
modelgpt-5.5gpt-5.5, gpt-5.5-pro, o4-mini, etc.
sandboxworkspace-writeread-only, workspace-write, danger-full-access
timeout300seconds (increase for large tasks)
json_outputtruealways true (wrapper parses JSONL)

Safety Notes

  • sandbox=read-only for analysis/review tasks (no file writes)
  • sandbox=workspace-write for code generation (writes to working dir)
  • sandbox=danger-full-access only when explicitly needed (full system access)
  • Always use --skip-git-repo-check when running outside git repos
  • Use --ephemeral for one-off tasks (no session persistence)
Show full SKILL.md (309 more words)Show less

Session Management

For multi-step tasks, Codex supports session resume:

bash
# First step
codex exec --ephemeral "Step 1..."
# Later
codex exec resume --last "Step 2..."

The wrapper currently runs single-shot exec. For multi-step workflows, use raw codex exec commands.

Limitations

  • Desktop app must be running for OAuth token refresh (or token must be fresh)
  • codex doctor works and is the first thing to run when Codex misbehaves. Run it without --summary — --summary cuts reachability down to a bare ✗ reachability ... unreachable line (it actually prints twice, once under Notes and once under Connectivity) with no host and no remedy, in both the fail and the warning state. The full form names the host, the endpoint statuses, and a → check proxy, ... remedy line, likewise in both states; what differs between fail and warning is which endpoint failed and whether it is marked (required). For --json, everything lives under checks["network.provider_reachability"]: details maps endpoint → status, and issues is a list whose objects carry severity / cause / measured / expected / remedy / fields (the last three are optional). Two traps: there is no top-level issues key at all — do not write report["issues"] (KeyError) or report.get("issues") (silently None); and a check's own issues key is omitted entirely when empty rather than sent as [], so check.get("issues") returns None for the 20+ checks that have nothing to report. Top level has exactly 5 keys, generatedAt is a string like "1790057704s since unix epoch" rather than a timestamp, and exit 1 fires on any failed check, not just reachability — rollout_db_parity is ⚠ on this install, and if it ever flips to fail it turns that exit code red for a reason unrelated to your network, which is what gates like codex-1m-context-window-setup's returncode == 0 check read. Verified 2026-09-22 on 0.155.1 (npm) and 0.155.0-alpha.9.2 (ChatGPT.app-bundled); the remedy wording quoted here is specific to those builds — upstream has since changed it.
  • Environment variables are NOT inherited into Codex's sandbox; pass via config or prompt
  • Large file operations may need increased timeout

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

Files

SKILL.md and 2 other files (scripts, references) in daymade-codex/local-codex of daymade/claude-code-skills.

  • SKILL.md
  • references/oauth-guide.md
  • scripts/codex_wrapper.py

Open the folder on GitHubat commit 3c268d6

Compare with similar skills

Local 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.

Local Codex compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Local Codex this skilldaymade/claude-code-skills1.4k—~1.6kAutomated safety check: PassMIT
Codex CLIsundial-org/awesome-openclaw-skills663—~2kAutomated safety check: PassNone
Auto DevflowHuangPuStar/FenixAgent552—~3kAutomated safety check: PassApache-2.0
Codex CLIkortix-ai/suna20k—~1.6kAutomated safety check: PassCustom licence
Review And Simplify ChangesDimillian/Skills4k—~2kAutomated safety check: PassMIT
Antipattern Preventiondoorkeeper-gem/doorkeeper5.5k—~1.1kAutomated safety check: PassMIT

Similar skills

  • Codex CLI

    sundial-org/awesome-openclaw-skills

    Use OpenAI Codex CLI for coding tasks. An agent skill from sundial-org/awesome-openclaw-skills.

    663 GitHub stars~2k tokensUpdated 7 mo ago
    DevelopmentAuto-check passed
  • Auto Devflow

    HuangPuStar/FenixAgent

    A skill your agent uses when starting an issue, bugfix, feature, or refactor that should be driven by multiple coordinated subagents: explore → plan → code → review, with the main agent acting as…

    552 GitHub stars~3k tokensUpdated 7 days ago
    DevelopmentAuto-check passed
  • Codex CLI

    kortix-ai/suna

    Drive OpenAI's Codex CLI (codex exec) as a non-interactive coding sub-agent from inside Claude Code.

    20k GitHub stars~1.6k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Review a git diff or explicit file scope for reuse, code quality, efficiency, clarity, and standards issues, then optionally apply safe Codex-driven fixes.

    4k GitHub stars~2k tokensUpdated 6 mo ago
    DevelopmentAuto-check passed
  • Antipattern Prevention

    doorkeeper-gem/doorkeeper

    Avoid common Ruby and Rails antipatterns that degrade maintainability and performance.

    5.5k GitHub stars~1.1k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Copilot PR Autopilot

    github/awesome-copilot

    Official

    Copilot left 14 review comments on your PR — half are nits. An agent skill from github/awesome-copilot.

    40k GitHub stars~3.4k tokensUpdated today
    Backend & APIsAuto-check passed

More from daymade/claude-code-skills

All 102 skills in this repo
  • Video Comparer

    daymade/claude-code-skills

    This skill should be used when comparing two videos to analyze compression results or quality differences.

    1.4k GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check: notes
  • CLI Demo Generator

    daymade/claude-code-skills

    Generates professional animated CLI demos as GIFs using VHS terminal recordings.

    1.4k GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Doc To Markdown

    daymade/claude-code-skills

    Converts DOCX/PDF/PPTX and saved HTML/HTM to high-quality Markdown with automatic post-processing.

    1.4k GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Interaction Design Board

    daymade/claude-code-skills

    Generates several distinct, clickable HTML interaction prototypes for one product surface into a Design Board and collects selection/remix feedback before implementation.

    1.4k GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Auto Repo Setup

    daymade/claude-code-skills

    Diagnoses and repairs repository setup and guarded Git workflows for Claude Code or Codex — environment repair, startup sync, hook auditing, collaborator handoff.

    1.4k GitHub stars~2.6k tokensUpdated today
    Auto-check: notes
  • Bigdata Skill

    daymade/claude-code-skills

    Pulls Bigdata.com (RavenPack) financial and news data via the official bigdata-client SDK and /v1/ REST endpoints — structured financials, prices, analyst estimates, entity-sentiment series…

    1.4k GitHub stars~3.7k tokensUpdated today
    Auto-check passed

Works with

Questions about Local Codex

What does Local Codex do?

Launches and manages the local OpenAI Codex CLI as a non-interactive coding sub-agent via ChatGPT Pro OAuth, never API keys. Local Codex is an agent skill from daymade/claude-code-skills. Launches and manages the local OpenAI Codex CLI as a non-interactive coding sub-agent via ChatGPT Pro OAuth, never API keys.

When should I use Local Codex?

Local Codex fits situations like: delegate coding tasks to Codex; get a Codex code review; phrases like codex; delegate to codex.

How do I install Local Codex in Claude Code?

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

How do I install Local Codex in Codex?

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

Can I use Local 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 daymade/claude-code-skills --skill local-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/local-codex, .gemini/skills/local-codex, .github/skills/local-codex and .opencode/skills/local-codex in your project.

What does Local Codex need to run?

Going by SKILL.md and its folder, Local Codex needs Python for the scripts in its folder, the command-line tools its instructions call (codex and python3) and credentials named OPENAI_API_KEY. Our summary lists: Python 3; A credential in OPENAI_API_KEY.

Does Local 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 Local 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Local Codex use?

Local 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 Local Codex use?

About 1.6k tokens (SKILL.md is roughly 6.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1k tokens, read only when the agent opens those files.

What are the alternatives to Local Codex?

Skills that share tags, products or a category with Local Codex: Codex CLI (sundial-org/awesome-openclaw-skills, 663 stars), Auto Devflow (HuangPuStar/FenixAgent, 552 stars), Codex CLI (kortix-ai/suna, 20k stars) and Review And Simplify Changes (Dimillian/Skills, 4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Local Codex?

daymade (a GitHub user) maintains it in daymade/claude-code-skills, which has 1,443 GitHub stars. The repository holds 102 skills in this directory. The repository was last updated on October 7, 2026.

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