gh

Manage GitHub CLI workflows for PRs, issues, releases, and Actions runs.

1|Updated Mar 18, 2024
One-click install
npx skills add https://github.com/erfianugrah/dotfiles --skill gh-erfianugrah
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gh
Source: https://github.com/erfianugrah/dotfiles/tree/main/.pi/agent/skills/gh
Command: npx skills add https://github.com/erfianugrah/dotfiles --skill gh-erfianugrah

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It streamlines the tedious, error-prone GitHub CLI workflows needed to create, inspect, review, merge, and maintain pull requests, issues, releases, and Actions runs without switching tools or typing large amounts of unstructured text.

Core Features & Use Cases

  • PR lifecycle operations: Create PRs, list/view details, inspect diffs and checks, edit metadata, comment, review, merge, or close.
  • Issue lifecycle operations: List/create/view/comment/edit, label/assignee management, close/reopen, and lock issues to prevent new comments.
  • Releases + GitHub Actions management: Create/upload/delete releases (including assets), list/dispatch workflows, inspect/watch runs, manage artifacts, and handle Actions cache via token-efficient JSON querying.

Quick Start

Use the gh skill to manage an existing pull request end-to-end by asking: "Approve PR number 123, add the 'triage' label, and then merge it with squash when checks pass."

Frequently Asked Questions about gh

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

FAQPage Schema
How do I manage GitHub pull requests and issues from the command line?

You can manage GitHub pull requests and issues from the command line by using the gh CLI to create, review, merge, label, and close them directly. This automates tedious workflows without switching tools.

How do I automate GitHub Actions runs and release asset uploads?

To automate GitHub Actions runs and release assets, dispatch workflows and manage releases via GitHub CLI commands. You can inspect run status and handle artifacts using token-efficient JSON querying.

What is the best way to parse GitHub CLI output for specific fields?

The best way to parse GitHub CLI output for specific fields is using structured --json fields combined with --jq projections. This ensures token-efficient gh invocations when inspecting PRs, issues, or workflow runs.

Do I need to handle authentication scopes separately when using gh CLI for repository operations?

Yes, you must handle authentication scopes for repository operations by checking and refreshing your status via gh auth status and gh auth refresh commands to ensure safe merge and release actions.

Can I execute an end-to-end GitHub PR workflow with a single command request?

Yes, you can execute an end-to-end GitHub PR workflow with a single request, such as approving a PR, adding a label, and merging it with squash when checks pass, all through the gh CLI.

Why should I use GitHub CLI instead of the web interface for issue triage?

You should use GitHub CLI instead of the web interface for issue triage to streamline error-prone workflows and apply labels or assignments efficiently. It avoids typing unstructured text and handles bulk operations quickly.