Address GitHub PR Comments
Find the open PR for the current branch and walk through its review/conversation
comments using gh. Pair with github-cli-workflow
when you also need to push changes or update the PR description.
When to use
- The current branch has an open PR and reviewers left comments.
- The user asks to "address comments", "resolve review threads", or "respond to PR feedback".
- You need a summarized view of inline comments + reviews + conversation threads in one call.
Prerequisites
gh(GitHub CLI) installed and onPATH(covered bybootstrap).gh auth statusexits 0. If not, ask the user to rungh auth loginonce (workflow + repo scopes recommended).python3(used by the bundled inspection script).
doctor already reports gh auth status under "Integrations" — confirm it
is green before invoking this skill.
Workflow
-
Verify auth. Run
gh auth status. If it fails, stop and ask the user to re-authenticate. -
Resolve the PR. Use
gh pr view --json number,url,titleto confirm a PR is associated with the current branch. If none, surface that and stop. -
Fetch all threads in one pass. Run the bundled script:
bashpython3 ~/.local/share/agent-toolkit/skills/gh-address-comments/scripts/fetch_comments.py \ > /tmp/pr-comments.jsonThe script paginates conversation comments, review submissions, and inline review threads (including resolved/outdated state) via
gh api graphql. -
Summarize for the user. Number every thread/comment and provide a one-line intent for each (e.g.
[3] tests/foo.test.ts:12 — reviewer asks for a null check). -
Ask which to address. Wait for the user to pick numbers before changing code.
-
Apply fixes. For each accepted comment, edit the relevant file and stage the change. Do not push or merge from this skill — delegate to
github-cli-workflow. -
Optional: reply or resolve. Once the user confirms, you can post replies with
gh pr comment <pr> --body "..."or resolve threads via the GraphQLresolveReviewThreadmutation when explicitly requested.
Boundaries
- This skill reads PR feedback and edits files; it does not push,
merge, or change PR metadata. Use
github-cli-workflowfor those steps. - Scope is the open PR for the current branch. For arbitrary PR numbers, ask the user to switch branches first.
- If
ghhits rate limits or auth errors mid-run, stop and surface the message — do not silently retry.
Bundled resources
scripts/fetch_comments.py— paginated GraphQL fetch (stdlib only, shells out togh api graphql). Output is a single JSON document on stdout.
Validation
skills checkreports theghrequirement.doctorshowsgh auth statusunder Integrations.


