adamsardo

OpenAI Codex Sub Agents

开发编程v1.0.0
作者:adamsardo更新于 2026-05-17codex-sub-agents@clawhub_adamsardo/codex-sub-agents
代码生成代码审查#Code Review#Subagent#Coding

据 AlphaMoat 统计,截至 2026-10,OpenAI Codex Sub Agents 累计下载 8,586 次、获 6 个星标,按累计下载量在本次参与排名的 10,914 个 AI 技能中排名第 3,235 位,在「开发编程」分类(1,069 个)中排名第 263 位。

列表默认按累计下载量排序,也可按星标排序;详情页排名按累计下载量计算。

累计下载
8,586
星标
6
全站下载量排名
#3,235
全站前 30% · 「开发编程」前 25%
平台累计下载星标评论
ClawHub ↗6,4516-
SkillHub ↗8,5866—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

Codex CLI 在本机运行并拥有完整文件系统访问,需要 ChatGPT Plus/Pro/Business/Enterprise 订阅;安装用 npm i -g @openai/codex,认证可 codex login 走浏览器 OAuth 或用 API key。提供交互式 TUI 与非交互 codex exec(支持 --full-auto 自动批准工作区写入、--json 输出、-i 附图),会话可 codex resume/--last/<SESSION_ID> 恢复;TUI 内有 /model(切换 gpt-5-codex、gpt-5)、/approvals、/review、/diff、/compact、/init、/mcp 等斜杠命令。审批模式分 Auto(默认,工作区内读写执行、区外询问)、Read Only、Full Access(含网络的完整机器访问,慎用);关键 flag 含 --cd、--add-dir、--sandbox、--search。与 Clawdbot 的集成有四种模式:直接 exec 调用、编码子代理委派、CLI 后端回退、以及 codex mcp-server 把 Codex 作为 MCP 服务器;认证自动从 ~/.codex/auth.json 同步,自定义提示词放在 ~/.codex/prompts/。

资料发布于 2026-10-27

可以用来做什么

  • 把代码审查、重构或 CI 修复交给 Codex CLI
  • 在大型代码库里做探索、解释与跨目录修改
  • 让 Clawdbot 以子代理或直接工具方式委派编码工作

什么时候用

  • 用户要求改代码、修 CI/构建失败、提交前审查或需要 GPT-5-Codex 的代码生成与工具调用能力时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

用 codex exec 修复 CI 的 lint 报错
把这个组件重构成用 React Query 取数
对着这张设计稿实现这个功能

月度数据趋势

累计下载8,586
4,9636,9098,8542026-05 · 累计下载 5,2312026-06 · 累计下载 5,4802026-07 · 累计下载 5,9172026-08 · 累计下载 6,1342026-09 · 累计下载 6,6562026-10 · 累计下载 8,58626-0526-0926-10
星标6
5672026-05 · 星标 62026-06 · 星标 62026-07 · 星标 62026-08 · 星标 62026-09 · 星标 62026-10 · 星标 626-0526-0926-10

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-108,586—6
2026-096,656—6
2026-086,134+3.7%6
2026-075,917+8.0%6
2026-065,480+4.8%6
2026-055,231—6

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

7.8 KB · ClawHub v1.0.0
---
name: codex-cli
description: "Use OpenAI Codex CLI for coding tasks. Triggers: codex, code review, fix CI, refactor code, implement feature, coding agent, gpt-5-codex. Enables Clawdbot to delegate coding work to Codex CLI as a subagent or direct tool."
---

# OpenAI Codex CLI Skill

Use OpenAI Codex CLI (`codex`) for coding tasks including code review, refactoring, bug fixes, CI repairs, and feature implementation. Codex CLI runs locally on your machine with full filesystem access.

## When to Use
展开全部(共 293 行)

- User asks for code changes, refactoring, or implementation
- CI/build failures need fixing
- Code review before commit/push
- Large codebase exploration or explanation
- Tasks requiring file editing + command execution
- When GPT-5-Codex model strengths are needed (code generation, tool use)

