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.
Fetch all review comments on an open PR, address each, push, and respond back to GitHub.
ARGUMENTS: PR_NUMBER — the PR you authored.
/review-pr/review-branch/fix-hotfix first, then this skillFETCH → ANALYZE → FIX → RESPOND
PR={number}
gh pr view $PR --json number,title,state,headRefName,baseRefName,author
gh pr diff $PR
gh api repos/{owner}/{repo}/pulls/$PR/comments \
--jq '.[] | {id, path, line, body, user: .user.login, created_at}'
gh api repos/{owner}/{repo}/pulls/$PR/reviews \
--jq '.[] | {id, user: .user.login, state, body}'
Collect into a list. Each comment has: id, file:line, author, body, created_at.
For each comment, classify:
| Category | Action | |----------|--------| | Must-fix (bug, security, broken test, arch violation) | Fix in this round | | Should-fix (style, naming, missing test for new code) | Fix unless explicit reason not to | | Discussion (asking a question, proposing alternative) | Reply with reasoning before fixing | | Nit / preference (subjective) | Acknowledge + decide; OK to push back politely | | Outdated (code already changed) | Reply "resolved by {commit}" and resolve thread |
Ambiguous comment (e.g., "this feels off")? Ask the reviewer for specifics before guessing.
Build a triage table:
| # | File:line | Author | Category | Plan |
|---|-----------|--------|----------|------|
| 1 | handler.go:42 | @alice | must-fix | extract validation to DTO |
| 2 | store.go:88 | @bob | discussion | reply: prefer current approach because ... |
fix(handler): validate input in DTO per #pr-comment-1)/review-branch before pushingIf a comment requests something structural (move logic between layers, add a port), use /feature-refactor for that subtree, then come back here to respond.
/review-branch cleanPush commits, then reply on GitHub.
git push
# Reply to each thread
gh api repos/{owner}/{repo}/pulls/$PR/comments/{comment_id}/replies -f body="..."
# Or single summary review
gh pr review $PR --comment --body "$(cat reply.md)"
Fixed
Fixed in {sha}. {one-line of what changed}.
Pushing back (politely)
Considered this — keeping current approach because {specific reason}. Happy to revisit if you have stronger evidence.
Asking back
Could you clarify what you mean by "this feels off"? Is it about {hypothesis A} or {hypothesis B}?
Resolved by other change
Resolved by {sha} earlier in the chain — line {N} no longer exists.
After replying, mark threads resolved (GitHub UI or API). Don't leave dangling threads — reviewer can't tell what's done.
gh pr edit $PR --add-reviewer {original_reviewer}
## PR #{N}: comments addressed
| # | File:line | Category | Resolution | Commit |
|---|-----------|----------|------------|--------|
| 1 | handler.go:42 | must-fix | Extracted validation | abc123 |
| 2 | store.go:88 | discussion | Replied + kept approach | — |
| 3 | helper.go:5 | nit | Renamed | def456 |
### Build / Lint / Tests: PASS
### Re-review requested: @{reviewer}
/review-branch before pushing — catch easy issues before reviewer round 2| When | Use |
|------|-----|
| You are the reviewer | /review-pr |
| Self-review before pushing again | /review-branch |
| Reviewer asked for architectural refactor | /feature-refactor |
| Reviewer surfaced a bug needing investigation | /fix-root-cause |
| Phase | Agent | Purpose |
|-------|-------|---------|
| ANALYZE | @code-reviewer | Triage comments by severity |
| FIX | Stack-specific dev agent | Apply code changes |
| FIX | @security-audit | If comment flagged security |
| RESPOND | @docs-writer | Polish written replies |
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".