‹ 首页

codex

@darkroomengineering · 收录于 昨天 · 上游提交 昨天

Claude x Codex bridge — delegate mechanical or bulk implementation to the OpenAI Codex CLI, get an independent cross-model review of the current uncommitted diff, or ask Codex a read-only second-opinion question. Triggers "use codex", "have codex do", "have codex review", "have codex check", "codex exec", "second opinion from codex", "cross-check with codex", "delegate to codex", "ask codex". Use when you want a different model family to verify your own diff, parallelize bulk work, or get a fast read-only opinion without spending Claude turns.

适合你,如果需要在多个模型间并行工作或获取独立审查

/ 通过 npx 安装 校验哈希
npx oh-my-skill add darkroomengineering/cc-settings/codex
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- darkroomengineering/cc-settings/codex
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify darkroomengineering/cc-settings/codex
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
40GitHub stars
~911上下文体积 · 单文件
索引托管

怎么用

商店整理自技能原文 · 版本 fa04efc · 表述以原文为准
它做什么

Claude 可以将机械性或批量编码任务委托给 OpenAI Codex CLI,让 Codex 审查当前未提交的代码差异,或向 Codex 提问获取快速只读意见。

什么时候触发

当你想用不同模型验证自己的代码差异、并行处理批量工作,或在不消耗 Claude 轮次时快速获取意见,使用“use codex”等关键词触发。

装好后可以这样说
Codex 会在工作区生成文件,完成后审核差异。
Codex 会报告问题(高/中/低严重性)。
不修改代码,只返回建议。
技能原文 SKILL.md作者撰写 · MIT · fa04efc

Codex Bridge

Invoke the OpenAI Codex CLI from inside a Claude session. Three subcommands map to three distinct use cases.

All subcommands are called via:

bun "$HOME/.claude/src/scripts/codex-run.ts" <subcommand> [args]

Subcommands
exec -- delegate mechanical or bulk work
bun "$HOME/.claude/src/scripts/codex-run.ts" exec "the full task description"

Runs Codex in a workspace-write sandbox. Use this when a task is:

  • Mechanical (repetitive edits, file scaffolding, boilerplate generation)
  • Bulk (touching many files at once where Claude's serial context would be slow)
  • Parallelizable with Claude's own work (start Codex on one half while Claude handles the other)

Quota routing: Codex is metered by messages per ~5-hour window, not by tokens. Hand it one big complete task, not a sequence of small steps. A single exec call for a whole feature costs the same quota as one exec call for a single file.

After exec returns, ALWAYS review Codex's diff before trusting it:

git diff

Then run the proof gate:

bun run proof
review -- independent cross-model diff review
bun "$HOME/.claude/src/scripts/codex-run.ts" review

Runs in a read-only sandbox. Codex reads the repo itself (git diff, git status) and reports findings by severity (HIGH / MEDIUM / LOW), covering correctness bugs, security issues, and obvious quality problems.

Use this after you have finished a diff and want a second opinion from a different model family. Codex and Claude have different blind spots — cross-model review catches what Opus self-review misses. This is the primary reason to prefer review over asking Claude to review its own output.

ask -- read-only second opinion
bun "$HOME/.claude/src/scripts/codex-run.ts" ask "your question here"

Runs in a read-only sandbox. Use for quick factual questions, architecture opinions, or anything where you want a fast external perspective without making any changes.


Quota and cost guidance
  • Codex is on a Pro-class plan metered by messages per ~5-hour window (not by tokens). Prefer FEW LARGE calls over many small ones.
  • Batch work: give exec a whole feature or module, not one function at a time.
  • review and ask are read-only and cheap — use them freely as a cross-check.
  • If the script reports the bridge is unavailable (not installed, not logged in, or rate-limited), continue Claude-only. Do not block the session.
  • Sessions get automatic steering: the quota-steer hook injects a routing reminder when Claude usage crosses 60% (5-hour) or 65% (weekly). If you see that reminder, prefer exec/review here over spawning Claude subagents.
  • The codex-verify SessionStart hook also injects a default-on routing policy whenever the bridge is available, so Codex review/exec is the default on diff-producing work, not just under quota pressure.

Availability states

The script handles all availability states gracefully. On failure it prints guidance to stderr and exits 1. Possible states:

  • not-installed -- install Codex CLI and run codex login
  • unauthenticated -- run codex login
  • no-access -- plan entitlement issue; try codex logout && codex login
  • rate-limited -- usage window exhausted; retry after the ~5-hour reset
  • unknown -- one-off error; safe to retry
按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。