## Installation & Auth

Codex CLI requires ChatGPT Plus/Pro/Business/Enterprise subscription.

```bash
# Install
npm i -g @openai/codex

# Authenticate (opens browser for OAuth)
codex login

# Or use API key
printenv OPENAI_API_KEY | codex login --with-api-key

# Verify auth
codex login status
```

## Core Commands

### Interactive Mode (TUI)
```bash
codex                           # Launch interactive terminal UI
codex "explain this codebase"   # Start with a prompt
codex --cd ~/projects/myapp     # Set working directory
```

### Non-Interactive (Scripting)
```bash
codex exec "fix the CI failure"                    # Run and exit
codex exec --full-auto "add input validation"      # Auto-approve workspace writes
codex exec --json "list all API endpoints"         # JSON output for parsing
codex exec -i screenshot.png "match this design"   # With image input
```

### Session Management
```bash
codex resume               # Pick from recent sessions
codex resume --last        # Continue most recent
codex resume <SESSION_ID>  # Resume specific session
```

## Slash Commands (In TUI)

| Command | Purpose |
|---------|---------|
| `/model` | Switch model (gpt-5-codex, gpt-5) |
| `/approvals` | Set approval mode (Auto, Read Only, Full Access) |
| `/review` | Code review against branch, uncommitted changes, or specific commit |
| `/diff` | Show Git diff including untracked files |
| `/compact` | Summarize conversation to free context |
| `/init` | Generate AGENTS.md scaffold |
| `/status` | Show session config and token usage |
| `/undo` | Revert most recent turn |
| `/new` | Start fresh conversation |
| `/mcp` | List configured MCP tools |
| `/mention <path>` | Attach file to conversation |

## Approval Modes

| Mode | Behavior |
|------|----------|
| **Auto** (default) | Read/edit/run commands in workspace; asks for outside access |
| **Read Only** | Browse files only; requires approval for changes |
| **Full Access** | Full machine access including network (use sparingly) |

## Key Flags

| Flag | Purpose |
|------|---------|
| `--model, -m <model>` | Override model (gpt-5-codex, gpt-5) |
| `--cd, -C <path>` | Set working directory |
| `--add-dir <path>` | Add additional writable roots |
| `--image, -i <path>` | Attach image(s) to prompt |
| `--full-auto` | Workspace write + approve on failure |
| `--sandbox <mode>` | read-only, workspace-write, danger-full-access |
| `--json` | Output newline-delimited JSON |
| `--search` | Enable web search tool |

## Clawdbot Integration Patterns

### Pattern 1: Direct exec Tool
Call Codex from Clawdbot's exec tool for coding tasks:

```bash
# In Clawdbot session
exec codex exec --full-auto --cd ~/projects/medreport "fix the TypeScript errors in src/components"
```

### Pattern 2: Subagent Delegation
Spawn a coding subagent that uses Codex:

```json5
// In agents.defaults or per-agent config
{
  agents: {
    list: [
      {
        id: "coder",
        workspace: "~/clawd-coder",
        model: "openai-codex/gpt-5.2",  // Uses Codex auth
        tools: {
          allow: ["exec", "read", "write", "edit", "apply_patch", "process"]
        }
      }
    ]
  }
}
```

### Pattern 3: CLI Backend Fallback
Configure Codex as a text-only fallback:

```json5
{
  agents: {
    defaults: {
      cliBackends: {
        "codex-cli": {
          command: "codex",
          args: ["exec", "--full-auto"],
          output: "text",
          sessionArg: null  // Codex manages its own sessions
        }
      }
    }
  }
}
```

### Pattern 4: MCP Server Mode
Run Codex as an MCP server for other agents:

```bash
codex mcp-server  # Exposes Codex tools via stdio MCP
```

## Clawdbot Config: OpenAI Codex Provider

Use your ChatGPT Pro subscription via the `openai-codex` provider:

