codex-agent
Skill8 starsChanged 8 months agoMITView on GitHub
Delegates a task to OpenAI Codex CLI as a subagent and returns its response. Use this skill whenever the user wants Codex's opinion, a second opinion from Codex, wants to ask Codex to do something, wants to compare Claude vs Codex on a task, or says anything like "ask Codex", "have Codex look at this", "what does Codex think", "run this through Codex", or "get Codex to review". Also use when the user wants multiple AI perspectives on code, writing, or analysis.
- Reads credentials
- Installs packages
4 other projects use a version of this.
Adopted by
Most recently taken up by
- caesay/claude-codex-subagenttheir own version, first seen Nov 15, 2026
- ThendCN/ai-team-skillstheir own version, first seen Oct 16, 2026
- ejarmand/skillstheir own version, first seen Sep 23, 2026
- DaveZheng/claude-skillstheir own version, first seen Jul 16, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- ThendCN/ai-team-skills★ 96same name
- DaveZheng/claude-skills★ 1same name
- ejarmand/skills★ 1same name
- caesay/claude-codex-subagent★ 0same name
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 repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agentic-radarSkill
- gemini-agentSkill
- reflect-and-learnSkill
- vendor-docs-radarSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 2 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 26
Use model_reasoning_effort to control cost/latency tradeoff:
- Very specific: line 32
Use codex exec for non-interactive (headless) mode:
- Very specific: line 60
Use the phase parameter to get structured output from Codex, useful for parsing responses programmatically:
- Distinctive: line 69
Use the four-element structure (OpenAI best practice) when building prompts for Codex:
- Very specific: line 93
Run via Bash tool: codex exec "<prompt>"
- Distinctive: line 99
When reviewing a file, read it first and include its contents in the prompt:
“Common” is measured: kept by at least 6 in 10 of the 3 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 Agent Skill
Runs a prompt through the Codex CLI non-interactively and returns the full response.
Models
| Model | Flag | Use case |
| gpt-5.4 (default) | -c model="gpt-5.4" | 1M context, computer use, tool search. Best for complex analysis, long files, multi-step reasoning. |
| gpt-5.4-mini | -c model="gpt-5.4-mini" | 30% of full-model limits. Good for simple delegations, quick opinions, short reviews. |
Note: Model names change frequently. Update the table above when new models are released. Check
codex --helpor the vendor-docs-radar reports for the latest.
Use model_reasoning_effort to control cost/latency tradeoff:
-c model_reasoning_effort="high"— complex tasks (architecture review, debugging, research)-c model_reasoning_effort="low"— simple tasks (formatting, renaming, quick checks)
How to invoke
Use codex exec for non-interactive (headless) mode:
codex exec "<prompt>"Or pipe a long prompt via stdin:
echo "<prompt>" | codex exec -Or combine file content with a prompt:
cat <file> | codex exec - --config 'approval_policy="auto-edit"'Key flags
codex exec "<prompt>"— run non-interactively, prints response to stdout-c model="gpt-5.4"— use default model (1M context)-c model="gpt-5.4-mini"— use fast/cheap model for simple tasks-c model_reasoning_effort="high"— max reasoning for complex tasks-c 'sandbox_permissions=["disk-full-read-access"]'— allow file reads in sandbox
Structured output parsing
Use the phase parameter to get structured output from Codex, useful for parsing responses programmatically:
codex exec "<prompt>" -c phase="plan" # returns a structured plan
codex exec "<prompt>" -c phase="execute" # returns structured execution stepsPrompt Structure
Use the four-element structure (OpenAI best practice) when building prompts for Codex:
Goal: <what the task should accomplish>
Context: <relevant files, project state, background>
Constraints: <what NOT to do, boundaries, style rules>
Done-when: <clear completion criteria>Example:
codex exec "Goal: Find race conditions in the connection pool.
Context: $(cat src/pool.py)
Constraints: Do not suggest rewriting in async. Focus on threading bugs only.
Done-when: List each race condition with line number and a one-line fix."For simple one-shot questions (quick opinions, short reviews), a plain prompt is fine — reserve the four-element structure for tasks where precision matters.
Workflow
- Formulate the prompt using the four-element structure above — include all context Codex needs (paste file contents, code snippets, etc. directly into the prompt since Codex won't have access to local files unless you pass them)
- Choose model:
gpt-5.4for complex tasks,gpt-5.4-minifor simple ones - Run via Bash tool:
codex exec "<prompt>" - Capture stdout as the response
- Return Codex's full response to the user, clearly attributed as "Codex says:"
Passing file content
When reviewing a file, read it first and include its contents in the prompt:
codex exec "Review this code for bugs:\n\n$(cat path/to/file.py)"Or for long files, use stdin:
cat path/to/file | codex exec "Review this code for bugs:\n\n-"Notes
- Codex runs as a sandboxed agent — it may take 30-120 seconds for complex tasks
- For very long prompts (e.g., full papers), pipe via stdin rather than inline
- The response comes from OpenAI's models; clearly label it as coming from Codex when presenting to the user
codex execis the preferred mode for non-interactive automation (no TTY needed, CI-friendly)- gpt-5.4 supports 1M context — no need to truncate large files or codebases
Prerequisites
- Install Codex CLI:
npm install -g @openai/codexor follow https://github.com/openai/codex - Authenticate: set
OPENAI_API_KEYenvironment variable
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.

