github-pr

Automate GitHub PR workflows using gh CLI and jq queries.

Updated Nov 17, 2025
One-click install
npx skills add https://github.com/ci/persops --skill github-pr-ci
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-pr
Source: https://github.com/ci/persops/tree/main/modules/ai/skills/github-pr
Command: npx skills add https://github.com/ci/persops --skill github-pr-ci

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gh, jq, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps developers manage GitHub pull requests more efficiently by providing token-conscious patterns and ready-to-run gh CLI commands that reduce context switching and data transfer.

Core Features & Use Cases

  • PR overview and filtering: fetch concise PR metadata using gh pr view and a focused --json payload.
  • PR triage and collaboration: list, filter, and monitor PRs across repositories, assign reviewers, add labels, and draft reviews.
  • Change inspection and CI insights: inspect files changed, diffs, and CI checks to identify failures quickly.
  • Automated reporting: generate compact summaries of PRs for team updates and dashboards.

Quick Start

gh pr view 42 --json number,title,author gh pr list --state open --json number,title,author gh pr diff 42 > /tmp/pr-diff.patch gh pr checks 42

Frequently Asked Questions about github-pr

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

FAQPage Schema
How do I automate GitHub PR workflows using the gh CLI?

Automate GitHub PR workflows using the gh CLI to execute token-conscious commands for reviewing pull requests, filtering lists, checking CI status, and diagnosing failures across multiple repositories with reduced context switching.

Do I need jq installed to filter pull request data from GitHub?

Yes, jq is required alongside the gh CLI to parse and filter structured JSON payloads returned when querying pull request metadata, ensuring efficient and token-conscious data extraction.

What's the best way to fetch concise PR metadata without excessive data transfer?

Fetch concise PR metadata by using gh pr view with a focused --json payload specifying exact fields like number, title, and author, minimizing data transfer and optimizing token consumption.

Can I diagnose CI check failures across multiple repositories at once?

Yes, you can diagnose CI check failures across multiple repositories by applying provided gh CLI patterns to list, filter, and monitor pull requests, inspecting CI checks to identify failures quickly.

How do I inspect file changes and diffs for a GitHub pull request via command line?

Inspect file changes and diffs by running gh pr diff to output patch files directly to the terminal or a specified file, enabling quick change inspection without opening a browser.