GitHub Skill
Use the gh CLI to interact with GitHub repositories.
When to use
- User asks about GitHub issues or PRs
- User wants to check CI status
- User needs to manage GitHub workflows
How to execute
Pull Requests
Check CI status on a PR:
gh pr checks 55 --repo owner/repo
List recent workflow runs:
gh run list --repo owner/repo --limit 10
View a run and see which steps failed:
gh run view <run-id> --repo owner/repo
View logs for failed steps only:
gh run view <run-id> --repo owner/repo --log-failed
Issues
List issues:
gh issue list --repo owner/repo
Create issue:
gh issue create --repo owner/repo --title "Title" --body "Description"
API for Advanced Queries
Get PR with specific fields:
gh api repos/owner/repo/pulls/55 --jq '.title, .state, .user.login'
JSON Output
Most commands support --json for structured output:
gh issue list --repo owner/repo --json number,title --jq '.[] | "\(.number): \(.title)"'
Notes
- Always specify
--repo owner/repowhen not in a git directory - Requires
ghCLI to be installed and authenticated