gh-pr-comments

List unresolved GitHub PR review comments and resolve threads by thread_id.

Updated Aug 30, 2024
One-click install
npx skills add https://github.com/alistairstead/dotfiles2 --skill gh-pr-comments
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gh-pr-comments
Source: https://github.com/alistairstead/dotfiles2/tree/main/claude/.claude/skills/gh-pr-comments
Command: npx skills add https://github.com/alistairstead/dotfiles2 --skill gh-pr-comments

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires zod, and includes scripts (resource) components.

What problem does it solve?

This Skill helps you locate unresolved PR review comments and resolve them after addressing feedback, streamlining code reviews.

Core Features & Use Cases

  • List unresolved comments for the current PR (with filters to exclude bots)
  • Resolve threads by thread_id after addressing feedback
  • GraphQL and REST access via gh CLI for PR review management

Quick Start

List unresolved comments: bun run ~/.claude/skills/gh-pr-comments/scripts/list-comments.ts --unresolved Resolve a thread: bun run ~/.claude/skills/gh-pr-comments/scripts/resolve-comment.ts <thread_id>

Frequently Asked Questions about gh-pr-comments

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

FAQPage Schema
How do I list unresolved comments on a GitHub pull request?

List unresolved comments by running the gh-pr-comments script with the --unresolved flag. The Skill queries GitHub's GraphQL API to fetch all review threads on your current PR, filters for unresolved ones, and outputs structured JSON with thread IDs, reviewer names, comment bodies, and diff context.

Can I filter out bot comments when reviewing PR feedback?

Yes. The Skill supports a --no-bots flag to exclude automated bot comments from the unresolved list. This lets you focus on human reviewer feedback and reduce noise when scanning through multiple review threads.

How do I mark a GitHub PR review comment as resolved?

Resolve a thread by running the resolve-comment script with the thread_id. The Skill uses the GitHub REST API to mark the thread resolved after you've addressed the feedback, updating the PR's review status without reopening discussion.

Does this work with pull requests across multiple repositories?

Yes. The Skill accepts optional repo and pr identifiers as command-line arguments, or automatically detects the current repository and PR. This flexibility supports single-PR workflows and multi-repo review scenarios where you need to manage comments across projects.

What information does the Skill output for each review comment?

The Skill returns structured JSON fields including thread_id, user, body, diff_hunk, line, and start_line for each unresolved comment. This data enables you to understand the context, locate the exact code change, and track which reviewer left feedback.

Can I use this Skill with the GitHub CLI without manual authentication?

Yes. The Skill leverages the gh CLI, which handles GitHub authentication through your existing credentials. You only need gh configured on your system; the Skill uses its built-in API access to query and update PR review threads.