(chad-tools) Fix PR review findings, push, resolve threads, verify CI
From chad-toolsnpx claudepluginhub metcalfc/claude-plugin --plugin chad-tools/resolveUse when PR has unaddressed comments, when review feedback needs action, or when asked to handle PR feedback
/resolveResolve findings from any source — auto-detects TODOs, PR comments, or todo files, then resolves in parallel
/resolveRemove all @feedback and @agent-response annotation comments, leaving clean code
/resolveResolve merge conflicts on the current branch or for a pull request. Detects conflict types, analyzes both sides, applies per-file resolution strategies, and verifies the result compiles and passes tests.
Fix code issues flagged by PR review comments, push the fixes, verify CI, then delegate to resolve-reviews for thread bookkeeping.
Get the PR number:
gh pr view --json number --jq '.number'
Get repo owner and name:
gh repo view --json owner,name --jq '{owner: .owner.login, name: .name}'
Fetch all top-level review comments (these are the findings — exclude reply-to-reply threads):
gh api repos/{owner}/{repo}/pulls/{pr}/comments --jq '[.[] | select(.in_reply_to_id == null) | {id: .id, path: .path, line: .line, original_line: .original_line, body: .body, author: .user.login, diff_hunk: .diff_hunk, created_at: .created_at}]'
If there are zero comments, report "No review comments found" and stop.
Read any CLAUDE.md files in the repo root for project conventions.
For each top-level review comment:
Read the file at the path mentioned in the comment. Use the line (or original_line) and diff_hunk to locate the exact code.
Check if a commit already addresses the finding — look at commits since the review was posted:
git log --oneline --since="<comment_created_at>" -- <path>
Read those diffs to see if they fix the issue.
Classify the comment into one of three dispositions:
Log each classification so the summary is accurate.
Scope constraint (critical): Only fix what reviewers flagged. No feature additions, no nearby refactoring, no pre-existing issues, no style changes beyond what was called out. If a comment asks for something out of scope, classify it as Reject with a reason.
For each "Needs Fix" item:
After all fixes are applied:
If there are zero "Needs Fix" items, skip to Phase 5 (no commit needed).
Stage only the changed files:
git add <file1> <file2> ...
Create a single commit with a body listing what was fixed:
git commit -m "fix: address PR review feedback
- <brief description of fix 1>
- <brief description of fix 2>
..."
Push:
git push
Only run this phase if fixes were pushed in Phase 3.
Poll CI status (max 5 checks, 30 seconds apart):
gh pr checks {pr} --json name,state,conclusion
Outcomes:
/done gate will catch it.gh run view <run-id> --log-failed
fix: address CI failure from review fixesInvoke the resolve-reviews skill to handle the bookkeeping:
Use the Skill tool:
skill: "resolve-reviews"
The skill runs at haiku tier and handles all GitHub API calls for replies and thread resolution.
Report a final summary:
## Review Resolution
- **Comments found:** N
- **Already fixed:** N (before this run)
- **Newly fixed:** N (this run)
- **Rejected:** N
- **CI status:** passing / pending / failing
Threads resolved via resolve-reviews skill.