Fix pr

From excatt/superclaude-plusplus · View interactive version

Fix pr is an AI agent skill from the GitHub repository excatt/superclaude-plusplus. PR 리뷰 코멘트를 자동 수집하고, 해당 코드를 수정하여 재커밋합니다. GitHub PR 피드백 루프를 자동화합니다.

How to use this skill

Skill file

Fix PR

Purpose

GitHub PR의 리뷰 코멘트를 수집하고, 코멘트에 따라 코드를 자동 수정하여 재커밋합니다.

Dynamic Context

Current branch:

!git branch --show-current 2>/dev/null

Open PR comments:

!gh pr view --json number,title,reviewDecision 2>/dev/null || echo "No PR found for current branch"

Usage

/fix-pr           # 현재 브랜치의 PR 코멘트 수정
/fix-pr 123       # PR #123의 코멘트 수정

Workflow

Step 1: Collect Comments

# PR의 모든 미해결 리뷰 코멘트 수집
gh api repos/{owner}/{repo}/pulls/{pr}/comments \
  --jq '.[] | select(.position != null) | {path: .path, line: .line, body: .body}'

# 리뷰 쓰레드의 미해결 항목
gh api repos/{owner}/{repo}/pulls/{pr}/reviews \
  --jq '.[] | select(.state == "CHANGES_REQUESTED") | {body: .body}'

Step 2: Categorize

각 코멘트를 분류:

Step 3: Apply Fixes

각 Must Fix / Should Fix 코멘트에 대해:

  1. 해당 파일과 라인 위치 파악
  2. 코멘트 의도에 맞게 코드 수정
  3. 수정 내용 요약

Step 4: Verify & Commit

# 빌드/테스트 확인
/verify quick

# 수정 커밋
git add -A
git commit -m "fix: address PR review comments

- [comment 1 summary]
- [comment 2 summary]
..."

# 푸시
git push

Step 5: Report

## PR Fix Report

### Fixed (N items)
| # | File | Line | Comment | Fix |
|---|------|------|---------|-----|
| 1 | src/api.ts | 45 | Missing error handling | Added try-catch |

### Skipped (N items)
| # | Reason | Comment |
|---|--------|---------|
| 1 | Optional/Opinion | "Consider using X" |

### Action Required
- [ ] Re-request review
- [ ] Resolve conversations on GitHub

Constraints

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.