gh-cli

Automate GitHub repository management tasks using the gh CLI.

1|Updated Dec 5, 2025
One-click install
npx skills add https://github.com/lollipopkit/cc-skills --skill gh-cli-lollipopkit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gh-cli
Source: https://github.com/lollipopkit/cc-skills/tree/main/gh-cli
Command: npx skills add https://github.com/lollipopkit/cc-skills --skill gh-cli-lollipopkit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill lets you interact with GitHub repositories, PRs, issues, and releases directly from the chat using the gh CLI, enabling scripted workflows without leaving your terminal.

Core Features & Use Cases

  • Common Reads: List PRs, view PRs, view issues, list releases using gh with JSON fields for concise results.
  • Writes (With Caution): Create or update PRs, issues, comments, releases only after confirming intent and required fields; outputs are URLs/results only.
  • Context Handling: Always set repo context using --repo or gh repo view to avoid ambiguous operations.

Quick Start

List open PRs for repo owner/name with gh and show titles and authors; then checkout PR 17 locally if needed.

Frequently Asked Questions about gh-cli

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

FAQPage Schema
How do I automate GitHub repository tasks using the gh CLI?

The gh CLI automates GitHub workflows by letting you list PRs and issues, view repository data, draft releases, and manage pull requests directly from your terminal using structured JSON output and explicit repository context.

Can I list and filter pull requests across GitHub repositories with gh?

Yes, gh CLI lists open PRs with JSON fields for titles and authors, supports --limit to control output size, and requires explicit --repo context to avoid ambiguous operations across repositories.

What do I need to set up before using gh CLI for repository automation?

Authenticate gh CLI with a GitHub token, set explicit repository context using --repo or gh repo view, and ensure your environment supports bash scripting for automated workflows.

How do I safely create or update PRs and issues with gh without mistakes?

gh CLI requires explicit confirmation of intent and validates required fields before creating or updating PRs, issues, and comments; operations return URLs and results only, not destructive changes without approval.

Can I check out a pull request locally from the command line?

Yes, gh CLI lets you checkout PRs locally by PR number after listing them, enabling you to review and test branches without leaving your terminal.