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
- holylight1979/AtomicMemory-ClaudeCodetheir own version, first seen Nov 8, 2026
- mxrsv/agents-skillstheir own version, first seen Nov 8, 2026
- hemal08ce094/DesignSkillsSwiftUItheir own version, first seen Nov 8, 2026
- hurleywgly/skillstheir own version, first seen Nov 8, 2026
- puck-muling/peer-agenttheir own version, first seen Nov 8, 2026
- timurgaleev/vibestacktheir own version, first seen Nov 8, 2026
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-811Skillios-sync
Regenerate the iOS debug bridge against the latest upstream gstack templates. (gstack)
Also in 6 projects that use this
transitive-bullshitSkillcompare-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
dzhngSkillimplement-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-811Skillios-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-chenSkilltouchdesigner-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-incSkillminecraft-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
Other versions135 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 135
- NousResearch/hermes-agent★ 262ksame name
- garrytan/gstack★ 141ksame name
- dzhng/jevgrep★ 3.2ksame name
- ispc/ispc★ 3ksame name
- bergside/awesome-design-skills★ 2.9ksame name
- dataplat/dbatools★ 2.9ksame name
- Lilac-Labs/gini-agent★ 1.9ksame name
- Open-Curiosity/gini-agent★ 1.9ksame name
- dzhng/skills★ 1.5ksame name
- clice-io/clice★ 1.4ksame name
125 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository3 other files it gives its agents.
- claude-cliSkill
- feature-designSkill
- geminiSkill
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
- Distinctive: line 16
Do NOT trigger when:
- Distinctive: line 23
Before this skill works, the user must have:
- Distinctive: line 30
If the user hasn't done this, the skill should tell them and stop, not try to proceed.
- Distinctive: line 36
Run a quick sanity check via Bash:
- Distinctive: line 42
If the command fails or returns nothing, tell the user:
- Distinctive: line 46
Stop. Do not attempt the call.
- Distinctive: line 55
If the prompt is long, write it to a temp file rather than passing it inline — long shell-arg strings have quoting hazards.
- Distinctive: line 63
Run from the project's working directory (typically the repo root) so Codex can read files referenced in the prompt.
- Distinctive: line 85
If the response is long, summarize first and offer the full text on request.
- Very specific: line 108
If Cowork exposes a way to invoke Windows binaries from Bash, use that path.
“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.
Files
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:
- Codex CLI installed and on PATH. Install with
npm install -g @openai/codex(Node 20+) or via the official installer. - Auth configured — either:
codex loginhas been run (creates~/.codex/auth.json), ORCODEX_API_KEYenv var is set (note: notOPENAI_API_KEY— theexecsubcommand specifically readsCODEX_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 --versionIf 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 runcodex loginto 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/nullRun 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/nullStep 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
| Symptom | Likely cause | Action |
command not found | Codex CLI not installed or not on PATH | Tell user to install per Setup section |
Authentication failed / 401 | codex login not run, or auth expired, or CODEX_API_KEY missing | Tell user to re-auth |
outside a git repo | Missing --skip-git-repo-check | Add the flag (this skill always passes it; if you see this, the invocation got mangled) |
| Hangs forever | Codex waiting on TTY input — happens when stdin is an empty pipe | Always pass the prompt as a positional arg, not via redirected stdin. See openai/codex#20919 |
| Empty stdout, content on stderr | 2>/dev/null was dropped or the run errored before producing output | Re-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:
- Install Codex CLI inside the sandbox (
npm install -g @openai/codexfrom within Bash) — auth files won't persist between sessions, so re-auth each session viaCODEX_API_KEYenv var. - If Cowork exposes a way to invoke Windows binaries from Bash, use that path. Verify by trying
codex --versionfrom within Bash; if it works, you're set.
This is a known caveat to validate during first-time setup, not a blocker.
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
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.

