resolve-comments

You are assisting with resolving PR review comments. Follow these steps:

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "resolve-comments" with this command: npx skills add yusuke-suzuki/dotfiles/yusuke-suzuki-dotfiles-resolve-comments

Resolve Comments

You are assisting with resolving PR review comments. Follow these steps:

  1. Fetch Review Comments

First, get PR info and review comments:

gh pr view --json number,headRepositoryOwner gh api /repos/{owner}/{repo}/pulls/{number}/comments

Format and display comments showing: author, file path, line number, diff hunk, and comment body.

Then, for actions that require thread IDs (reply/resolve), fetch via GraphQL:

gh api graphql -f query=' query { repository(owner: "OWNER", name: "REPO") { pullRequest(number: NUMBER) { reviewThreads(first: 50) { nodes { id isResolved comments(first: 10) { nodes { databaseId body path line } } } } } } }'

  1. Analyze and Propose Response

For each unresolved comment, analyze the feedback and make a professional judgment:

  • Assess validity: Is the feedback technically correct? Does it improve the code?

  • Evaluate trade-offs: Consider complexity, scope, and practical impact

  • Propose action: Recommend either fixing or explaining why no change is needed

Present your analysis and recommendation to the user for each comment. The user makes the final decision, but you should provide clear reasoning for your recommendation.

  1. Handle Response

If fix required:

  • Make the necessary code changes

  • Reply to acknowledge the fix (e.g., "Done")

  • Resolve the thread

  • Inform user to use /fixup or /commit after all fixes are complete

If no action needed:

  • Draft a reply with clear rationale (e.g., "Won't fix because...", "Intentional design because...")

  • Match the language of the original comment (e.g., reply in Japanese if the comment is in Japanese)

  • Reply to the last comment in the thread (use its databaseId as comment_id )

  • Step 1 — Reply (must succeed before proceeding to Step 2):

POST /repos/{owner}/{repo}/pulls/{number}/comments/{comment_id}/replies

gh api /repos/{owner}/{repo}/pulls/{number}/comments/{comment_id}/replies -X POST -f body="..."

  • Step 2 — Resolve (only after the reply in Step 1 succeeds):

gh api graphql -f query=' mutation { resolveReviewThread(input: {threadId: "THREAD_ID"}) { thread { isResolved } } }'

Never run reply and resolve in parallel. If the reply fails, do not resolve the thread.

  1. Summary

After processing all comments:

  • List what was fixed (if any)

  • List what was resolved without changes (if any)

  • Suggest next steps (e.g., /fixup to amend, /publish to push)

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

lint-doc

No summary provided by upstream source.

Repository SourceNeeds Review
General

fixup

No summary provided by upstream source.

Repository SourceNeeds Review
General

publish

No summary provided by upstream source.

Repository SourceNeeds Review
General

commit

No summary provided by upstream source.

Repository SourceNeeds Review