gh CLI to interact with GitHub issues, pull requests, CI runs, and API queries.
Installation
The skill requires the GitHub CLI (gh):
- Homebrew
- apt
Pull Requests
Check CI Status
Check CI status on a pull request:--repo owner/repo when not in a git directory, or use URLs directly.
List Workflow Runs
List recent workflow runs:View Run Details
View a run and see which steps failed:API for Advanced Queries
Thegh api command accesses data not available through other subcommands.
Get PR with specific fields:
JSON Output
Most commands support--json for structured output. Use --jq to filter:
Examples
List Open Issues
Create a Pull Request
View Issue Details
Merge a Pull Request
Tips
- Always use
--repo owner/repowhen not in a git directory - Use
--jsonand--jqfor programmatic access - Use
gh apifor queries not supported by other commands