codex-cli
Skill8 starsChanged 23 days agoMITView on GitHub
Interact with OpenAI Codex CLI for plan review, code review, and complex problem discussion. Supports either ChatGPT-account or API-key login, model selection, and multi-round conversations. Use when the user wants a second opinion from Codex on an implementation plan, a diff, or a hard technical question, or invokes /codex-cli. Usage: /codex-cli <command> [options]
- Reads credentials
23 other projects use a version of this.
Adopted by
Most recently taken up by
- kortix-ai/sunatheir own version, first seen Nov 8, 2026
- kortix-ai/CompanyOStheir own version, first seen Nov 8, 2026
- legibet/agent-skillstheir own version, first seen Nov 1, 2026
- samirpatil2000/skillstheir own version, first seen Nov 1, 2026
- sugarforever/01coder-agent-skillstheir own version, first seen Nov 1, 2026
- deedeeharris/claude-skillstheir own version, first seen Oct 18, 2026
Used with
Projects with it also use opencode-cli, antigravity-cli and 6 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.
julweberSkillopencode-cli
Expert control of opencode via the command line. Use when running opencode TUI, headless server, web UI, or the `run` non-interactive mode; managing sessions, providers, agents, MCP servers, models, stats, import/export, GitHub integration, debugging, database tools, upgrades, or shell completions.
Also in 5 projects that use this
yu-iskwSkillantigravity-cli
Executes coding, review, research, and automation tasks using Google Antigravity CLI (`agy`). Uses Antigravity's native fine-grained allow/ask/deny permissions instead of Gemini CLI approval modes.
Also in 3 projects that use this
julweberSkillclaude-cli
Expert control of the `claude` CLI (Claude Code). Use when running Claude Code interactively or non-interactively, managing sessions, configuring MCP servers, managing plugins, handling authentication, or piping prompts through claude for scripting.
Also in 3 projects that use this
ihiteshguptaSkillterraform
Expert in Infrastructure as Code with Terraform. Use for creating, managing, and versioning infrastructure across cloud providers.
Also in 3 projects that use this
mrgoonieSkillclaude-code
Also in 4 projects that use this
GoogleSkillponytail
Forces the laziest solution that actually works, simplest, shortest, most minimal. Channels a senior dev who has seen everything: question whether the task needs to exist at all (YAGNI), reach for the standard library before custom code, native platform features before dependencies, one line before fifty. Supports intensity levels: lite, full (default), ultra. Use on ANY coding task: writing, adding, refactoring, fixing, reviewing, or designing code, and choosing libraries or dependencies. Also use whenever the user says "ponytail", "be lazy", "lazy mode", "simplest solution", "minimal solution", "yagni", "do less", or "shortest path", or complains about over-engineering, bloat, boilerplate, or unnecessary dependencies. Do NOT use for non-coding requests (general knowledge, prose, translation, summaries, recipes).
Also in 4 projects that use this
Other versions23 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 23
- kortix-ai/suna★ 21ksame name
- kortix-ai/CompanyOS★ 21ksame name
- wentorai/Research-Claw★ 858same name
- scarletkc/agents★ 227same name
- revfactory/skills★ 160same name
- sugarforever/01coder-agent-skills★ 139same name
- georgekhananaev/claude-skills-vault★ 28same name
- samirpatil2000/skills★ 17same name
- mr-ske1r/1c-ai-devstart★ 16same name
- deedeeharris/claude-skills★ 7same name
13 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 repository2 other files it gives its agents.
- context-architectSkill
- learnSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.
0
Common
Most of the 20 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 36
Logged in — two supported paradigms: Check the current one first:
- Very specific: line 60
Check yours: the codex exec header prints sandbox: <mode>, or read sandbox_mode in ~/.codex/config.toml.
- Very specific: line 138
Do NOT background short ask/single-file reviews — the realtime reasoning trace is more useful in foreground.
“Common” is measured: kept by at least 6 in 10 of the 20 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 Interaction Skill
Interact with OpenAI Codex CLI to leverage its reasoning for plan review, code analysis, and complex problem discussions.
Naming: "codex-cli" Skill = this document. "Codex CLI" = the OpenAI command-line tool being invoked.
🚨 Model Rule — READ FIRST
- If the user names a model, use exactly that model. Respect the user's choice.
- If the user does NOT name a model, do NOT pass
-mor-c model=at all. Let Codex use the default from~/.codex/config.toml. - Never hardcode a model name. Model names change across Codex releases, and the names available under ChatGPT-account login differ from those under API-key login. Hardcoding a name is the #1 cause of "model does not exist" failures.
- To see the active default without guessing: run any
codex exec— its header printsmodel: <name>— or read themodel = "..."line in~/.codex/config.toml.
codex exec IS an agent loop (not single-shot)
codex exec is non-interactive, which is NOT the same as "single-shot". Each codex exec call runs a full agent loop: Codex autonomously reads files, greps, runs shell commands, and reasons over many steps before returning. "Non-interactive" only means there is no human back-and-forth mid-run — it does not reduce Codex's agentic capability.
- This is why the skill uses
codex exec(not the interactive TUI): you can't drive an interactive terminal from another agent, butexecgives you the same autonomous loop. - For a follow-up round (e.g. round 2 of a review), continue the SAME session:
codex exec resume <session-id> "<follow-up>". Capture thesession id:printed in round 1's header. - Do NOT use
resume --lastin automation.--lastresolves to the most recent session globally; any concurrent Codex call steals "last", so you resume the wrong thread. Always resume by explicit<session-id>.
Prerequisites
- Codex CLI installed
Install path depends on your installer (e.g.which codex && codex --version~/.local/bin/codex, or a package manager). If missing, follow the OpenAI Codex CLI install docs. Logged in — two supported paradigms. Check the current one first:
codex login statusParadigm A — ChatGPT account (OAuth). Uses your ChatGPT subscription quota and rate limits.
codex login # opens a browser to authorize; no API key neededcodex login status→Logged in using ChatGPT.Paradigm B — API key. Billed per API usage.
codex login --with-api-key # reads the key from stdin # non-interactive: codex login --with-api-key <<< "$OPENAI_API_KEY"codex login status→Logged in using an API key - sk-***.The skill's commands are identical under both paradigms. What differs: billing, rate limits, and which model names are available — which is exactly why you must not hardcode
-m(see Model Rule).
Sandbox — what actually runs
codex exec's nominal default isread-only, but~/.codex/config.toml(sandbox_mode) overrides it. If your config setsdanger-full-access, commands run with full write access unless you pass-s read-onlyexplicitly.- This skill follows your config; it does NOT force a sandbox. For a guaranteed no-writes review, add
-s read-only. - Check yours: the
codex execheader printssandbox: <mode>, or readsandbox_modein~/.codex/config.toml.
Capabilities inside codex exec
| Capability | Status | Notes |
| Shell + file tools | ✅ stable | Codex autonomously reads your repo, greps, runs commands (subject to sandbox). |
| Web / internet search | ⚠️ not available by flag | codex exec has no --search flag (only the interactive codex --search has one), and the old web_search_* feature flags are deprecated. Do not assume Codex can browse the web from exec. |
browser_use / computer_use | ⚠️ account-only | Depend on the ChatGPT.app ecosystem; unreliable under non-interactive exec. |
CLI Flag Reference
⚠️
codex reviewandcodex exec reviewhave DIFFERENT flags.
codex review(top-level): NO-mflag. Set a model with-c model="..."only.codex exec review: supports-mand-c model="...".
Flag Compatibility Matrix
| Flag | codex review | codex exec review | codex exec "prompt" |
-m, --model | NO | YES | YES |
-c, --config | YES | YES | YES |
--uncommitted | YES | YES | NO |
--base | YES | YES | NO |
--commit | YES | YES | NO |
-s, --sandbox | NO | NO | YES |
--skip-git-repo-check | NO | YES | YES |
Recommended Command Forms
These follow your
config.tomlmodel by default. Add-c model_reasoning_effort="..."to override effort; add a model flag ONLY if the user named a model.
Code review (use top-level codex review — simplest)
codex review --uncommitted # review staged+unstaged+untracked
codex review --base main # review changes vs a branch
codex review --commit HEAD~1 # review a specific commit
# A review target (--uncommitted/--base/--commit) cannot be combined with custom
# instructions. For a focused review, use exec and name the diff in the prompt:
# codex exec -s read-only "Review git diff main...HEAD for <focus>. Report file:line findings."
# effort override: codex review --uncommitted -c model_reasoning_effort="high"
# user named model M: codex review --uncommitted -c model="M" # NOTE: -c, not -mPlan review / questions (use codex exec)
codex exec "Review this implementation plan: [...]
Evaluate: technical soundness, risks, missing considerations, approval status" \
--skip-git-repo-check
# guaranteed no writes: add -s read-only
# user named model M: add -m MCode review via exec (only when you need -m)
codex exec review --base main
codex exec review --uncommittedMulti-round review (preserve context)
# Round 1 — capture the session id printed in the header
codex exec review --uncommitted # header shows: session id: <UUID>
# Round 2+ — resume that EXACT session (never --last in automation)
codex exec resume <UUID> "Re-review after I addressed points 1 and 3."Reasoning Effort
- Default: follow config — do not pass an effort flag. Your config may already set a high tier (e.g.
xhigh). - Override per call:
-c model_reasoning_effort="medium|high|xhigh". - Rule of thumb if you must choose: short questions →
medium; reviews/plans →high; critical →xhigh.
Long-Running Calls — Background Mode
For calls expected to exceed ~60s (xhigh effort, --base on large diffs, full-repo audits):
- Invoke via
Bash(run_in_background=true)so the main session stays responsive; Claude Code writes the output to a file — read it withReadwhen the command finishes, or run the command withMonitorto receive output lines as they arrive. - Sampling tip: launch 2–3 background runs of the same prompt in parallel — Codex output is non-deterministic, and merging runs surfaces more real issues than one run.
- Do NOT background short
ask/single-file reviews — the realtime reasoning trace is more useful in foreground. - ❌ Do NOT invoke Codex via a subagent (
Agenttool). Run it from the main session withBash(run_in_background=true)instead.
User Interface (how the skill is invoked)
/codex-cli ask "question" # quick question
/codex-cli "question" # shorter form of ask
/codex-cli reviewplan # review an implementation plan
/codex-cli review --uncommitted # review uncommitted changes
/codex-cli review --base main # review changes vs branchMap each to the recommended command forms above.
Output Format
Relay Codex feedback faithfully — do not summarize or filter. After each interaction:
=== CODEX FEEDBACK [Round N/MAX] ===
Model: <from header> Reasoning: <effort> Status: APPROVED / NEEDS REVISION
[Codex full response]
=== END CODEX FEEDBACK ===Troubleshooting
| Symptom | Fix |
command not found: codex | Not installed. which codex should return your install path. |
Authentication required | Not logged in. codex login (account) or codex login --with-api-key (API); verify with codex login status. |
model 'xxx' does not exist | You passed -m with a name unavailable in your login mode. Drop -m to use the config default. |
-m rejected on codex review | Top-level codex review has no -m. Use -c model="...", or switch to codex exec review. |
Specify --uncommitted, --base, or --commit | Review needs a target: --uncommitted / --base <branch> / --commit <sha>. |
| Resume ignored my prior context | You used --last with concurrent sessions. Resume by explicit <session-id>. |
| Command hangs | You invoked Codex via a subagent (Agent tool). Run it from the main session with Bash(run_in_background=true). |
Verify setup:
which codex && codex --version
codex login status
codex exec "reply OK" --skip-git-repo-check # header shows active model + sandboxSecurity & Privacy
- Code transmission: your code/prompts are sent to OpenAI for processing.
- Credentials: stored under
~/.codex/(auth.json). Keep the directory private. - Sensitive code: be mindful when reviewing code with secrets or proprietary logic.
- See OpenAI's data usage policies.
References
- OpenAI Models Documentation — model names change; verify against your login mode.
- Local source of truth for defaults:
~/.codex/config.tomlandcodex login status.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

