codex

codex is a skill for Claude Code, Codex from yan-labs/yan-skills. It costs 95 tokens per session (2,378 once invoked), scanned B, original, MIT.

A skill that uses Codex as a background worker for generating images or handling coding tasks. It can also launch multiple workers for parallel code work.

In plain words
What is it for?
Creating images, asking a background worker to analyze or refactor code, and running several coding agents as a team.
Why use it?
It lets longer image-generation or coding jobs run in the background while control returns to you, with results checked later.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md; mentions subagents; names the AskUserQuestion tool.

Good fit Creating images, asking a background worker to analyze or refactor code, and running several coding agents as a team.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yan-labs/yan-skills/codex
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 yan-labs/yan-skills --skill codex
Clone the repo
git clone --depth 1 https://github.com/yan-labs/yan-skills

Made for: Claude Code, 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/yan-labs/yan-skills/codex/github.svg)](https://agentmods.dev/skills/yan-labs/yan-skills/codex)
Your own site
<a href="https://agentmods.dev/skills/yan-labs/yan-skills/codex"><img src="https://agentmods.dev/badge/skills/yan-labs/yan-skills/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/yan-labs/yan-skills/codex"><img src="https://agentmods.dev/badge/skills/yan-labs/yan-skills/codex.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 95 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,378 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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: 5 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 Agent Snooping · line 133
    Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.
    Fix: Remove all code or instructions that access agent configuration directories (.claude/, .codex/, .gemini/). If configuration values are needed, pass them explicitly as parameters or environment variabl
  • high Agent Snooping · line 172
    Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.
    Fix: Remove all code or instructions that access agent configuration directories (.claude/, .codex/, .gemini/). If configuration values are needed, pass them explicitly as parameters or environment variabl
  • high Agent Snooping · line 220
    Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.
    Fix: Remove all code or instructions that access agent configuration directories (.claude/, .codex/, .gemini/). If configuration values are needed, pass them explicitly as parameters or environment variabl
  • high Rogue Agent · line 208
    Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
    Fix: Prevent the skill from modifying its own code, SKILL.md, or configuration files. Treat skill files as read-only at runtime.
  • medium Rogue Agent · line 159
    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.00095 $0.02378
Opus 5.5 $0.00038 $0.00951
Sonnet 5.5 $0.00019 $0.00476
Haiku 4.5 $0.00010 $0.00238

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

Security

Grade B, and why

codex scanned grade B with 1 finding 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 21d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

1. **Pick reasoning effort + sandbox** from context — do not interrupt the user with `AskUserQuestion` unless they explicitly ask to be prompted. Model is `gpt-6.1-sol` (the default in `~/.codex/config.toml`; pass `-m` o
codex/SKILL.md · 115 lines

How it starts

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

Codex 后台代理

用 Codex CLI 承接用户指定的代码分析、编辑、审查或并行代理任务。图片生成的当前流程见 imagegen/SKILL.md;旧版操作与实验记录保存在 references/image-experiments.md。

路由前提:按全局 CLAUDE.md §2,编码、修 bug、调研与 review 默认用 fleet code(gpt-6.1-sol,见 agent-fleet),不手写 codex exec。本 Skill 只在用户明确要求直接操作 Codex CLI(自选 sandbox、codex review/apply/resume 等原生子命令、并行 worker 的 worktree 布置)时使用;简单派单不要先读本文件。

Core Principle

Never block the main conversation on a codex exec call. Always launch via Bash with run_in_background: true. The only exception is a trivial codex --version health check.

Launching a Codex Sub-Agent

  1. Pick reasoning effort + sandbox from context — do not interrupt the user with AskUserQuestion unless they explicitly ask to be prompted. Model is gpt-6.1-sol (the default in ~/.codex/config.toml; pass -m only when the user names another model in the current request). Defaults:
    • Reasoning effort: medium; low for single-file edits with clear boundaries. Never escalate to high/xhigh on your own (global §2); only when the user asks for it explicitly
    • Sandbox: read-only unless the task clearly needs edits (workspace-write) or network (danger-full-access)
  2. Write the prompt to a temp file when it's non-trivial (multi-line, contains quotes, long context). Pipe it via stdin so quoting never breaks:
    cat /tmp/codex-prompt-<tag>.md | codex exec --skip-git-repo-check \
      --config model_reasoning_effort="medium" \
      --sandbox read-only \
      -C <workdir> 2>/dev/null
    
  3. Launch with run_in_background: true. Record the returned shell id and a short tag (e.g. codex-review, codex-refactor-auth) so you can reference it later.
  4. Report the launch to the user in one line — e.g. "Launched Codex sub-agent codex-review (medium effort, read-only) in background." Then continue with other work or wait for user input. Do NOT sit and poll.
  5. 默认加 2>/dev/null 压低 stderr 噪音;排查启动失败或调试 CLI 时保留错误输出。
  6. Always pass --skip-git-repo-check. Put all flags between exec and resume (if resuming).

Read the full file on GitHub · 115 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. 21d ago Changed f88a87d058e6
  2. 22d ago Changed · -123 lines · -10 tokens per session 3b868a534887
  3. 24d ago Changed · +1 lines · +105 tokens per session 4689ee0840b2
  4. 1mo ago First seen · 237 lines · 0 tokens per session scan B 03fcfd2bd2b7

Subscribe to this mod's changes

codex is a skill published in the GitHub repository yan-labs/yan-skills (224 stars, last pushed 5d ago), licensed MIT. It adds 95 tokens to every session and 2,378 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories