agentleFS
choughtonchoughton/feature-design-prompt-templates/skills/codex/SKILL.md

codex

Skill1 starsChanged 6 months agoMITView on GitHub

Invoke OpenAI Codex CLI from inside a Claude session to get an independent response from a non-Claude model. Trigger when the user asks to "ask Codex", "get Codex's take", "have Codex review", "second opinion from Codex", "run this past Codex", or when running a multi-model crossfire that needs an independent OpenAI-side perspective. Sends a prompt to Codex via `codex exec` and returns the plain-text response. Used by the feature-design plugin's crossfire stages but also independently useful for any second-opinion task.

  • Reads credentials
  • Installs packages

135 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use ios-sync, compare-screenshots and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Saqlain-811Skill

    ios-sync

    Regenerate the iOS debug bridge against the latest upstream gstack templates. (gstack)

    Also in 6 projects that use this

  • transitive-bullshitSkill

    compare-screenshots

    Compare screenshots against the intended design, distinguishing approved references from historical baselines. Use for iterative implementation matching, before/after visual review, objective image telemetry, or checking a lone capture for flat, empty, or badly framed content.

    Also in 5 projects that use this

  • dzhngSkill

    implement-spec-with-codex

    Run [implement-spec](../implement-spec/SKILL.md) with Codex doing the implementation passes while you orchestrate, integrate, and review. Use when the user asks to implement a spec with Codex, or to run implement-spec with Codex as the implementer.

    Also in 4 projects that use this

  • Saqlain-811Skill

    ios-clean

    Remove the DebugBridge SPM package and all #if DEBUG wiring from an iOS app. (gstack)

    Also in 5 projects that use this

  • john-data-chenSkill

    touchdesigner-mcp

    Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.

    Also in 7 projects that use this

  • math-incSkill

    minecraft-modpack-server

    Set up a modded Minecraft server from a CurseForge/Modrinth server pack zip. Covers NeoForge/Forge install, Java version, JVM tuning, firewall, LAN config, backups, and launch scripts.

    Also in 5 projects that use this

  • +1 more from Saqlain-811

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 9 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 111 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do NOT trigger when:

    line 16
  2. Distinctive:

    Before this skill works, the user must have:

    line 23
  3. Distinctive:

    If the user hasn't done this, the skill should tell them and stop, not try to proceed.

    line 30
  4. Distinctive:

    Run a quick sanity check via Bash:

    line 36
  5. Distinctive:

    If the command fails or returns nothing, tell the user:

    line 42
  6. Distinctive:

    Stop. Do not attempt the call.

    line 46
  7. Distinctive:

    If the prompt is long, write it to a temp file rather than passing it inline — long shell-arg strings have quoting hazards.

    line 55
  8. Distinctive:

    Run from the project's working directory (typically the repo root) so Codex can read files referenced in the prompt.

    line 63
  9. Distinctive:

    If the response is long, summarize first and offer the full text on request.

    line 85
  10. Very specific:

    If Cowork exposes a way to invoke Windows binaries from Bash, use that path.

    line 108

“Common” is measured: kept by at least 6 in 10 of the 111 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Codex CLI Runner

Invokes OpenAI's Codex CLI in non-interactive mode to get an independent response from a non-Claude model. The skill shells out via the Bash tool, captures stdout, and returns the response cleanly.

When to use

  • The user explicitly asks to consult Codex ("ask Codex", "what does Codex think", "second opinion from Codex")
  • A crossfire-style multi-model review needs an independent OpenAI-side perspective
  • The user wants an external check on a design, code change, or argument and Codex is the chosen reviewer

Do NOT trigger when:

  • The user is asking about Codex CLI itself (use docs, not this skill)
  • The task can be answered from your own knowledge — don't pay the latency/cost for nothing
  • Codex CLI isn't installed (see "Setup check" below)

Setup the user needs

