The gh-address-comments skill guides Codex through the full lifecycle of a pull request review: it locates the open PR for the current branch, fetches every review thread and inline comment, presents a numbered summary to you, and applies targeted fixes only for the comments you approve. AllDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/openai/skills/llms.txt
Use this file to discover all available pages before exploring further.
gh calls run with elevated network access so GitHub API requests succeed even in sandboxed environments.
Trigger Conditions
Codex activates this skill when you ask it to:- Address, resolve, or fix PR review comments
- Respond to feedback left on a pull request
- Clean up a review before merging
- Handle review threads on the current branch
Prerequisites
The
gh CLI must be authenticated before this skill runs. Unauthenticated calls will fail and the skill will prompt you to log in.gh hits auth or rate-limit errors mid-run, run gh auth login again and retry.
Three-Step Workflow
Inspect comments needing attention
Codex runs the bundled The script outputs a JSON object containing every conversation comment, review submission, and inline review thread — including each thread’s file path, line, author, and comment body.
fetch_comments.py script, which prints all review threads and inline comments on the PR associated with the current branch.Ask for your approval
Codex numbers every thread and presents a concise summary of what each fix would require. You choose which numbered comments should be addressed before any code changes are made.Example summary output:
The fetch_comments.py Script
The bundled script uses gh api graphql to retrieve all PR review threads and top-level comments in a single pass. It handles pagination automatically across conversation comments, review submissions, and inline review threads, and prints the result as JSON that Codex can number and summarize.
Key behaviors:
- Resolves the current branch to its open PR automatically
- Fetches conversation comments, review submissions, and inline review threads
- Exits non-zero if no open PR is found or if authentication fails, so automation pipelines can detect the error
Authentication Handling
Normal auth flow
The skill runs
gh auth status with sandbox_permissions=require_escalated to verify scopes. Repo and workflow scopes are required.Mid-run auth failure
If
gh returns an auth or rate-limit error during comment fetching or fixing, the skill pauses and asks you to re-run gh auth login before retrying.