codex

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Codex handoff

Codex 任务交接

This is JMO's standalone handoff skill. It is not gstack's
/codex
skill and does not require gstack.
这是 JMO 的独立任务交接 skill。它不是 gstack 的
/codex
skill,也不依赖 gstack。

Prepare the task

准备任务

  1. Check
    command -v codex
    and
    codex exec --help
    . If missing, direct the user to https://developers.openai.com/codex/cli/ and explain that they must install and sign in to Codex. Do not claim a handoff ran when the CLI is unavailable.
  2. Read the repository instructions and inspect
    git status --short
    . Identify the working directory, requested mode (review, advice, or implementation), allowed files, and acceptance criteria. Default to read-only review when the request does not authorize edits.
  3. Write a focused prompt containing the user's task, relevant paths, constraints, and required checks. Include enough context for a separate agent without passing credentials or unrelated private material. Tell Codex which files are already modified and to preserve those changes.
  1. 检查
    command -v codex
    和
    codex exec --help
    。如果不存在,指导用户访问 https://developers.openai.com/codex/cli/,并说明他们必须安装 Codex 并登录。CLI 不可用时,不要声称任务交接已经执行。
  2. 阅读仓库说明并检查
    git status --short
    。确定工作目录、请求的模式(审查、建议或实现)、允许涉及的文件以及验收标准。如果请求未授权编辑,默认执行只读审查。
  3. 编写一份聚焦的提示词,包含用户的任务、相关路径、约束条件和必需检查项。提供足够的上下文,使另一个 Agent 能够独立完成任务,但不要传递凭据或无关的私密材料。告知 Codex 哪些文件已被修改,并要求保留这些更改。

Run Codex

运行 Codex

Use the user's configured model. Pass the prompt through stdin or a quoted heredoc, not interpolated shell text. Replace the example directory with the actual absolute project path:
sh
codex exec --sandbox read-only --cd '/absolute/project/path' - <<'TASK'
Review the specified changes. Do not edit files. Report actionable findings with file locations, evidence, and uncertainty. Follow the repository's instructions.
TASK
For an authorized implementation, use
--sandbox workspace-write
and a prompt with the exact task, allowed files, and verification criteria. Do not use flags that bypass approvals or sandboxing. If the task cannot run within the current permissions, report that limitation.
Wait for completion and read the exit status and output. Do not let Claude and Codex edit the same files concurrently. For parallel work, use separate worktrees and explicit file ownership; integrate only after reviewing the resulting changes.
使用用户配置的模型。通过 stdin 或带引号的 heredoc 传入提示词,不要使用 shell 文本插值。将示例目录替换为实际的项目绝对路径:
sh
codex exec --sandbox read-only --cd '/absolute/project/path' - <<'TASK'
Review the specified changes. Do not edit files. Report actionable findings with file locations, evidence, and uncertainty. Follow the repository's instructions.
TASK
对于已获授权的实现任务,使用
--sandbox workspace-write
,并在提示词中明确说明具体任务、允许涉及的文件和验证标准。不要使用绕过审批或沙箱的 flags。如果任务无法在当前权限下运行,请报告该限制。
等待执行完成,并查看退出状态和输出。不要让 Claude 和 Codex 同时编辑相同的文件。如需并行工作,请使用独立的 worktree 并明确文件所有权;审查生成的更改后再进行集成。

Verify and report

验证并报告

For a review, inspect the cited code and assess each finding before presenting it as confirmed. For implementation, inspect the diff and run the relevant checks. Report what Codex changed or found, what was verified, and any remaining failures. Do not automatically commit, push, or deploy unless that is part of the user's task.
Task: $ARGUMENTS
对于审查任务,检查所引用的代码,并在将每项发现作为已确认问题呈现之前进行评估。对于实现任务,检查 diff 并运行相关检查。报告 Codex 修改或发现了什么、验证了哪些内容,以及仍有哪些失败项。除非这些操作属于用户任务的一部分,否则不要自动提交、推送或部署。
任务:$ARGUMENTS