| name | github-cli-code-review |
| description | Use GitHub CLI (gh) to fetch PR details, review comments, and threads for the current branch before addressing code review feedback. |
GitHub CLI Code Review
Goal
When addressing code review comments, do not rely on user-provided summaries. Use gh to pull the authoritative review threads for the PR associated with the current branch.
Assume git authentication is available via SSH and does not block access.
When to use this skill
Use this skill when you need to:
- Address PR review feedback
- Confirm what reviewers actually requested
- Avoid missing unresolved threads
Default tool order
- Identify the PR for the current branch using
gh
- Pull review threads/comments and extract actionable items
- Implement fixes
- Re-check PR thread state (optional)
Recommended commands
git status
gh pr view --json number,title,url,headRefName,baseRefName,author
gh pr view --json reviewThreads
gh pr view
gh pr view --comments
Workflow tips
- Prefer
gh pr view --json ... and then parse, because it includes thread resolution state.
- If multiple PRs exist, use
gh pr list --head <branch> --json number,title,url and pick the one matching the current head branch.
Critical invariants
- Don’t ask the user to paste review comments unless
gh fails.
- Don’t assume the PR number; discover it.
- Avoid rewriting unrelated code—stick to the requested deltas.