Skills

Codex

Operate OpenAI Codex CLI in non-interactive headless environments.

Install

npx skills add XiaomiMiMo/MiMo-Code --skill codex -g -a claude-code -y
Repository
XiaomiMiMo/MiMo-Code13.7k
Category
AI and agents
Updated
3d ago
License
MIT
Context cost
Mediumabout 2,544 tokens
Runs scripts
No, instructions only

What it does

Operate OpenAI Codex CLI in non-interactive headless environments. Load only when the user explicitly authorizes this skill or names Codex / codex. Before any command, confirm the `codex` binary is available; if missing, stop and give install or auth guidance. Covers `codex exec` automation in Bash or PowerShell, native Windows or WSL2, scripts, CI/CD, Docker, Kubernetes, remote servers, agent harnesses, sandbox and approval modes, JSONL events, session resume, and stdin prompts.

Codex CLI

Use Codex CLI as a deterministic, non-interactive worker suitable for automation and agent orchestration.

Operating Rules

  1. Use codex exec, not the interactive codex TUI.
  2. Pass the task as the positional PROMPT argument. Do not use -p for the prompt; -p selects a profile.
  3. For ordinary unattended code changes, prefer:
codex exec \
  -C /path/to/repo \
  --sandbox workspace-write \
  --ask-for-approval never \
  "<TASK>"
  1. Use --yolo only inside an externally hardened and disposable runner. It disables Codex approvals and sandboxing.
  2. For harnesses and CI, prefer --json plus --output-last-message.
  3. Do not make the run depend on a human answering questions. Resolve ambiguity using repository evidence and conservative defaults.
  4. Treat credentials as secrets. Inject CODEX_API_KEY only into the single codex exec process when possible.
  5. Before giving version-sensitive advice, inspect codex exec --help or current official Codex documentation if available.
  6. On Windows, choose one execution environment per task: native PowerShell for Windows toolchains or WSL2 for Linux toolchains. Do not casually mix paths, installations, or authentication across them.

Choose the Execution Mode

Read-only analysis

Use when the task must not modify files:

codex exec \
  -C /path/to/repo \
  --sandbox read-only \
  --ask-for-approval never \
  "Analyze the repository and report risks. Do not modify files."

Workspace-scoped implementation

Use as the default for autonomous repository work:

codex exec \
  -C /path/to/repo \
  --sandbox workspace-write \
  --ask-for-approval never \
  "Implement the task, run relevant tests, and report unresolved blockers."

Externally isolated unrestricted execution

Use only when the enclosing container, VM, or sandbox enforces the real security boundary:

Read the whole SKILL.md on GitHub

More in AI and agents