| name | github |
| description | Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries. |
| metadata | {"nanobot":{"emoji":"๐","requires":{"bins":["gh"]}}} |
GitHub Skill
Use the gh CLI to interact with GitHub. Always specify --repo owner/repo
when not in a git directory, or use URLs directly.
Common Commands
Issues
gh issue list --repo owner/repo
gh issue create --repo owner/repo --title "Bug" --body "Description"
gh issue view 42 --repo owner/repo
gh issue close 42 --repo owner/repo
Pull Requests
gh pr list --repo owner/repo
gh pr create --title "Feature" --body "Description" --base main
gh pr view 42 --repo owner/repo
gh pr merge 42 --repo owner/repo --merge
CI / Actions
gh run list --repo owner/repo --limit 5
gh run view <run-id> --repo owner/repo
gh run watch <run-id> --repo owner/repo
API (advanced)
gh api graphql -f query='{ viewer { login } }'
gh api /repos/owner/repo/releases --jq '.[0].tag_name'
Tips
- Use
--json flag for structured output: gh issue list --json number,title
- Use
--jq for filtering: gh pr list --json number,title --jq '.[] | .title'
- For repos not in current directory, always use
--repo owner/repo
- Check auth status:
gh auth status