```json5
{
  agents: {
    defaults: {
      model: { primary: "openai-codex/gpt-5.2" },
      models: {
        "openai-codex/gpt-5.2": { alias: "Codex" },
        "anthropic/claude-opus-4-5": { alias: "Opus" }
      }
    }
  }
}
```

Auth syncs automatically from `~/.codex/auth.json` to Clawdbot's auth profiles.

## Code Review Workflow

```bash
# Interactive review
codex
/review  # Choose: branch, uncommitted, or specific commit

# Non-interactive
codex exec "review the changes in this PR against main branch"
```

## Multi-Directory Projects

```bash
# Work across monorepo packages
codex --cd apps/frontend --add-dir ../backend --add-dir ../shared

# Or in TUI
codex --cd ~/projects/myapp --add-dir ~/projects/shared-lib
```

## Custom Slash Commands

Create reusable prompts in `~/.codex/prompts/`:

```markdown
<!-- ~/.codex/prompts/pr.md -->
---
description: Prepare and open a draft PR
argument-hint: [BRANCH=<name>] [TITLE="<title>"]
---

Create branch `dev/$BRANCH` if specified.
Stage and commit changes with a clear message.
Open a draft PR with title $TITLE or auto-generate one.
```

Invoke: `/prompts:pr BRANCH=feature-auth TITLE="Add OAuth flow"`

## MCP Integration

Add MCP servers to extend Codex:

```bash
# Add stdio server
codex mcp add github -- npx @anthropic/mcp-server-github

# Add HTTP server
codex mcp add docs --url https://mcp.deepwiki.com/mcp

# List configured
codex mcp list
```

## Web Search

Enable in `~/.codex/config.toml`:

```toml
[features]
web_search_request = true

[sandbox_workspace_write]
network_access = true
```

Then Codex can search for current docs, APIs, etc.

## Best Practices

1. **Start with `/init`** to create AGENTS.md with repo-specific instructions
2. **Use `/review` before commits** for AI code review
3. **Set `/approvals` appropriately** — Auto for trusted repos, Read Only for exploration
4. **Use `--add-dir`** for monorepos instead of `danger-full-access`
5. **Resume sessions** to maintain context across coding sessions
6. **Attach images** for UI work, design specs, error screenshots

## Example Workflows

### Fix CI Failure
```bash
codex exec --full-auto "The CI is failing on the lint step. Fix all ESLint errors."
```

### Refactor Component
```bash
codex exec --cd src/components "Refactor UserProfile.tsx to use React Query instead of useEffect for data fetching"
```

### Implement Feature from Spec
```bash
codex exec -i spec.png --cd ~/projects/app "Implement this feature based on the design spec"
```

### Code Review PR
```bash
codex exec "Review the diff between main and feature/auth branch. Focus on security issues."
```

## Troubleshooting

| Issue | Solution |
|-------|----------|
| Auth fails | Run `codex logout` then `codex login` |
| Commands blocked | Check `/approvals`, may need `--full-auto` |
| Out of context | Use `/compact` to summarize |
| Wrong directory | Use `--cd` flag or check `/status` |
| Model unavailable | Verify subscription tier supports model |

## References

