gh-cli

Automate GitHub repository, pull request, issue, and release tasks via gh CLI.

1|Updated Oct 23, 2021
One-click install
npx skills add https://github.com/taiidani/dotfiles --skill gh-cli-taiidani
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gh-cli
Source: https://github.com/taiidani/dotfiles/tree/main/.opencode/skills/gh-cli
Command: npx skills add https://github.com/taiidani/dotfiles --skill gh-cli-taiidani

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers and automation agents often spend time navigating web UIs or crafting ad hoc API calls to perform routine GitHub tasks; this Skill centralizes and standardizes those operations into concise CLI commands that produce predictable, machine-friendly output and reduce token usage during automation.

Core Features & Use Cases

  • Pull Request Management: list, view, diff, create, update branches, and merge pull requests while selecting only required fields for compact output.
  • Issue Triage and Comments: list, view, create, edit, and comment on issues with label and assignee handling.
  • Repository, Commit, and Release Operations: view repo metadata, fetch file contents, list commits, create releases, and perform advanced API calls with pagination.
  • Use Case: Automate a code review workflow that finds open PRs, fetches minimal metadata for each, posts review comments, and updates branches without dumping large JSON blobs.

Quick Start

Use the gh-cli skill to list open pull requests in owner/repo and return each pull request number, title, and author as compact JSON.

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 pull request management from the command line?

Automate GitHub pull requests by listing, viewing, diffing, creating, and merging via gh CLI commands. Select only required fields like number and title to produce compact, machine-friendly JSON output for automation workflows.

Can I list and update GitHub issues with labels using gh CLI?

Yes, you can list, view, create, edit, and comment on GitHub issues using gh CLI. It supports label and assignee handling to streamline issue triage and produces structured output for tracking.

What is the best way to fetch minimal GitHub repository metadata for automation?

Fetch minimal GitHub repository metadata by using gh CLI with --json and --jq flags. This filters API responses to select only required fields, reducing token usage and preventing large JSON blobs in automation.

Do I need to craft ad hoc API calls to perform GitHub release tasks?

No, you do not need ad hoc API calls for GitHub releases. The gh CLI handles viewing repo metadata, fetching file contents, listing commits, and creating releases directly with structured commands.

How does gh CLI handle pagination for advanced GitHub API endpoints?

For advanced GitHub API endpoints, gh CLI supports direct gh api calls with pagination. This allows you to query branch and ref data while maintaining predictable, structured output for complex automation.

Why does my GitHub automation output large JSON blobs that break parsing?

GitHub automation outputs large JSON blobs when commands fetch full API responses. Use gh CLI with --json and --jq to select only required fields, ensuring predictable, minimal output that reduces token usage.