
Codex CLI Automation
Run OpenAI Codex CLI headlessly for scripted, CI, and agent-driven coding tasks
- Repository
- XiaomiMiMo/MiMo-Code
- Stars
- 13,743
- Licence
- MIT
- Files
- 3 files
What it does
This skill teaches an AI agent how to drive OpenAI's Codex command-line coding tool without a human at the keyboard. It covers building the right codex exec command, choosing sandbox and approval modes, writing prompts that avoid interactive questions, and producing machine-readable JSON output or structured results. Once installed, the agent can hand a repository task to Codex in a script or pipeline and read back the outcome.
Great for
- Developers automating code changes, test fixing, or repo analysis with Codex in scripts or CI/CD
- Teams running Codex inside Docker, Kubernetes, or remote servers as a worker in an agent pipeline
- Windows users deciding between native PowerShell and WSL2 for Codex runs
Skip it if
- Anyone who has not installed the codex binary or set up authentication; the skill tells the agent to stop and give install guidance in that case
- Running the --yolo unrestricted mode on a normal developer machine or a runner holding secrets, SSH keys, cloud credentials or a Docker socket, because it disables approvals and sandboxing
Try asking
- “Use Codex headlessly to analyse this repo for risks without modifying any files”
- “Run codex exec in workspace-write mode to implement this ticket and fix the failing tests”
- “Stream Codex JSONL events to a file while it refactors the API module in CI”
- “Resume the last Codex session in this directory and finish the remaining fixes”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 3 original files, the MIT licence and an attribution note.
codex.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip codex.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip codex.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Keep the default sandbox at workspace-write and use read-only for analysis; only use --yolo inside a hardened, disposable container.
- Inject CODEX_API_KEY only into the single codex exec process rather than exporting it globally.
- Give Codex a clear task prompt and the autonomous-work instructions so it resolves ambiguity instead of stopping for input.
What's inside
- references/recipes.md
- references/windows.md
- SKILL.md
Redistributed unmodified from XiaomiMiMo/MiMo-Code under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.