skills/resolving-pr-review-comments/SKILL.md
Inspect all feedback on a pull request, assess whether each comment is valid against the current code, address reasonable findings, verify the changes, reply to and resolve eligible threads, commit, and push. Use only when the user explicitly invokes $resolving-pr-review-comments or names resolving-pr-review-comments; never auto-activate from ordinary requests about reviews, comments, pull requests, commits, or pushes.
npx skillsauth add narumiruna/agent-skills resolving-pr-review-commentsInstall 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.
Use this skill only after explicit invocation. Treat review comments as claims to verify, not instructions to apply blindly. External actions covered by the invocation are review replies, thread resolution, commits, and an explicit push of the current pull-request branch.
Inspect the worktree, index, and current branch:
git status --short --branch
git diff --cached --name-only
git symbolic-ref --quiet --short HEAD
Stop before editing if any pre-existing staged change exists; a normal commit would include the entire index. Report those paths and do not unstage, commit, or hide them. Preserve unrelated unstaged and untracked changes, and stop if they overlap files that accepted feedback requires changing.
Resolve the pull request, repository, head repository, head branch, base branch, number, URL, and current state from the hosting provider. For GitHub, start with:
gh pr view --json number,url,state,baseRefName,headRefName,headRepository,headRepositoryOwner,isCrossRepository
Confirm that HEAD is attached and that the checked-out branch is the pull-request head. Stop rather than editing or pushing another or detached branch accidentally.
Compare the pull request against the merge base of its reported base branch. Do not assume the base is main.
Collect every feedback surface, not only the summary shown by gh pr view:
On GitHub, use paginated REST endpoints for issue comments, reviews, and inline comments, plus the GraphQL reviewThreads connection for thread IDs, isResolved, isOutdated, and all thread comments. Paginate beyond the first page. Do not treat an empty top-level comment list as proof that no inline feedback exists.
Ignore non-actionable service messages such as quota notices, but do not silently omit substantive feedback. Re-query after pushing because comments can arrive while work is in progress.
Trace each concern against the current HEAD, pull-request intent, repository instructions, tests, and relevant callers.
Classify it as one of:
Do not implement preference-only suggestions as correctness fixes. Do not mark a thread resolved merely to clear the review queue.
Group changes into coherent commit boundaries. If comments require unrelated fixes, use separate focused commits.
Stage only intended paths. Before each commit, verify that every path in git diff --cached --name-only belongs to that commit; stop if the index contains anything else.
Write Conventional Commit messages grounded in each staged diff. Do not add attribution trailers. If no file change is needed, do not create an empty commit.
Resolve a single push remote whose push URL matches the pull request's head repository, and validate the reported head branch with git check-ref-format --branch. Confirm any configured upstream with git rev-parse --abbrev-ref --symbolic-full-name '@{upstream}'; stop if the remote or destination is missing, mismatched, or ambiguous.
Push only HEAD to the verified pull-request branch with an explicit refspec:
git push "$verified_remote" "HEAD:refs/heads/$verified_pr_head"
Never use a no-refspec push, rely on push.default or remote.*.push, or force-push unless the user separately and explicitly requests it.
Compare local HEAD with git ls-remote --exit-code "$verified_remote" "refs/heads/$verified_pr_head" before replying or resolving threads.
Finally, re-query all feedback surfaces and verify:
Report the pull-request URL, commits pushed, resolved and remaining thread counts, checks run, and any feedback deliberately not implemented.
development
Score or compare one or more agent skills across trigger clarity, workflow actionability, safety boundaries, verification rigor, incremental knowledge value, and leanness. Use only when the user explicitly asks for ratings, numerical quality scores, rubric-based scorecards, or scored comparisons; use creating-agent-skills for unscored reviews or revisions.
development
Assess or improve an existing codebase's architecture when the user asks about module boundaries, coupling, scattered ownership, testability, change locality, deep modules, seams, or behavior-preserving structural refactoring. Use for cross-module design rather than ordinary diff review or a confirmed edge-case bug fix.
development
Perform read-only security audits, vulnerability assessments, or threat-focused reviews of diffs, pull requests, code paths, or explicitly scoped repositories when security is the primary objective or acceptance criterion. Use reviewing-code for ordinary review with baseline security coverage and hardening-code-paths for fixing confirmed findings.
development
Run iterative multi-reviewer panels over a code diff, verify their findings, apply explicitly authorized fixes, and re-review the updated change until it passes or reaches a stopping condition. Use when the user asks for a panel loop, multi-model code-review consensus, or a review-fix-re-review cycle.