Review PR comments, address code issues in source files (not generated files), regenerate derived artifacts, run lint/format, commit, push, and reply to the comment thread confirming resolution.
93
Quality
89%
Does it follow best practices?
Impact
99%
1.19xAverage score across 5 eval scenarios
Resolve unaddressed review comments on a GitHub PR by fixing the underlying source code, verifying the fix, committing, pushing, and replying to the comment thread.
The user will provide one of:
#689)https://github.com/org/repo/pull/689)If no specific comment is mentioned, address all unresolved review comments.
# If on a feature branch, find the associated PR
gh pr view --json number,url
# Get the authenticated user's login (used to detect our own replies)
gh api user --jq '.login'
# Fetch review comments (not issue comments)
gh api repos/{owner}/{repo}/pulls/{pr_number}/commentsin_reply_to_id) that has a child reply with user.login matching the authenticated user's login.?since={timestamp}, then re-apply filter 1:
git log --author="$(git config user.name)" --grep="Co-Authored-By: Claude" -1 --format=%cI
gh api "repos/{owner}/{repo}/pulls/{pr_number}/comments?since={timestamp}"Focus on comments that are not marked resolved/outdated and contain actionable feedback from reviewers or bots.
If no unaddressed comments remain after filtering, report this to the user and stop.
Do not blindly action every comment. For each comment:
openapi.json, types.d.ts, build artifacts)Once you have assessed all comments, present your plan to the user before making any changes. Use the ask question tool (or equivalent structured prompt) to show:
Ask the user to confirm the plan or adjust individual items. Only proceed with fixes after receiving confirmation. This prevents wasted effort on misunderstood feedback and keeps the user in control.
If the project has generated files affected by the change (e.g. OpenAPI specs, type definitions, compiled output), run the appropriate regeneration command. Check CLAUDE.md or project docs for the correct command (e.g. bun run api:sync).
bun run format && bun run lint)Stage only the relevant files (source + regenerated artifacts). Write a clear commit message:
fix: <concise description of what was fixed>
<brief explanation of root cause and what changed>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>Push to the current branch.
Reply directly on the review comment thread so the reviewer sees it inline.
Replies must be very short, concise, and clear. No fluff, no preamble. A few words to a single sentence is ideal. Examples:
"Fixed in <sha> — updated the return type to match the schema.""Valid point — deferring to a follow-up since it requires a broader refactor.""Keeping as-is — the explicit check is needed here because <brief reason>."When you've made a decision that differs from what the reviewer suggested, briefly explain why. Don't just say "won't fix" — give the reasoning in one sentence.
gh api repos/{owner}/{repo}/pulls/comments/{comment_id}/replies \
-f body="<short reply>"Use the comment_id from step 1 (the top-level review comment's id, not a child reply's ID).
If the /replies endpoint fails, do not immediately fall back to a top-level comment. Diagnose first:
owner, repo, and comment_id — common mistakes: using a reply's ID instead of the top-level ID, wrong owner for forks, or swapped PR number and comment IDid, then retrygh api repos/{owner}/{repo}/pulls/{pr_number}/comments/{comment_id}/repliesgh api repos/{owner}/{repo}/issues/{pr_number}/comments \
-f body="<short reply referencing the comment>"Install with Tessl CLI
npx tessl i sahildmk/pr-comment-resolver@0.3.1