Agent skill
github-pr-workflow
Working with GitHub Pull Requests using the gh CLI. Use for fetching PR details, review comments, CI status, and understanding the difference between PR-level comments vs inline code review comments.
Install this agent skill to your Project
npx add-skill https://github.com/YPares/agent-skills/tree/main/github-pr-workflow
SKILL.md
GitHub PR Workflow
Key Concepts
Comment Types
GitHub PRs have two different types of comments:
- PR-level comments - General discussion on the PR (shown via
gh pr view --comments) - Inline code review comments - Comments attached to specific lines of code (requires API)
Important: gh pr view --comments does NOT show inline code review comments!
Scripts
| Script | Purpose |
|---|---|
gh-pr-info <PR> [REPO] |
Comprehensive PR info: summary, CI checks and unresolved review and inline comments |
The script auto-detects the repo from git remote, or accepts [REPO] as second argument (format: owner/repo).
Key features:
- Uses GitHub's GraphQL API to reliably filter out already resolved/addressed comments
- Excludes collapsed/hidden review threads
- Excludes minimized comments (marked as spam/off-topic/resolved)
- Excludes dismissed reviews
- Shows only what still needs attention
Common Commands
# Get complete PR info with UNRESOLVED comments only
gh-pr-info <PR> [REPO] # ✅ Everything you need: summary, checks, reviews, unresolved comments
# Basic PR info (native gh commands)
gh pr view <PR> # Overview
gh pr view <PR> --comments # PR-level comments only (NOT inline!)
gh pr diff <PR> # View the diff
# Reviews (approve/request changes)
gh pr review <PR> --approve
gh pr review <PR> --request-changes --body "Please fix X"
gh pr review <PR> --comment --body "Looks good overall"
# Checks
gh pr checks <PR> # CI status
gh run view <RUN_ID> --log-failed # Failed job logs
API Endpoints Reference
When gh commands don't expose what you need, use the API:
# Inline review comments
gh api repos/OWNER/REPO/pulls/PR/comments
# PR-level comments (issue comments)
gh api repos/OWNER/REPO/issues/PR/comments
# Review submissions
gh api repos/OWNER/REPO/pulls/PR/reviews
# Commits in PR
gh api repos/OWNER/REPO/pulls/PR/commits
# Files changed
gh api repos/OWNER/REPO/pulls/PR/files
Workflow: Addressing Review Comments
- Get unresolved comments:
gh-pr-info <PR> - Make fixes in your local branch
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
nix-profile-manager
Expert guidance for agents to manage local Nix profiles for installing tools and dependencies. Covers flakes, profile management, package searching, and registry configuration.
working-with-jj
Expert guidance for using JJ (Jujutsu) version control system. Use when working with JJ, whatever the subject. Operations, revsets, templates, debugging change evolution, etc. Covers JJ commands, template system, evolog, operations log, and interoperability with git remotes.
typst-writer
Write correct and idiomatic Typst code for document typesetting. Use when creating or editing Typst (.typ) files, working with Typst markup, or answering questions about Typst syntax and features. Focuses on avoiding common syntax confusion (arrays vs content blocks, proper function definitions, state management).
nushell-plugin-builder
Guide for creating Nushell plugins in Rust using nu_plugin and nu_protocol crates. Use when users want to build custom Nushell commands, extend Nushell with new functionality, create data transformations, or integrate external tools/APIs into Nushell. Covers project setup, command implementation, streaming data, custom values, and testing.
textual-builder
Build Text User Interface (TUI) applications using the Textual Python framework (v0.86.0+). Use when creating terminal-based applications, prototyping card games or interactive CLIs, or when the user mentions Textual, TUI, or terminal UI. Includes comprehensive reference documentation, card game starter template, and styling guides.
package-npm-nix
Package npm/TypeScript/Bun CLI tools for Nix. Use when creating Nix derivations for JavaScript/TypeScript tools from npm registry or GitHub sources, handling pre-built packages or source builds with dependency management.
Didn't find tool you were looking for?