codex

codex is a skill for Codex from XiaomiMiMo/MiMo-Code. It costs 108 tokens per session (2,367 once invoked), scanned A, original, MIT.

A guide for running OpenAI Codex CLI as a non-interactive coding worker from Bash, PowerShell, CI, containers, or servers. Non-interactive means it runs from a command without requiring someone to use a terminal interface during the job.

In plain words
What is it for?
Use it to construct Codex commands for automation, batch jobs, CI/CD pipelines, Docker or Kubernetes tasks, and remote coding work.
Why use it?
It helps automate coding tasks consistently while choosing suitable sandbox, approval, authentication, and operating-system settings.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: reads ~/.codex paths; runs codex exec; mentions AGENTS.md.

Good fit Use it to construct Codex commands for automation, batch jobs, CI/CD pipelines, Docker or Kubernetes tasks, and remote coding work.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xiaomimimo/mimo-code/codex
About the project

MiMoCode is a terminal-based AI coding assistant that reads and writes code, runs commands, manages Git, and remembers project context across sessions. Developers use it to work with software projects through a command-line interface and connect it to language-model providers; the catalogue includes skills and instructions for it.

XiaomiMiMo/MiMo-Code · 13,664 stars · on GitHub · mimo.xiaomi.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add XiaomiMiMo/MiMo-Code --skill codex
Clone the repo
git clone --depth 1 https://github.com/XiaomiMiMo/MiMo-Code

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for codex

README.md
[![agentmods](https://agentmods.dev/badge/skills/xiaomimimo/mimo-code/codex/github.svg)](https://agentmods.dev/skills/xiaomimimo/mimo-code/codex)
Your own site
<a href="https://agentmods.dev/skills/xiaomimimo/mimo-code/codex"><img src="https://agentmods.dev/badge/skills/xiaomimimo/mimo-code/codex/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for codex

Your own site · 80×15
<a href="https://agentmods.dev/skills/xiaomimimo/mimo-code/codex"><img src="https://agentmods.dev/badge/skills/xiaomimimo/mimo-code/codex.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,367 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 17 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Excessive Agency · line 17
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
  • high Excessive Agency · line 38
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
  • high Excessive Agency · line 50
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
  • high Excessive Agency · line 62
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
  • high Excessive Agency · line 125
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
  • high Excessive Agency · line 136
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
  • high Excessive Agency · line 145
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
  • high Excessive Agency · line 159
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
  • high Excessive Agency · line 176
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
  • high Excessive Agency · line 107
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
  • high Excessive Agency · line 113
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
  • high Excessive Agency · line 201
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
  • high Excessive Agency · line 207
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
  • high Excessive Agency · line 213
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
  • high Excessive Agency · line 236
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
  • medium Excessive Agency · line 77
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Rogue Agent · line 173
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00108 $0.02367
Opus 5.5 $0.00043 $0.00947
Sonnet 5.5 $0.00022 $0.00473
Haiku 4.5 $0.00011 $0.00237

Measured 1mo ago against content hash ccf6930ea4f1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

codex scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/cli/src/skill/builtin/.bundle/codex/SKILL.md · 302 lines

How it starts

The opening of the file, as written. The whole thing — 302 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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:

codex exec \
  -C /workspace/repo \
  --yolo \
  "Implement the task and validate the result."

Read the full file on GitHub · 302 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 302 lines · 108 tokens per session scan A ccf6930ea4f1

Subscribe to this mod's changes

codex is a skill published in the GitHub repository XiaomiMiMo/MiMo-Code (13,664 stars, last pushed yesterday), licensed MIT. It adds 108 tokens to every session and 2,367 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.