Before this skill works, the user must have:

  1. Codex CLI installed and on PATH. Install with npm install -g @openai/codex (Node 20+) or via the official installer.
  2. Auth configured — either:
    • codex login has been run (creates ~/.codex/auth.json), OR
    • CODEX_API_KEY env var is set (note: not OPENAI_API_KEY — the exec subcommand specifically reads CODEX_API_KEY)

If the user hasn't done this, the skill should tell them and stop, not try to proceed.

How to invoke

Step 1 — Check that Codex is available

Run a quick sanity check via Bash:

command -v codex && codex --version

If the command fails or returns nothing, tell the user:

Codex CLI doesn't appear to be installed or on PATH. Install with npm install -g @openai/codex (Node 20+ required), then run codex login to authenticate, then retry.

Stop. Do not attempt the call.

Step 2 — Construct the prompt

Decide what prompt to send Codex. For most uses this comes from:

  • The user's request (if they asked for Codex's take on a specific question)
  • A file path the user provided
  • A prompt the parent flow assembled (e.g. a crossfire prompt + source document, in the future feature-design crossfire commands)

If the prompt is long, write it to a temp file rather than passing it inline — long shell-arg strings have quoting hazards.

Step 3 — Run Codex from the project directory

codex exec --skip-git-repo-check --sandbox read-only "$PROMPT" 2>/dev/null

Run from the project's working directory (typically the repo root) so Codex can read files referenced in the prompt. Crossfire reviewers don't just respond to inlined text — they read the project's PRD, Codex docs, code, etc. via the CLI's filesystem tools.

Flag rationale:

  • exec — non-interactive subcommand; required to avoid landing in the Codex REPL
  • --skip-git-repo-check — Codex refuses to run outside a git repo by default; this disables the check (handy if the project happens to not be a git repo, though most are)
  • --sandbox read-only — safest default for review work. Codex can read files; cannot write, edit, or hit network. Right shape for adversarial review.
  • 2>/dev/null — suppresses Codex's progress/thinking-token stream on stderr; the final response goes to stdout

For long prompts, prefer reading from a file:

codex exec --skip-git-repo-check --sandbox read-only "$(cat /path/to/prompt.md)" 2>/dev/null

Step 4 — Capture and return

Capture stdout. The full response is the model's final message. Present it back to the user with light framing — typically:

Codex says:

<response>

If the response is long, summarize first and offer the full text on request.

Optional flags worth knowing

  • --ephemeral — don't persist the session rollout to disk. Use for crossfire so review runs don't pollute the user's session history.
  • -m <model> — pick a specific model. Default is fine for most uses; specify when the user asks for a particular Codex model.
  • -o /path/last.md — also write the final response to a file. Useful when the parent flow wants the response saved alongside other crossfire artifacts.
  • --json — return newline-delimited JSON events instead of plain text. Use only if the parent flow needs structured event output.

Error handling

SymptomLikely causeAction
command not foundCodex CLI not installed or not on PATHTell user to install per Setup section
Authentication failed / 401codex login not run, or auth expired, or CODEX_API_KEY missingTell user to re-auth
outside a git repoMissing --skip-git-repo-checkAdd the flag (this skill always passes it; if you see this, the invocation got mangled)
Hangs foreverCodex waiting on TTY input — happens when stdin is an empty pipeAlways pass the prompt as a positional arg, not via redirected stdin. See openai/codex#20919
Empty stdout, content on stderr2>/dev/null was dropped or the run errored before producing outputRe-run without stderr suppression to see the actual error

Windows / Cowork sandbox note

Codex CLI installs to the host OS (typically Windows in Cowork's case). Cowork's Bash tool runs in an isolated Linux sandbox. If the sandbox can't reach the host's codex binary, this skill will fail at the Step-1 sanity check. Workarounds in priority order:

  1. Install Codex CLI inside the sandbox (npm install -g @openai/codex from within Bash) — auth files won't persist between sessions, so re-auth each session via CODEX_API_KEY env var.
  2. If Cowork exposes a way to invoke Windows binaries from Bash, use that path. Verify by trying codex --version from within Bash; if it works, you're set.

This is a known caveat to validate during first-time setup, not a blocker.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.