Skip to main content

Documentation 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.

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. All 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.
Authenticate the GitHub CLI once with repo and workflow scopes:
gh auth login
Confirm auth status (the skill re-runs this with escalated permissions if the sandbox blocks it):
gh auth status
If gh hits auth or rate-limit errors mid-run, run gh auth login again and retry.

Three-Step Workflow

1

Inspect comments needing attention

Codex runs the bundled fetch_comments.py script, which prints all review threads and inline comments on the PR associated with the current branch.
python scripts/fetch_comments.py
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.
2

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:
[1] src/auth.py:42 — @reviewer: "This token comparison isn't constant-time."
    Fix: Replace == with hmac.compare_digest()

[2] README.md:10 — @reviewer: "Typo: 'recieve' → 'receive'"
    Fix: Correct spelling

Which comments should be addressed? (e.g. 1 2 or "all")
3

Apply fixes for selected comments

Once you confirm, Codex applies targeted edits for each selected comment, commits the changes, and summarizes the diffs. Unselected threads are left untouched.

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.

Installing

$skill-installer gh-address-comments
Restart Codex after installation to pick up the new skill.

Build docs developers (and LLMs) love