github-pr-review-operation

Automate GitHub pull request reviews with gh CLI diffs and comments.

15|Updated Oct 5, 2024
One-click install
npx skills add https://github.com/sushichan044/dotfiles --skill github-pr-review-operation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-pr-review-operation
Source: https://github.com/sushichan044/dotfiles/tree/main/home/dot_claude/skills/github-pr-review-operation
Command: npx skills add https://github.com/sushichan044/dotfiles --skill github-pr-review-operation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill performs GitHub PR review operations using the GitHub CLI (gh). It can fetch PR information, compute diffs with inline line numbers, read and post comments, and manage inline reviews and replies.

Core Features & Use Cases

  • PR Information: Retrieve title, body, author, state, base and head refs, and URL.
  • Diff with Line Numbers: Show diffs annotated with exact left/right line numbers for inline reviews.
  • Comment Management: Get issue comments, get pull request review comments, post comments, and reply to comments.
  • Inline Comments: Create targeted inline comments on specific file lines.
  • Comment Threads: Reply and manage comment threads to support code reviews.

Quick Start

Ensure you have gh installed and authenticated. Then invoke the skill with a PR URL to perform reviews, diffs, and comments via gh commands.

Frequently Asked Questions about github-pr-review-operation

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

FAQPage Schema
How do I automate GitHub pull request reviews using the command line?

Automate PR reviews by using the gh CLI to retrieve PR metadata, fetch diffs with line numbers, and post inline comments and reviews. This Skill handles parsing PR URLs, calling gh pr view and gh pr diff, formatting diffs with exact line annotations, and managing comment threads—all via command-line operations without manual GitHub web interface navigation.

Can I fetch pull request diffs with line numbers for inline code comments?

Yes. This Skill retrieves PR diffs annotated with exact left and right line numbers, enabling you to target specific lines when creating inline review comments. The line-numbered output supports precise code feedback without counting lines manually or switching between diff viewers.

How do I create and reply to inline comments on specific file lines in a pull request?

Use this Skill to post targeted inline comments on specific file lines and reply to existing comment threads via gh CLI. It manages both issue-level comments and pull request review comments, allowing you to build threaded feedback on exact code locations without using the web interface.

What do I need to set up before automating PR reviews with gh CLI?

Ensure gh CLI is installed and authenticated to your GitHub account or enterprise instance. Authentication grants access to PR repositories, metadata retrieval, and comment creation. No additional dependencies or components are required—the Skill works directly with gh commands.

Does this work for retrieving PR information like title, author, and base/head refs?

Yes. The Skill retrieves full PR metadata including title, body, author, state, base and head references, and PR URL. This information supports both review operations and integration with downstream workflows that need PR context.

Can I manage comment threads and replies within pull request reviews?

Yes. This Skill handles comment thread management—reading existing comments, posting new comments, and replying to comment threads. You can organize multi-turn feedback on code and maintain conversation context across review cycles.