skills/resolve-pr/SKILL.md
Address PR review comments systematically. Use when user types /resolve-pr or asks to fix/address PR feedback, review comments, or requested changes.
npx skillsauth add jamesc/skills resolve-prInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
When activated, execute this workflow to systematically address all PR review comments:
Determine Issue ID per pick-issue step 1 (branch name → worktree name → ask user).
Enumerate ALL unresolved threads — never declare "no comments" without evidence:
Fetch from all three sources and print a numbered list of everything found:
Review threads (code-level, includes CodeRabbit and Copilot): Use the GitHub MCP pull_request_read tool with method get_review_comments. Capture threadId (node ID, e.g. PRRT_kwDO…) and isResolved/isOutdated for each.
General PR comments (conversation-level): Use method get_comments. Includes bot summary comments from CodeRabbit and Copilot.
Bot reviews explicitly: Also fetch reviews from named bots:
gh api repos/{owner}/{repo}/pulls/{pr}/reviews --jq '.[] | select(.user.login | test("copilot|coderabbit|github-copilot"; "i")) | {id, state, user: .user.login}'
RULE: You MUST show the raw count from each source before saying there is nothing to do. "0 threads, 0 general comments, 0 bot reviews" is the only acceptable "nothing to do" output.
Analyze and plan: For each review comment:
Run tests first: Verify current state passes checks:
just test
Write tests for behavioral changes: For code fixes that change logic or behavior:
Skip tests for: Naming changes, documentation updates, style/formatting fixes, comment improvements — these don't need TDD.
Address each comment: For each item in the plan:
Run full test suite: After all changes:
just ci
(Use just test for quick iteration; just ci is the final gate before push.)
Commit changes: Stage and commit with a descriptive message (using issue ID from step 1):
git add -A
git commit -m "fix: address PR review comments BT-{number}
- Summary of each fix
- Reference any Linear issues created"
Push changes:
git push
Reply to each comment: For every review comment that was addressed, add a reply explaining what was done:
gh api repos/{owner}/{repo}/pulls/{pr}/comments/{comment_id}/replies -f body="<explanation of fix, commit hash, any Linear issues created>"
Include: - Commit hash where the fix was made - Brief description of the change - Links to any Linear issues created for follow-up work
Resolve review threads: After replying, resolve each addressed review thread using the GraphQL API:
gh api graphql -f query='mutation { resolveReviewThread(input: {threadId: "<thread_node_id>"}) { thread { isResolved } } }'
The thread node ID (e.g., PRRT_kwDO...) is available from the get_review_comments response in step 2. Only resolve threads where the fix has been committed and pushed.
Final verification pass — re-fetch all threads after pushing and confirm completeness:
# Re-fetch review threads and check none are still unresolved
gh api repos/{owner}/{repo}/pulls/{pr}/comments --jq '[.[] | {id, path, resolved: false}] | length'
# Re-fetch bot reviews
gh api repos/{owner}/{repo}/pulls/{pr}/reviews --jq '[.[] | select(.state == "CHANGES_REQUESTED")] | length'
Also re-run the GitHub MCP get_review_comments to confirm isResolved: true on every thread addressed.
Do not proceed to step 13 until every thread is verified resolved or explicitly acknowledged as a known skip (e.g. outdated).
Report summary: Provide a summary table of all comments and how they were resolved, with thread IDs and commit hashes.
Auto-chain to done: If all review comments have been successfully resolved (no failures, no pending issues), automatically activate the done skill:
done skill without waiting for user confirmationdone skill's bot-review gate (step 12) will re-verify that no unresolved Copilot / CodeRabbit findings remain before reporting success. If something was missed here, the gate will halt there.If there are any issues or manual steps needed, report them and wait for user input instead.
tools
Find the next logical piece of work. Use when user types /whats-next or asks what they should work on next, or wants recommendations for the next task.
development
Use when navigating code, finding references, looking up definitions, understanding types, or tracing call hierarchies in TypeScript, Rust, or Beamtalk (.bt) files. Prefer LSP over Grep/Glob for any navigation task where symbol semantics matter.
data-ai
Find and update Linear issues that need labels, blocking relationships, or metadata. Use when user says '/update-issues' with criteria like 'no labels', 'missing agent-ready', 'needs size', etc.
data-ai
Sync modified skills and agents back to the repo and create a PR. Use when user types /sync-skills or wants to save in-session skill improvements.