request-review
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseRequest Review
发起代码审查
Use this skill when an agent needs to request code review and route the result back into a specific tmux pane.
Run:
~/.codex/skills/request-review/scripts/request-review <tmux-pane-target> <commit-message>
Examples:
~/.codex/skills/request-review/scripts/request-review "coolproject-78-dialpad:1.1" "fix: address review findings"~/.codex/skills/request-review/scripts/request-review "%9" "chore: review checkpoint"
Use stable pane identifiers. Prefer or .
Avoid window-name-based targets because names can change with the active command.
%<pane-id><session>:<window-index>.<pane-index>当Agent需要发起代码审查并将结果返回至指定tmux面板时,可使用此技能。
运行:
~/.codex/skills/request-review/scripts/request-review <tmux-pane-target> <commit-message>
示例:
~/.codex/skills/request-review/scripts/request-review "coolproject-78-dialpad:1.1" "fix: address review findings"~/.codex/skills/request-review/scripts/request-review "%9" "chore: review checkpoint"
请使用稳定的面板标识符。优先选择或格式。避免使用基于窗口名称的目标,因为窗口名称会随当前执行的命令发生变化。
%<pane-id><session>:<window-index>.<pane-index>Preferred workflow
推荐工作流
- If explicitly asked to use this skill, do not manually commit/push first.
- Run this skill directly and let it handle commit/push in the default path.
- Use the opt-in existing-commit mode only as recovery when a commit was already created/pushed by mistake.
- Wait for review, do not finish your turn until the agent is done reviewing your code.
- Take remediary action as needed and request another review.
- If you pass, this is a good stopping point.
- 如果明确要求使用此技能,请不要先手动执行提交/推送操作。
- 直接运行此技能,由其在默认流程中处理提交/推送操作。
- 仅当误创建/推送了提交时,才启用已有提交模式作为恢复手段。
- 等待审查完成,在Agent完成代码审查前不要结束当前任务。
- 根据需要采取补救措施并再次发起审查请求。
- 如果审查通过,此时是合适的终止节点。
Behavior
行为逻辑
- Default path: commits first using the provided commit message (then
git add -A).git commit -m ... - Default path: uses the newly created commit as the target review SHA.
HEAD - Opt-in recovery path: set to skip
REQUEST_REVIEW_USE_EXISTING_COMMIT=1/git addand review an existing commit (defaults togit commit, orHEAD).REQUEST_REVIEW_EXISTING_COMMIT_SHA - Runs exactly one review request at a time (global lock).
- Sends final review text back to the target pane, waits 5 seconds, then sends Enter.
- 默认流程:使用提供的提交信息先执行提交操作(然后
git add -A)。git commit -m ... - 默认流程:将新创建的提交作为审查目标SHA。
HEAD - 可选恢复流程:设置以跳过
REQUEST_REVIEW_USE_EXISTING_COMMIT=1/git add步骤,直接审查已有提交(默认使用git commit,或通过HEAD指定)。REQUEST_REVIEW_EXISTING_COMMIT_SHA - 同一时间仅运行一个审查请求(全局锁机制)。
- 将最终审查文本发送至目标面板,等待5秒后发送回车键。
Mode switch (from .env
)
.env模式切换(通过.env文件配置)
REQUEST_REVIEW_MODE=remote- Default path pushes branch ().
git push -u origin HEAD - With , skips push and hooks review onto the existing commit SHA.
REQUEST_REVIEW_USE_EXISTING_COMMIT=1 - Finds the PR for current branch.
- Posts to trigger cloud review explicitly.
@codex review - Polls until one condition is met for the target commit SHA:
- New inline PR review comment(s) from on that commit.
chatgpt-codex-connector[bot] - New reaction from
+1on the PR issue after the commit timestamp.chatgpt-codex-connector[bot]
- New inline PR review comment(s) from
- If inline comments exist, returns detailed findings with links.
- If only thumbs-up exists, returns summary.
👍
- Default path pushes branch (
REQUEST_REVIEW_MODE=local- Runs in the current repo.
codex exec -s read-only --json review --commit <sha> --title <commit-message> - Uses from
REQUEST_REVIEW_LOCAL_PROFILEand reads model/reasoning from that profile in.env.~/.codex/config.toml - If the profile is missing in , exits with an error.
config.toml - Writes output to and stderr to
review.log.review.err.log
- Runs
- (远程模式)
REQUEST_REVIEW_MODE=remote- 默认流程会推送分支()。
git push -u origin HEAD - 若设置,则跳过推送步骤,直接基于已有提交SHA发起审查。
REQUEST_REVIEW_USE_EXISTING_COMMIT=1 - 查找当前分支对应的PR。
- 发送指令以显式触发云端审查。
@codex review - 轮询直至目标提交SHA满足以下任一条件:
- 在该提交下新增了PR内联审查评论。
chatgpt-codex-connector[bot] - 在提交时间之后,针对PR议题新增了
chatgpt-codex-connector[bot](👍)反应。+1
- 若存在内联评论,则返回包含链接的详细审查结果。
- 若仅有点赞反应,则返回作为总结。
👍
- 默认流程会推送分支(
- (本地模式)
REQUEST_REVIEW_MODE=local- 在当前代码仓库中运行命令。
codex exec -s read-only --json review --commit <sha> --title <commit-message> - 使用.env文件中配置的,并从
REQUEST_REVIEW_LOCAL_PROFILE文件的该配置项中读取模型/推理相关设置。~/.codex/config.toml - 若config.toml中缺少该配置项,则程序会报错退出。
- 将输出内容写入文件,错误信息写入
review.log文件。review.err.log
- 在当前代码仓库中运行
Config source
配置文件来源
~/.codex/skills/request-review/.env
Useful variables:
REQUEST_REVIEW_MODE=local|remoteREQUEST_REVIEW_BOT_LOGIN=chatgpt-codex-connector[bot]REQUEST_REVIEW_TRIGGER_COMMENT=@codex reviewREQUEST_REVIEW_POLL_INTERVAL_SECONDS=20REQUEST_REVIEW_TIMEOUT_SECONDS=1800REQUEST_REVIEW_LOCAL_PROFILE=local-review- (default
REQUEST_REVIEW_USE_EXISTING_COMMIT=0|1)0 - (default
REQUEST_REVIEW_EXISTING_COMMIT_SHA=<sha-or-ref>when existing-commit mode is enabled)HEAD
~/.codex/skills/request-review/.env
常用配置变量:
REQUEST_REVIEW_MODE=local|remoteREQUEST_REVIEW_BOT_LOGIN=chatgpt-codex-connector[bot]REQUEST_REVIEW_TRIGGER_COMMENT=@codex reviewREQUEST_REVIEW_POLL_INTERVAL_SECONDS=20REQUEST_REVIEW_TIMEOUT_SECONDS=1800REQUEST_REVIEW_LOCAL_PROFILE=local-review- (默认值为
REQUEST_REVIEW_USE_EXISTING_COMMIT=0|1)0 - (当启用已有提交模式时,默认值为
REQUEST_REVIEW_EXISTING_COMMIT_SHA=<sha-or-ref>)HEAD
Critical discipline
重要规范
- Only run one review request at a time.
- Do not launch concurrent review requests.
- 同一时间仅能运行一个审查请求。
- 禁止发起并发的审查请求。