mcpField
C
codex-assistant

codex-assistant

github.com/joeseesunAgent workflows2977 installsUpdated 40w ago
Repository

About codex-assistant

A skill that routes coding tasks to OpenAI Codex CLI by turning a request into a prompt and running `codex exec`. It is intended for coding workflows such as refactoring, bug fixes, test generation, code review, and documentation.

Key features

  1. 01Convert requests into Codex prompts
  2. 02Run tasks with `codex exec`
  3. 03Pass through Codex output
  4. 04Support refactoring, fixes, and tests
  5. 05Handle review and documentation tasks

Use cases

  1. 01Refactor code with Codex
  2. 02Ask Codex to diagnose and fix a bug
  3. 03Generate unit tests for a function
  4. 04Request code explanations or documentation

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/joeseesun/codex-assistant --skill codex-assistant

After installing, type/codex-assistantin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

README.md
metadata.json
.gitignore
LICENSE

Details

From the project README

Codex Assistant

通过 OpenAI Codex CLI 执行代码任务。使用前请确保:

  1. Codex 已安装并配置 (codex 命令可用)
  2. 工作目录在信任列表中

触发词

  • /codex-assistant - 显式调用
  • 用 Codex / codex 帮我 - 自然语言调用

核心原则

当用户用 /codex 或 用 Codex 发起请求时:

  1. 提取用户需求 - 从自然语言中提取 Codex 需要完成的任务
  2. 构建 Codex Prompt - 将需求转化为 Codex 能理解的指令
  3. 执行命令 - 使用 Bash 调用 codex exec
  4. 返回结果 - 直接展示 Codex 的输出

Codex 最佳场景

场景Codex 擅长提示词模板
代码重构优化结构、提升可读性"重构这段代码,让它更简洁"
Bug 修复定位问题、给出修复"找出并修复这个 bug"
测试生成编写单元测试"给这个函数写测试"
代码解释逐行解释逻辑"解释这段代码在做什么"
跨语言迁移语言/框架转换"转成 TypeScript"
代码审查找出问题、改进建议"审查这段代码"
文档生成添加注释/文档"给这个函数写文档"
样板代码生成模板/脚手架"写一个 React 组件模板"
代码清理移除技术债务"清理这段代码"

执行流程

步骤 1: 解析用户输入

识别任务类型(重构/修复/测试/解释/迁移/审查/文档/生成)

步骤 2: 构建 Codex Prompt
echo "你的任务描述" | codex exec -m gpt-5.2-codex
步骤 3: 展示结果

直接返回 Codex 的输出,不做额外加工


注意事项

  • Codex 是研究预览版,功能可能不稳定
  • 生成的代码建议 review 后使用
  • 复杂任务可能需要多次交互
  • 确保在受信任目录中执行

Comments

Markdown supported