assets/skills/fix-pr-comment/SKILL.md
Fix PR review comments workflow. Use when fixing review comments from a pull request, or when user says "fix pr comment", "fix review comment", "fix-pr-comment", "address pr feedback".
npx skillsauth add phuthuycoding/moicle fix-pr-commentInstall 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.
Workflow for fetching and fixing review comments from a pull request.
/fix-pr-comment {PR_NUMBER}
┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ 1. FETCH │──▶│ 2. ANALYZE │──▶│ 3. FIX │──▶│ 4. RESPOND │
│ Comments │ │ Comments │ │ Issues │ │ to PR │
└──────────────┘ └──────────────┘ └──────────────┘ └──────────────┘
Goal: Fetch all review comments from the PR
Get PR details:
gh pr view {PR_NUMBER} --json number,title,state,headRefName,baseRefName
Fetch all review comments:
gh api repos/{owner}/{repo}/pulls/{PR_NUMBER}/comments --jq '.[] | {id: .id, path: .path, line: .line, body: .body, user: .user.login, created_at: .created_at}'
Fetch PR review threads (for threaded discussions):
gh api repos/{owner}/{repo}/pulls/{PR_NUMBER}/reviews --jq '.[] | {id: .id, user: .user.login, state: .state, body: .body}'
Get the current diff:
gh pr diff {PR_NUMBER}
## PR #{NUMBER}: {TITLE}
### Branch
- Head: {headRefName}
- Base: {baseRefName}
### Review Comments
1. **[{file}:{line}]** by @{user}
> {comment body}
2. **[{file}:{line}]** by @{user}
> {comment body}
Goal: Categorize and prioritize comments
| Category | Description | Priority | |----------|-------------|----------| | 🔴 Bug | Code bug or logic error | Must fix | | 🟠 Security | Security concern | Must fix | | 🟡 Architecture | Design/structure issue | Should fix | | 🟢 Style | Code style/formatting | Nice to fix | | 💬 Question | Needs clarification | Respond | | 💡 Suggestion | Optional improvement | Consider |
## Comment Analysis
### Must Fix (Critical)
1. [{file}:{line}] - {summary}
2. [{file}:{line}] - {summary}
### Should Fix
1. [{file}:{line}] - {summary}
### Nice to Fix
1. [{file}:{line}] - {summary}
### Questions to Answer
1. [{file}:{line}] - {question}
Goal: Address each comment systematically
For each comment (in priority order):
### Fixing: [{file}:{line}]
**Comment**: {original comment}
**Action**: {what you're changing}
**Status**: ✅ Fixed / ❓ Need clarification / ⏭️ Skipped (reason)
Option A: Single commit for all fixes
git add .
git commit -m "fix: address PR review comments
- Fix {issue 1}
- Fix {issue 2}
- Address {feedback 3}"
Option B: Separate commits per fix (for complex changes)
git commit -m "fix: {specific fix description}"
Goal: Push changes and respond to reviewers
Push the fixes:
git push
Reply to each comment on GitHub:
# Reply to a specific comment
gh api repos/{owner}/{repo}/pulls/{PR_NUMBER}/comments/{comment_id}/replies \
-f body="Fixed in {commit_sha}. {additional context if needed}"
Request re-review:
gh pr edit {PR_NUMBER} --add-reviewer {reviewer_username}
Add summary comment to PR:
gh pr comment {PR_NUMBER} --body "$(cat <<'EOF'
## Review Comments Addressed
### Fixed
- ✅ [{file}:{line}] - {description}
- ✅ [{file}:{line}] - {description}
### Clarifications
- 💬 [{file}:{line}] - {response to question}
### Deferred
- ⏭️ [{file}:{line}] - {reason for deferring}
Ready for re-review!
EOF
)"
For bug fixes:
Fixed in {commit}. Good catch! The issue was {brief explanation}.
For style/suggestions:
Updated as suggested. Thanks for the feedback!
For questions:
{Answer the question}. Let me know if you need more context.
For disagreements (respectful):
I considered this, but kept the current approach because {reason}. Happy to discuss further if you still have concerns.
# View PR
gh pr view {NUMBER}
# Get PR comments
gh api repos/{owner}/{repo}/pulls/{NUMBER}/comments
# Get PR reviews
gh api repos/{owner}/{repo}/pulls/{NUMBER}/reviews
# Reply to comment
gh api repos/{owner}/{repo}/pulls/{NUMBER}/comments/{comment_id}/replies -f body="message"
# Add PR comment
gh pr comment {NUMBER} --body "message"
# Request reviewer
gh pr edit {NUMBER} --add-reviewer {username}
# View PR diff
gh pr diff {NUMBER}
# Checkout PR branch
gh pr checkout {NUMBER}
PR comments are properly addressed when:
development
Test-Driven Development workflow. Use when doing TDD, writing tests first, or when user says "tdd", "test first", "test driven", "red green refactor".
development
Thorough pull request review workflow with architecture compliance checks. Use when reviewing pull requests, checking code changes, or when user says "review pr", "check pr", "review code", "pr review", "review pull request".
development
Review local branch changes for architecture compliance, conventions, and code quality before pushing/PR. Stack-aware — detects the project stack and applies the matching rules. Use when user says "review changes", "review branch", "check branch", "check changes", "review my code", "review before pr".
testing
DDD architecture compliance review with automated checks and review loop. Use when user says "architect-review", "architecture review", "review architecture", "check architecture", "review ddd", "ddd review".