skill/resolve-pr-comments/SKILL.md
Fetch GitHub PR review comments, propose fixes with a plan, and resolve threads after approval
npx skillsauth add sorratheorc/sorraagents resolve-pr-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 when:
Provide one of:
https://github.com/owner/repo/pull/123PR #123 in owner/repogh pr view <PR_NUMBER> --repo <OWNER/REPO> --json headRefName,baseRefName,title,url
gh api repos/<OWNER>/<REPO>/pulls/<PR_NUMBER>/comments
This returns an array of review comments with:
id: Comment ID for repliesbody: The review comment textpath: File pathline / original_line: Line number(s)diff_hunk: Code contextuser.login: Reviewer usernamegh api repos/<OWNER>/<REPO>/issues/<PR_NUMBER>/comments
git fetch origin <branch_name>
git checkout <branch_name>
For each code review comment, read the file and surrounding context:
# Use Read tool to examine the file at the specified line
For each code review comment, categorize as one of:
For each general PR comment (non-code):
Output a structured plan in this format:
## PR Review Resolution Plan
**PR:** #<number> - <title>
**Branch:** <branch_name>
**Comments found:** <X> code review comments, <Y> general comments
---
### Code Review Comments
#### Comment 1: [<file>:<line>] by @<reviewer>
> <quoted comment body>
**Category:** Actionable fix
**Proposed action:** <description of the fix>
**Files to modify:** <list of files>
---
#### Comment 2: [<file>:<line>] by @<reviewer>
> <quoted comment body>
**Category:** Disagreement
**Reasoning:** <explanation of why the suggested change is incorrect>
**Proposed response:** <reply to post explaining the disagreement>
---
### General PR Comments (No automatic action)
#### Comment A: by @<reviewer>
> <quoted comment body>
**Proposed response:** <suggested reply for user to review>
---
## Summary
- **Fixes to implement:** <N>
- **Disagreements to explain:** <N>
- **Questions to answer:** <N>
- **General comments needing response:** <N>
**Ready to proceed?** Reply "yes" to implement fixes and post responses, or provide feedback on specific items.
Only proceed after user confirms the plan.
For each approved actionable fix:
Before committing, follow the mandatory build → test → commit order: build the project and verify no errors, then run all tests and verify they pass, and only then commit changes. Never commit before verifying that the build and tests pass.
# Build the project first
npm run build # or the project's build command
# Then run all tests
npm --silent test # or the project's quiet test command
# Only commit after build and tests pass
git add <modified_files>
git commit -m "Address PR review feedback
- <summary of fix 1>
- <summary of fix 2>
..."
git push origin <branch_name>
Capture the commit hash for reference in replies.
For each comment addressed (fix or disagreement):
gh api repos/<OWNER>/<REPO>/pulls/<PR_NUMBER>/comments \
-X POST \
-f body="<description of action taken or disagreement explanation>" \
-F in_reply_to=<COMMENT_ID>
Reply templates:
For fixes:
Fixed in <commit_hash>. <brief description of what was changed>
For disagreements:
After review, I believe the current implementation is correct because <reasoning>.
<optional: suggest alternative or offer to discuss further>
First, get thread IDs:
gh api graphql -f query='
query {
repository(owner: "<OWNER>", name: "<REPO>") {
pullRequest(number: <PR_NUMBER>) {
reviewThreads(first: 100) {
nodes {
id
isResolved
comments(first: 1) {
nodes {
databaseId
}
}
}
}
}
}
}'
Map comment IDs to thread IDs, then resolve each addressed thread:
gh api graphql -f query='
mutation {
resolveReviewThread(input: {threadId: "<THREAD_ID>"}) {
thread {
isResolved
}
}
}'
Output a summary:
## PR Review Resolution Complete
**Commit:** <hash>
**Fixes applied:** <N>
**Disagreements explained:** <N>
**Threads resolved:** <N>
### Actions taken:
1. [<file>:<line>] - <action taken>
2. [<file>:<line>] - <action taken>
...
### Threads resolved:
- Comment by @<reviewer>: <brief description>
...
### Pending (requires manual action):
- General comment by @<reviewer>: <proposed response provided above>
gh + local edit/build/test steps as documented above.To fetch a work item that may be referenced in a PR description or branch name:
wl show SA-0MPYMFZXO0004ZU4 --json
End.
testing
Automated batch planning for intake_complete work items. Discovers all items in intake_complete status and invokes /plan for each sequentially, producing a summary report.
data-ai
Unified git management skill that orchestrates the full feature-branch lifecycle — create, commit, push, PR, merge, cleanup — for both AI agents and human operators.
development
Canonical push-to-dev and branch-policy enforcement for agents. Provides the push-to-dev workflow, branch naming, conflict handling, and release process guidance. Trigger with: /skill:ship push-to-dev
development
Write tests, docs and code for a single, specific Worklog work item. Unlike the `implement` skill, this skill operates on exactly one work-item without using `wl next` for recursive dependency resolution or sub-task discovery. It is designed to be invoked by Ralph's per-child loop so that each child is implemented, audited, and remediated independently. Trigger on user queries such as: 'implement-single <work-item-id>', 'complete <work-item-id> (single)', or when Ralph delegates a single-child implement step.