| name | github-pr |
| description | Review, create, and manage GitHub PRs using the gh CLI. View diffs, checks, comments, and create PRs with proper formatting. |
| triggers | ["/github-pr","When reviewing pull requests","When creating pull requests","When checking PR status or CI checks"] |
| allowed-tools | ["Bash","Read","Grep","Glob","Edit","Write"] |
GitHub PR Management
Use the gh CLI for all GitHub PR operations. This avoids MCP overhead while providing full PR workflow support.
Common Workflows
Review a PR
gh pr view <number>
gh pr diff <number>
gh pr checks <number>
gh pr view <number> --comments
gh pr checkout <number>
Create a PR
gh pr create --title "Title" --body "$(cat <<'EOF'
## Summary
- Change description
## Test plan
- [ ] Test steps
🤖 Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"
gh pr create --draft --title "WIP: Title" --body "Description"
Manage PRs
gh pr list
gh pr merge <number> --squash
gh pr close <number>
gh pr edit <number> --add-reviewer username
gh pr view <number> --json title,body,state,reviews,checks
Check CI Status
gh pr checks
gh run view <run-id>
gh run view <run-id> --log-failed
Best Practices
- Always use
--json flag when you need structured data for analysis
- Use
gh pr diff to review changes before approving
- Check
gh pr checks before merging to ensure CI passes
- When creating PRs, always include a test plan section