| name | github |
| description | Interact with GitHub using the `gh` CLI |
| always | false |
| triggers | ["github","gh","pull request","pr","issue","repo","workflow","actions"] |
| requires | ["bin:gh"] |
| metadata | {"pocketrb":{"emoji":"🐙"}} |
GitHub Skill
Use the gh CLI for GitHub operations. This skill provides guidance on common GitHub workflows.
Prerequisites
The gh CLI must be installed and authenticated:
brew install gh
gh auth login
Common Commands
Pull Requests
gh pr list --repo owner/repo
gh pr view 55 --repo owner/repo
gh pr checks 55 --repo owner/repo
gh pr create --title "Title" --body "Description"
gh pr merge 55 --squash --delete-branch
gh pr diff 55 --repo owner/repo
Issues
gh issue list --repo owner/repo
gh issue view 123 --repo owner/repo
gh issue create --title "Bug" --body "Description"
gh issue close 123
Workflows / Actions
gh run list --repo owner/repo --limit 10
gh run view 12345 --repo owner/repo
gh run watch 12345 --repo owner/repo
gh run rerun 12345 --failed
API Access
gh api repos/owner/repo/pulls/55 --jq '.title'
gh api repos/owner/repo/issues/123/comments
gh api repos/owner/repo/issues/123/comments -f body="Comment text"
Tips
- Use
--repo owner/repo or -R owner/repo to specify repository
- Use
--json field1,field2 to get specific fields as JSON
- Use
--jq '.field' to filter JSON output
- Most commands support
--web to open in browser