From dev-workflow
Iteratively fix GitHub PR review comments until the reviewer is satisfied. Fetches unaddressed code review comments (from Copilot or humans), triages each as fix or skip, applies fixes, runs tests/build/lint, commits, pushes, replies to each comment, re-requests review, and repeats until no new comments remain. Use this skill when the user says "fix PR comments", "address review feedback", "resolve code review", "handle Copilot comments", "iterate on PR review", or references a PR URL and wants review comments addressed. Also trigger when the user pastes a GitHub PR link and says something like "clean this up", "get this through review", or "fix what Copilot flagged".
How this skill is triggered — by the user, by Claude, or both
Slash command
/dev-workflow:pr-fix-commentsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Iteratively resolve all code review comments on a GitHub pull request until the
Iteratively resolve all code review comments on a GitHub pull request until the automated reviewer (or human reviewer) has no remaining feedback.
The user provides one of:
https://github.com/owner/repo/pulls/13)Extract the owner, repo, and PR number from whichever form is given.
Repeat the following cycle until no new review comments appear:
Fetch in parallel:
gh pr view <N> --json title,body,headRefName,baseRefName,statein_reply_to_id == null):
gh api repos/{owner}/{repo}/pulls/{N}/comments \
--jq '.[] | select(.in_reply_to_id == null) | {id, path, line, body, created_at, user: .user.login, diff_hunk}'
A comment is unaddressed if no reply exists from a non-bot user. Check by
collecting all in_reply_to_id values and filtering out top-level comments
whose id appears as a reply target.
Shortcut: if a comment already has a reply from ebragas (or the repo owner),
treat it as addressed.
If no unaddressed comments remain, the cycle is done — report success and stop.
If you're already on the correct branch (e.g., inside a worktree from /execute-task), skip the checkout.
Otherwise:
git fetch origin <headRefName>
git checkout <headRefName>
If a worktree conflict blocks checkout, remove the stale worktree first.
For each unaddressed comment, read the referenced file and surrounding context. Decide:
Bias toward fixing. Only skip when the suggestion would make things worse or is clearly incorrect.
Edit the files directly. Prefer Edit tool over Write for surgical changes.
Run the project's test, build, and lint commands. For this project:
npx vitest run <relevant-test-files>
npm run build
npx eslint <changed-files> # lint only changed files to avoid noise from dist/worktrees
If verification fails, fix the issue before proceeding.
Stage only the changed files (not unrelated files). Commit with a descriptive message summarizing the fixes. Push to the PR branch.
git add <specific-files>
git commit -m "<message>"
git push origin <branch>
For each comment that was fixed or skipped, post a reply via the API:
gh api repos/{owner}/{repo}/pulls/{N}/comments/{comment_id}/replies \
-f body="<one-sentence response>"
Reply format:
gh pr edit <N> --add-reviewer 'copilot-pull-request-reviewer'
For human reviewers, use their GitHub username instead.
Poll until the review count increases or the pending reviewer clears:
# Check review count
gh api repos/{owner}/{repo}/pulls/{N}/reviews \
--jq '[.[] | select(.user.login == "<reviewer>")] | length'
# Check if still pending
gh api repos/{owner}/{repo}/pulls/{N}/requested_reviewers \
--jq '.users[].login'
Wait 30-60 seconds between polls. Once the new review lands, go back to step 1.
When a review cycle produces zero new unaddressed comments, report:
Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
npx claudepluginhub magic-co/claude-plugins --plugin dev-workflow