gh-address-comments

Fetch and address review comments on GitHub pull requests using the gh CLI.

Updated Feb 4, 2026
One-click install
npx skills add https://github.com/pchemguy/AISandbox --skill gh-address-comments-pchemguy
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gh-address-comments
Source: https://github.com/pchemguy/AISandbox/tree/main/docs/AgentSkills/openai/skills/skills/.curated/gh-address-comments
Command: npx skills add https://github.com/pchemguy/AISandbox --skill gh-address-comments-pchemguy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Reviewing and responding to pull request feedback requires manually navigating GitHub to find every conversation comment, review, and inline thread, which is slow and error-prone when working from the command line. ## Core Features & Use Cases - Comment Aggregation: Runs a Python script that queries the GitHub GraphQL API via gh api graphql to collect conversation comments, review submissions, and inline review threads for the PR tied to the current branch. - Guided Triage: Numbers all review threads, summarizes the fix each one requires, and asks the user which comments to address before applying changes. - Auth Handling: Verifies gh auth status first and prompts the user to run gh auth login if authentication or rate-limit issues occur. - Use Case: After pushing a branch and receiving reviewer feedback, run this Skill to list every unresolved comment, pick the ones to fix, and apply the changes without leaving your terminal workflow. ## Quick Start Ask the assistant to fetch all review comments on the pull request for the current branch and help you address the ones you select.

Frequently Asked Questions about gh-address-comments

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I list all review comments on a GitHub PR from the command line?▼

Run the fetch_comments.py script, which shells out to `gh api graphql` to retrieve conversation comments, reviews, and inline review threads for the PR linked to your current branch. It outputs the results as JSON and paginates automatically.

How do I address GitHub PR review comments with the gh CLI?▼

First authenticate with `gh auth login`, then fetch the comments for the current branch's PR. The workflow numbers each review thread, summarizes the required fix, and lets you choose which comments to address before applying changes.

Does this work for pull requests across different repositories?▼

Yes. The script resolves the PR using `gh pr view` and reads the head repository owner and name, so cross-repository (fork-based) pull requests are supported.

Why does gh auth status fail in a sandboxed environment?▼

Sandboxing can block the network access that `gh auth status` needs. Rerun the command with elevated permissions, such as `sandbox_permissions=require_escalated`, and ensure the token includes workflow and repo scopes.

What happens if GitHub rate limits or auth errors occur mid-run?▼

The workflow prompts you to re-authenticate with `gh auth login` and then retries the operation. The script also raises clear errors when `gh auth status` fails or the GraphQL response contains errors.