| name | github-cli |
| description | Automate GitHub workflows using the gh CLI for pull requests, issues, releases, actions, and repository management. Use when interacting with GitHub beyond basic git operations. |
| allowed-tools | ["Bash"] |
| tags | ["github","gh","pull-request","issues","actions","releases","ci-cd","pr","workflow"] |
| platforms | ["Claude","ChatGPT","Gemini"] |
| author | locusai |
GitHub CLI (gh)
When to use this skill
- Creating, reviewing, or merging pull requests
- Managing issues (create, close, label, assign)
- Checking CI/CD status and workflow runs
- Creating releases and managing tags
- Repository settings and management
- Querying GitHub API for custom automation
Pull Requests
gh pr create --title "feat: add auth" --body "Description here"
gh pr create --fill
gh pr list
gh pr view <number>
gh pr diff <number>
gh pr review <number> --approve
gh pr review <number> --request-changes --body "Please fix X"
gh pr merge <number> --squash --delete-branch
gh pr checks <number>
Issues
gh issue create --title "Bug: login fails" --body "Steps to reproduce..."
gh issue create --title "Bug" --label bug,urgent --assignee @me
gh issue list --label bug --state open
gh issue close <number> --reason completed
gh issue transfer <number> <target-repo>
Actions & CI/CD
gh run list --workflow=ci.yml
gh run view <run-id>
gh run watch <run-id>
gh run rerun <run-id> --failed
gh workflow run <workflow-name> --ref main
Releases
gh release create v1.0.0 --title "v1.0.0" --generate-notes
gh release create v1.0.0 --draft --notes "Release notes here"
gh release upload v1.0.0 ./dist/app.tar.gz
gh release list
API Queries
gh api repos/{owner}/{repo}/pulls --jq '.[].title'
gh api graphql -f query='{ viewer { login } }'
gh api repos/{owner}/{repo}/issues --paginate --jq '.[].title'
Best Practices
- Use
--jq for filtering JSON output instead of piping to jq
- Use
gh api for anything not covered by built-in commands
- Set defaults:
gh repo set-default to avoid specifying repo each time
- Use templates: Create
.github/PULL_REQUEST_TEMPLATE.md for consistent PRs