codexmcp-using

A guide for using CodexMCP, a service that lets you delegate coding tasks to the Codex command-line tool. It covers both tasks that wait for a result and tasks that run in the background.

In plain words
What is it for?
Use it to delegate code reviews, implementations, test work, or other coding tasks, including resuming, checking, or cancelling background jobs.
Why use it?
It explains how to send coding, review, testing, and long-running tasks with suitable access settings and track their progress.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/shilong20/codexmcp/codexmcp-using
Any agent
npx skills add shilong20/codexmcp --skill codexmcp-using
Clone the repo
git clone --depth 1 https://github.com/shilong20/codexmcp

Made for: Claude Code, Codex.

Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,302 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00061 $0.01302
Opus 5 $0.00030 $0.00651
Sonnet 5 $0.00012 $0.00260
Haiku 4.5 $0.00006 $0.00130

Measured 2d ago against content hash d82cc5b6b8c7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

codexmcp-using 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 2d 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.

skills/codexmcp-using/SKILL.md · 123 lines

How it starts

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

CodexMCP 使用指南

通过 MCP 调用 Codex CLI 执行编码任务。

工具一览

工具 类型 用途
codex 阻塞 等待完成后返回结果(主推
codex_dispatch 异步 立即返回,后台运行
codex_status 查询 查询任务状态/进度/结果
codex_cancel 控制 取消运行中的任务

快速参考

CallMcpTool(server="codex", toolName="codex", arguments={
  "prompt": "任务描述...",
  "cwd": "/absolute/path",
  "topic": "review-auth_module-v1",
  "sandbox": "read-only"
})
参数 必填 说明
prompt 任务指令
cwd 工作目录(绝对路径)
topic 任务标识,格式见下方
sandbox read-only / full-access
session_id 恢复之前的会话(多轮对话)

server 取决于 MCP 配置(常见:codexcodexmcp)。

Topic 命名

格式:<type>-<description>-v<version>

type 场景 sandbox
review 审阅、分析 read-only
implement 功能实现、修复、重构 full-access
longrun 长任务后台分派 full-access
test 测试补充、测试重构 full-access
  • description 用 _ 分割单词:auth_moduledb_migration
  • version 方便标记轮次:v1v2

Resume 规则:topic 版本号 +1(如 v1v2),传入上次的 session_id。 版本号变化不会创建新 worktree——worktree 和分支名基于 <type>-<description> 生成(不含版本),自动复用。

示例:review-auth_handler-v1implement-user_register-v1longrun-async_refactor-v1

模式选择

默认使用阻塞模式(codex)。 仅在满足以下条件时使用 codex_dispatch

  1. 用户明确要求分派/后台执行/长任务,
  2. 你有清晰的计划,Codex 后台执行期间你自己有实质性工作要做
需要 Codex 的任务
  │
  ├─ 审阅/分析 → codex (read-only)
  ├─ 写代码/修复 → codex (full-access)
  ├─ 多模块并行 → 多个 codex (full-access) 并发
  └─ 长任务 + 用户要求分派 → codex_dispatch (full-access)
场景 详情
代码审阅 scenarios/review.md
并行实现 scenarios/parallel.md
后台分派 scenarios/dispatch.md
MCP 不可用 scenarios/cli-fallback.md

Prompt 编写指南和完整示例已融入各场景文档中。

MCP 不可用处理

  1. 立即停止 — 不继续依赖 Codex 的步骤
  2. 告知用户 — 提供选项:"等待恢复" 或 "CLI 降级"(见 cli-fallback.md
  3. 严禁:自己执行 Codex 任务、编造结果、静默跳过

Read the full file on GitHub · 123 lines

Files

What ships with it

5 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. 2d ago First seen · 123 lines · 61 tokens per session scan A d82cc5b6b8c7

Subscribe to this mod's changes

codexmcp-using is a skill published in the GitHub repository shilong20/codexmcp (1 stars, last pushed 4mo ago), licensed MIT. It adds 61 tokens to every session and 1,302 once invoked, about $0.0003 per session on Opus 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-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

agent-host-chat-contributions

Build and review cross-cutting agent-host chat behavior through lifecycle contributions. Use when adding turn lifecycle side effects, prompt or context injection, restored-history transformation, protocol-action observation, or when reviewing changes that add code to AgentSideEffects or AgentService.

microsoft/vscode · 56 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens