github-gh-cli

Inspect GitHub pull requests, issues, and CI runs with the gh CLI.

4.0k|479|Updated Apr 16, 2020
One-click install
npx skills add https://github.com/huangrt01/CS-Notes --skill github-gh-cli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-gh-cli
Source: https://github.com/huangrt01/CS-Notes/tree/main/.codex/skills/github-gh-cli
Command: npx skills add https://github.com/huangrt01/CS-Notes --skill github-gh-cli

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Checking pull request status, CI failures, or issue lists often requires opening a browser and clicking through GitHub pages. This Skill retrieves repository facts directly from the command line using the gh CLI, returning structured data suitable for scripting and automation.

Core Features & Use Cases

  • Pull Request Inspection: View PR details, check statuses, and list open PRs for any repository.
  • CI and Workflow Monitoring: List recent workflow runs, view run details, and fetch logs from failed jobs.
  • Issue and API Queries: List issues with filters and run arbitrary GitHub API queries with JSON output and jq filtering.
  • Use Case: When a teammate asks why a PR is blocked, run gh pr checks to see failing CI jobs, then use gh run view with --log-failed to read the failure logs without leaving the terminal.

Quick Start

Use the github-gh-cli skill to check the status and CI results of pull request 123 in the owner/repo repository.

Frequently Asked Questions about github-gh-cli

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

FAQPage Schema
How do I check pull request status from the command line?

Use gh pr view to see PR details and gh pr checks to see the status of CI checks. Add --repo owner/repo when running outside the target repository, and use --json with --jq for structured output.

How to view failed GitHub Actions logs with gh CLI?

Run gh run list to find recent workflow runs, then use gh run view <run-id> --log-failed to print only the logs from failed jobs. This avoids downloading full logs for successful steps.

Can I use gh CLI on a repository I have not cloned locally?

Yes, pass --repo owner/repo to most gh commands to target any repository without cloning it. This works for PR, issue, run, and API commands as long as your gh authentication has access.

What should I do if gh commands fail with authentication errors?

Authentication errors mean gh is not logged in or lacks permissions. Run gh auth login yourself to complete the interactive credential setup, since the skill does not perform interactive authentication on your behalf.

When should I use gh api instead of gh pr or gh issue commands?

Use gh api when the dedicated subcommands do not expose the data you need, such as custom endpoints or uncommon fields. It accepts any GitHub REST API path and supports --jq for filtering the JSON response.