
Github PR Review Fix
Review and resolve PR comments from GitHub.
Install
npx skills add IvanMurzak/Unity-MCP --skill github-pr-review-fix -g -a claude-code -y- Repository
- IvanMurzak/Unity-MCP4.6k
- Category
- Git and review
- Updated
- 4d ago
- License
- Apache-2.0
- Context cost
- Mediumabout 1,852 tokens
- Runs scripts
- No, instructions only
What it does
Review and resolve PR comments from GitHub. Validates each comment, fixes legitimate issues.
Review PR Comments
Review unresolved comments on the GitHub pull request associated with the current branch. Validate each comment, then fix legitimate issues.
Step 1, Identify the Pull Request
- If
$ARGUMENTScontains a PR number, use it. - Otherwise, detect the current git branch and find its open PR:
gh pr view --json number,url,headRefName,baseRefName - If no PR is found, stop and tell the user.
Step 2, Fetch All Unresolved Review Comments
Fetch PR review comments (not issue-level comments) using the GitHub CLI:
gh api repos/{owner}/{repo}/pulls/{number}/comments --paginate
Filter to comments where the thread is not resolved. Group comments by thread (same in_reply_to_id or same path + line/original_line). For each thread, treat the first comment as the review request and subsequent comments as discussion.
Also fetch general PR comments (issue-level):
gh api repos/{owner}/{repo}/issues/{number}/comments --paginate
If there are zero unresolved comments, report that and stop.
Step 3, Validate and Fix Comments in Parallel (Sub-agents)
For each unresolved comment or comment thread, spawn a sub-agent in parallel. Use model: "sonnet" for cost efficiency. Each agent validates the comment and, if legitimate, fixes it immediately in place.
Conflict avoidance: If multiple comments target the same file, run those agents sequentially (not in parallel) to avoid edit conflicts. Comments on different files run in parallel.
Sub-agent Prompt Template
You are a code review comment validator and fixer. Your job is to determine whether a PR review comment identifies a real issue, and if so, fix it immediately.
## Comment Details
- **Author**: {comment_author}
- **File**: {file_path}
- **Line(s)**: {line_range}
- **Comment**: {comment_body}
- **Thread context** (if any): {thread_replies}
- **Comment ID**: {comment_id}
## Phase 1, Validate

