review-pull-request
정보
이 Claude Skill은 GH CLI를 사용하여 GitHub 풀 리퀘스트를 자동으로 종합 검토합니다. 변경 사항과 커밋 기록을 분석하고 CI/CD 체크를 검증한 후, '차단' 또는 '제안'과 같은 심각도 수준을 포함한 구조화된 피드백을 제출합니다. PR이 할당되었을 때 사용하여, 인간 리뷰어에게 요청하거나 병합된 코드를 감사하기 전에 철저한 검토를 보장할 수 있습니다.
빠른 설치
Claude Code
추천npx skills add pjt222/agent-almanac -a claude-code/plugin add https://github.com/pjt222/agent-almanacgit clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/review-pull-requestClaude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요
문서
Review Pull Request
Review GH PR end-to-end — understand change → submit structured feedback. Uses gh CLI for all GH interactions + produces severity-leveled review comments.
Use When
- PR ready for review + assigned to you
- Second review after author addresses feedback
- Self-review before req others
- Audit merged PR for post-merge quality
- Want structured review process not ad-hoc scanning
In
- Required: PR id (number, URL,
owner/repo#number) - Optional: Review focus (security, perf, correctness, style)
- Optional: Codebase familiarity (familiar, somewhat, unfamiliar)
- Optional: Time budget (quick scan, std, thorough)
Do
Step 1: Understand Ctx
Read PR description + understand what change accomplishes.
- Fetch PR metadata:
gh pr view <number> --json title,body,author,baseRefName,headRefName,labels,additions,deletions,changedFiles,reviewDecision - Read title + description:
- What problem does PR solve?
- What approach did author take?
- Specific areas author wants reviewed?
- Check PR size + assess time req:
PR Size Guide:
+--------+-----------+---------+-------------------------------------+
| Size | Files | Lines | Review Approach |
+--------+-----------+---------+-------------------------------------+
| Small | 1-5 | <100 | Read every line, quick review |
| Medium | 5-15 | 100-500 | Focus on logic changes, skim config |
| Large | 15-30 | 500- | Review by commit, focus on critical |
| | | 1000 | files, flag if should be split |
| XL | 30+ | 1000+ | Flag for splitting. Review only the |
| | | | most critical files. |
+--------+-----------+---------+-------------------------------------+
- Review commit history:
gh pr view <number> --json commits --jq '.commits[].messageHeadline'- Commits logical + well-structured?
- History tells story (each commit coherent step)?
- Check CI/CD status:
gh pr checks <number>- All checks passing?
- If failing, note which → affects review
→ Clear understanding of what PR does, why exists, how big, CI green. Ctx shapes review approach.
If err: PR description empty/unclear → note as first feedback. PR w/o ctx = review antipattern. gh cmds fail → verify auth (gh auth status) + repo access.
Step 2: Analyze Diff
Read actual code changes systematically.
- Fetch full diff:
gh pr diff <number> - Small/medium PRs: read entire diff sequential
- Large PRs: review by commit:
gh pr diff <number> --patch # full patch format - Each changed file eval:
- Correctness: Code does what PR says?
- Edge cases: Boundary conditions handled?
- Error handling: Caught + handled appropriately?
- Security: Injection, auth, data exposure risks?
- Perf: Obvious O(n^2), missing indexes, mem issues?
- Naming: New vars/fns/classes named clearly?
- Tests: New behaviors covered by tests?
- Take notes as read, classifying each by severity
→ Set of obs covering correctness, security, perf, quality for every meaningful change. Each obs has severity.
If err: diff too large to review effectively → flag: "This PR changes {N} files and {M} lines. I recommend splitting it into smaller PRs for more effective review." Still review highest-risk files.
Step 3: Classify Feedback
Organize obs into severity levels.
- Classify each obs:
Feedback Severity Levels:
+-----------+------+----------------------------------------------------+
| Level | Icon | Description |
+-----------+------+----------------------------------------------------+
| Blocking | [B] | Must fix before merge. Bugs, security issues, |
| | | data loss risks, broken functionality. |
| Suggest | [S] | Should fix, but won't block merge. Better |
| | | approaches, missing edge cases, style issues that |
| | | affect maintainability. |
| Nit | [N] | Optional improvement. Style preferences, minor |
| | | naming suggestions, formatting. |
| Praise | [P] | Good work worth calling out. Clever solutions, |
| | | thorough testing, clean abstractions. |
+-----------+------+----------------------------------------------------+
- Each Blocking explain:
- What's wrong (specific issue)
- Why matters (impact)
- How to fix (concrete suggestion)
- Each Suggest explain alternative + why better
- Keep Nits brief — one sentence enough
- Include ≥1 Praise if anything positive stands out
→ Sorted feedback list w/ clear severity. Blocking has fix suggestions. Ratio: few Blocking, some Suggest, minimal Nit, ≥1 Praise.
If err: everything seems blocking → PR may need rework not patch. Consider req changes at PR level vs line-by-line. Nothing wrong → say so — "LGTM" valid when code good.
Step 4: Write Comments
Compose review w/ structured actionable feedback.
- Write review summary (top-level):
- One sentence: what PR does (confirm understanding)
- Overall: approve, req changes, comment
- Key items: list Blocking (if any) + top Suggest
- Praise: call out good work
- Write inline comments for specific code locations:
# Post inline comments via gh API gh api repos/{owner}/{repo}/pulls/{number}/comments \ -f body="[B] This SQL query is vulnerable to injection. Use parameterized queries instead.\n\n\`\`\`suggestion\ndb.query('SELECT * FROM users WHERE id = $1', [userId])\n\`\`\`" \ -f commit_id="<sha>" \ -f path="src/users.js" \ -F line=42 \ -f side="RIGHT" - Format feedback consistent:
- Start each comment w/ severity tag:
[B],[S],[N],[P] - Use GH suggestion blocks for concrete fixes
- Link to docs for style/pattern suggestions
- Start each comment w/ severity tag:
- Submit review:
# Approve gh pr review <number> --approve --body "Review summary here" # Request changes (when blocking issues exist) gh pr review <number> --request-changes --body "Review summary here" # Comment only (when unsure or providing FYI feedback) gh pr review <number> --comment --body "Review summary here"
→ Submitted review w/ clear actionable feedback. Author knows exactly what to fix (Blocking), consider (Suggest), what went well (Praise).
If err: gh pr review fails → check perms. Need write access or be requested reviewer. Inline comments fail → fall back to all feedback in review body w/ file:line refs.
Step 5: Follow Up
Track resolution.
- After author responds or pushes updates:
gh pr view <number> --json reviewDecision,reviews - Re-review only changes addressing feedback:
gh pr diff <number> # check new commits - Verify Blocking resolved before approving
- Resolve comment threads as issues addressed
- Approve when all Blocking fixed:
gh pr review <number> --approve --body "All blocking issues resolved. LGTM."
→ Blocking verified fixed. Conversation resolved. PR approved or further changes req'd w/ specific remaining items.
If err: author disagrees → discuss in PR thread. Focus on impact (why matters) not authority. Disagreement persists on non-blocking → yield gracefully. Author owns code.
Check
- PR ctx understood (purpose, size, CI status)
- All changed files reviewed (or highest-risk for XL PRs)
- Feedback classified by severity (Blocking/Suggest/Nit/Praise)
- Blocking has specific fix suggestions
- ≥1 Praise for positive aspects
- Review decision matches feedback (approve only if no Blocking)
- Inline comments ref specific lines w/ severity tags
- CI/CD checks verified (green before approval)
- Follow-up done after author revisions
Traps
- Rubber-stamping: Approving w/o reading diff. Every approval = assertion of quality.
- Nit avalanche: Drowning author in style prefs. Save nits for mentoring; skip in time-sensitive reviews.
- Miss forest: Reviewing line-by-line w/o understanding overall design. Read description + commit history first.
- Block on style: Formatting + naming almost never blocking. Reserve Blocking for bugs, security, data integrity.
- No praise: Only pointing problems = demoralizing. Good code deserves recognition.
- Scope creep: Commenting on code not changed in PR. Pre-existing issues → file separate issue.
→
review-software-architecture— system-level architecture review (complementary)security-audit-codebase— deep security analysis for security-sensitive PRscreate-pull-request— other side: creating PRs easy to reviewcommit-changes— clean commit history makes PR review easier
GitHub 저장소
연관 스킬
llamaguard
기타LlamaGuard는 폭력 및 혐오 발언 등 6가지 안전 범주에서 LLM 입력과 출력을 조정하기 위한 Meta의 70-80억 파라미터 모델입니다. 94-95% 정확도를 제공하며 vLLM, Hugging Face 또는 Amazon SageMaker를 사용해 배포할 수 있습니다. 이 기술을 사용하여 AI 애플리케이션에 콘텐츠 필터링 및 안전 가드레일을 손쉽게 통합하세요.
cost-optimization
기타이 Claude Skill은 리소스 적정화, 태깅 전략, 지출 분석을 통해 개발자들이 클라우드 비용을 최적화할 수 있도록 지원합니다. AWS, Azure, GCP에서 클라우드 비용을 절감하고 비용 거버넌스를 구현하기 위한 프레임워크를 제공합니다. 인프라 비용을 분석하거나, 리소스를 적정화하거나, 예산 제약을 충족해야 할 때 사용하세요.
quantizing-models-bitsandbytes
기타이 스킬은 bitsandbytes를 사용하여 LLM을 8비트 또는 4비트 정밀도로 양자화하며, 최소한의 정확도 손실로 50-75%의 메모리 감소를 달성합니다. 제한된 GPU 메모리에서 더 큰 모델을 실행하거나 추론을 가속화하는 데 이상적이며, INT8, NF4, FP4와 같은 형식을 지원합니다. 이 스킬은 HuggingFace Transformers와 통합되어 QLoRA 학습 및 8비트 옵티마이저를 가능하게 합니다.
dispatching-parallel-agents
기타이 Claude Skill은 3개 이상의 독립적인 문제를 동시에 조사하고 해결하기 위해 다중 에이전트를 배치합니다. 공유 상태나 의존성 없이 해결 가능한 무관련 장애 시나리오에 맞게 설계되었습니다. 핵심 기능은 병렬 문제 해결로, 각 독립 문제 영역마다 하나의 에이전트를 할당하여 효율성을 극대화합니다.
