简介
Integrates the Codex CLI to delegate complex coding tasks, generate code, and obtain AI-driven debugging assistance directly within Claude.
通过你的 Agent 添加
安装目录:ask-codex/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: ask-codex
description: Consult Codex as an independent expert. Sends a question or task to codex exec and returns the response.
argument-hint: "[--codex-model MODEL:EFFORT] [--codex-timeout SECONDS] [question or task]"
allowed-tools: "Bash(${CLAUDE_PLUGIN_ROOT}/scripts/ask-codex.sh:*)"
Ask Codex
Send a question or task to Codex and return the response.
How to Use
Do not pass free-form user text to the shell unquoted. The question or task may contain spaces or shell metacharacters such as (, ), ;, #, *, or [.
If the user only supplied a question or task, execute:
"${CLAUDE_PLUGIN_ROOT}/scripts/ask-codex.sh" "$ARGUMENTS"
If the user supplied flags such as --codex-model or --codex-timeout, reconstruct the command so those flags remain separate shell arguments and the remaining free-form question is passed as one quoted final argument.
Example:
"${CLAUDE_PLUGIN_ROOT}/scripts/ask-codex.sh" --codex-model gpt-5.5:high "Review the following round summary (M4)..."
Never run this unsafe form:
"${CLAUDE_PLUGIN_ROOT}/scripts/ask-codex.sh" $ARGUMENTS
because the shell will re-parse the question text and can fail before ask-codex.sh starts.
Interpreting Output
- The script outputs Codex's response to stdout and status info to stderr
- Read the stdout output carefully and incorporate Codex's response into your answer
- If the script exits with a non-zero code, report the error to the user
Error Handling
Exit Code
Meaning
0
Success - Codex response is in stdout
1
Validation error (missing codex, empty question, invalid flags)
124
Timeout - suggest using --codex-timeout with a larger value
Other
Codex process error - report the exit code and any stderr output
Notes
- The response is saved to
.humanize/skill/<timestamp>/output.md for reference
- Default model is
gpt-5.5:high with a 3600-second timeout
| Exit Code | Meaning |
|---|---|
| 0 | Success - Codex response is in stdout |
| 1 | Validation error (missing codex, empty question, invalid flags) |
| 124 | Timeout - suggest using --codex-timeout with a larger value |
| Other | Codex process error - report the exit code and any stderr output |
Notes
- The response is saved to
.humanize/skill/<timestamp>/output.md for reference
- Default model is
gpt-5.5:high with a 3600-second timeout
.humanize/skill/<timestamp>/output.md for referencegpt-5.5:high with a 3600-second timeout