mcpField
A
ask-codex

ask-codex

github.com/hiroro-workAgent 工作流4754 次安装今天更新
代码仓库

关于 ask-codex

通过本地 `codex` 命令行回答编码问题或执行编码任务的技能。支持指定模型和工作目录、恢复最近会话,也可选择启用沙盒内的自动修改。

主要功能

  1. 01使用 `codex exec` 执行编码请求
  2. 02指定模型和工作目录
  3. 03恢复最近的会话
  4. 04启用沙盒自动修改

适用场景

  1. 01询问代码相关问题
  2. 02分析项目目录
  3. 03请求修改代码
  4. 04继续之前的编码会话

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/hiroro-work/claude-plugins --skill ask-codex

安装后在 Claude Code 中输入/ask-codex确认已加载。

附带文件.claude-plugin/plugin.json

详细介绍

询问 Codex

调用本地 codex CLI 获取编码方面的帮助。

**注意:**此技能要求已安装 codex CLI,且可通过系统的 PATH 找到。

快速开始

使用 codex exec 运行单条查询:

codex exec "Your question or task here"

常用选项

选项描述
-m MODEL指定模型
-C DIR设置工作目录
--full-auto启用在 workspace-write 沙箱中的自动执行

如需查看所有可用选项,请运行 codex exec --help

恢复会话

使用 exec resume --last,通过后续提示词继续最近的会话:

codex exec resume --last "Your follow-up prompt"

注意:exec 级别的标志(如 -C 和 --full-auto)不能用于 exec resume——恢复的会话会沿用原会话的工作目录。 如需在恢复时调整沙箱,请使用 -c sandbox_mode="workspace-write";仍可使用 -m MODEL。

示例

提出编码问题:

codex exec "How do I implement a binary search in Python?"

分析特定目录中的代码:

codex exec -C /path/to/project "Explain the architecture of this codebase"

使用特定模型:

codex exec -m <model> "Write a function that validates email addresses"

让 Codex 自动修改代码:

codex exec --full-auto "Add error handling to all API endpoints"

注意事项

  • Codex 通过 exec 子命令以非交互方式运行
  • 默认情况下,输出会发送到 stdout,未经批准不会修改任何文件
  • 使用 --full-auto 可在沙箱限制内自动执行
  • 除非指定 -C,否则命令会沿用当前工作目录

评论

支持 Markdown