Request code review and route results to a tmux pane. Default flow commits first; optional opt-in flow can target an existing commit without commit/push.
Resources
2Install
npx skillscat add robertmsale/codex/request-review Install via the SkillsCat registry.
SKILL.md
Request 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 "coolproject-78-dialpad:1.1" "chore: review checkpoint"REQUEST_REVIEW_DISABLE=1 ~/.codex/skills/request-review/scripts/request-review "coolproject-78-dialpad:1.1" "chore: bypass review"
Use a fully qualified stable pane identifier: <session>:<window-index>.<pane-index>.
Avoid window-name-based targets because names can change with the active command.
When assigned via $assign-agent, use the exact pane target provided by the orchestrator.
Do not compute pane targets dynamically in worker sessions (for example, do not use tmux display-message to discover pane id for review routing).
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.
Behavior
- Default path: commits first using the provided commit message (
git add -Athengit commit -m ...). - Default path: uses the newly created
HEADcommit as the target review SHA. - Opt-in recovery path: set
REQUEST_REVIEW_USE_EXISTING_COMMIT=1to skipgit add/git commitand review an existing commit (defaults toHEAD, orREQUEST_REVIEW_EXISTING_COMMIT_SHA). - Disable path: set
REQUEST_REVIEW_DISABLE=1to skip both remote and local review execution. In this mode the script printsall clear!and exits success. - Runs one review request at a time per scoped lock (project + PR when available, otherwise project + branch).
- Sends final review text back to the target pane, waits 5 seconds, then sends Enter.
Mode switch (from .env)
REQUEST_REVIEW_MODE=remote- Default path pushes branch (
git push -u origin HEAD). - With
REQUEST_REVIEW_USE_EXISTING_COMMIT=1, skips push and hooks review onto the existing commit SHA. - Finds the PR for current branch.
- Posts
@codex reviewto trigger cloud review explicitly. - Polls until one condition is met for the target commit SHA:
- New inline PR review comment(s) from
chatgpt-codex-connector[bot]on that commit. - New
+1reaction fromchatgpt-codex-connector[bot]on the PR issue after the commit timestamp.
- 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
codex exec -s read-only --json review --commit <sha> --title <commit-message>in the current repo. - Uses
REQUEST_REVIEW_LOCAL_PROFILEfrom.envand reads model/reasoning from that profile in~/.codex/config.toml. - If the profile is missing in
config.toml, exits with an error. - Writes output to
review.logand stderr toreview.err.log.
- Runs
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-reviewREQUEST_REVIEW_USE_EXISTING_COMMIT=0|1(default0)REQUEST_REVIEW_EXISTING_COMMIT_SHA=<sha-or-ref>(defaultHEADwhen existing-commit mode is enabled)REQUEST_REVIEW_DISABLE=0|1(default0; when1, bypasses review execution and returnsall clear!)
Critical discipline
- Only run one review request at a time for the same project/PR scope.
- Do not launch concurrent review requests.
- CRITICAL: Do not modify
~/.codex/skills/request-review/.envand do not switchREQUEST_REVIEW_MODE(local/remote). Agents are not allowed to change review settings at all. - CRITICAL: After starting
request-review, wait patiently and do not cancel/interrupt the review command under any circumstances.