- [Codex CLI Overview](https://developers.openai.com/codex/cli)
- [Codex CLI Features](https://developers.openai.com/codex/cli/features)
- [Codex CLI Reference](https://developers.openai.com/codex/cli/reference)
- [Slash Commands Guide](https://developers.openai.com/codex/cli/slash-commands)
- [AGENTS.md Spec](https://agents.md)
- [Codex GitHub](https://github.com/openai/codex)

「开发编程」分类下的热门技能

编程大神.Skill开发编程

【全栈能力】编程大神.Skill:面向复杂真实项目的高阶全栈编程助手。不止生成代码,而是从一句目标接手陌生代码库,拆解需求、补齐实现、追到根因、完成重构、联调前后端,并把结果推进到能运行、能验证、能交付。覆盖 Web、后端、脚本、iOS、安卓、鸿蒙 ArkUI、微信小程序及其他技术栈,支持中英文工程、疑难 Bug、跨模块任务和长任务续做;用构建、日志、真实入口、设备或接口证据说明结果。仅问概念时直接回答,要求落地时持续推进到验收或明确阻塞。

↓ 1125.9万★ 82u_42bbb65f
编程专家Pro.Skill开发编程

编程专家 Pro:融合编程专家 2.0.3 工程专题与编程大神的鸿蒙 ArkTS/ArkUI、微信小程序和小游戏开发资料。用于项目实现、根因调试、审查、重构、测试、架构性能分析及多端开发验证。支持自然语言和 @专题标识,按任务读取包内知识;只问概念时直接回答。

↓ 626.9万★ 32user_47d655f0
编程专家.Skill开发编程

编程专家.Skill P8级编程助手,25年实战经验技能Skill,全栈:Java/Php网站/软件项目、API设计、Bug诊断、代码生成、代码审查、重构、测试用例、性能基准、技术选型、文档生成、任务拆解、Spec驱动、Karpathy规范、CMS二次开发、前端设计、MySQL/Mariadb、项目知识图谱,以及工程纪律层(根因调试硬闭环、阶段导航、事故复盘/SLO、威胁建模/供应链安全、生产就绪/渐进式发布、AI编码治理、面向Agent代码可读性、LLM应用安全)。支持 @标识 显式调用跳过路由。

↓ 600.7万★ 378user_741dc82b
dev-expert开发编程

编程专家.Skill P8级编程助手,25年实战经验技能Skill,全栈:Java/Php网站/软件项目、API设计、Bug诊断、代码生成、代码审查、重构、测试用例、性能基准、技术选型、文档生成、任务拆解、Spec驱动、Karpathy规范、CMS二次开发、前端设计、MySQL/Mariadb、项目知识图谱,以及工程纪律层(根因调试硬闭环、阶段导航、事故复盘/SLO、威胁建模/供应链安全、生产就绪/渐进式发布、AI编码治理、面向Agent代码可读性、LLM应用安全)。支持 @标识 显式调用跳过路由。

↓ 528.1万★ 32user_814dbe54
dev-expert-pro开发编程

编程专家 Pro:融合编程专家 2.0.3 工程专题与编程大神的鸿蒙 ArkTS/ArkUI、微信小程序和小游戏开发资料。用于项目实现、根因调试、审查、重构、测试、架构性能分析及多端开发验证。支持自然语言和 @专题标识,按任务读取包内知识;只问概念时直接回答。

↓ 104.7万★ -user_814dbe54
编程专家 Pro开发编程

编程专家 Pro:融合编程专家 2.0.3 工程专题与编程大神的鸿蒙 ArkTS/ArkUI、微信小程序和小游戏开发资料。用于项目实现、根因调试、审查、重构、测试、架构性能分析及多端开发验证。支持自然语言和 @专题标识,按任务读取包内知识;只问概念时直接回答。

↓ 98.2万★ 1user_28275a78
编程专家.Skill开发编程

编程专家.Skill P8级编程助手,25年实战经验技能Skill,全栈:Java/Php网站/软件项目、API设计、Bug诊断、代码生成、代码审查、重构、测试用例、性能基准、技术选型、文档生成、任务拆解、Spec驱动、Karpathy规范、CMS二次开发、前端设计、MySQL/Mariadb、项目知识图谱,以及工程纪律层(根因调试硬闭环、阶段导航、事故复盘/SLO、威胁建模/供应链安全、生产就绪/渐进式发布、AI编码治理、面向Agent代码可读性、LLM应用安全)。支持 @标识 显式调用跳过路由。

↓ 70.1万★ 6user_613b33ea
Github开发编程

用 gh 命令行工具查看 GitHub 上的 PR 检查、工作流运行与 API 查询的技能。

↓ 48.0万★ 714Peter Steinberger

数据月份:2026-10 · 下载/星标数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。