com um clique
review-pr
Use when reviewing PR changes, comparing branches, or analyzing GitHub pull requests. Supports both gh CLI (PR number) and git diff (branch comparison) modes.
Menu
Use when reviewing PR changes, comparing branches, or analyzing GitHub pull requests. Supports both gh CLI (PR number) and git diff (branch comparison) modes.
Use PROACTIVELY when reviewing unit test code quality, discussing test design, or evaluating test coverage for Java/Spring Boot projects.
Use PROACTIVELY when reviewing Java/Spring Boot code quality, Clean Code compliance, or over-design concerns.
Use when user needs technical design advice, architecture planning, or implementation strategy for Spring Boot projects. Produces actionable Todo List.
Use when analyzing slow queries, optimizing SQL/JPA performance, reviewing EXPLAIN plans, or troubleshooting database bottlenecks.
Clean Architecture design guide for Spring Boot. Use when reviewing code architecture, designing solutions, discussing layer separation, dependency rules, or project structure. Applies Uncle Bob's Clean Architecture principles.
Java best practices guide based on Effective Java. Use when reviewing Java code, discussing design patterns, object creation, equals/hashCode, Optional, Stream API, exception handling, or concurrency. Applies Joshua Bloch's principles.
| name | review-pr |
| description | Use when reviewing PR changes, comparing branches, or analyzing GitHub pull requests. Supports both gh CLI (PR number) and git diff (branch comparison) modes. |
| argument-hint | [compare-branch-or-pr-number] [base-branch] |
| allowed-tools | Read, Grep, Glob, Bash |
| context | fork |
Review pull request changes with senior Java developer standards.
Supports two modes:
123 or #123) → uses gh pr view + gh pr diffgit diff/review-pr 123 # GitHub PR #123
/review-pr # Current branch vs master
/review-pr feature-auth # feature-auth vs master
/review-pr feature-auth develop # feature-auth vs develop
Auto-detection: Pure number → GitHub PR mode. Anything else → branch comparison mode.
GitHub PR mode: Use gh pr view <PR_NUMBER> --json number,title,body,state,author,baseRefName,headRefName,additions,deletions,changedFiles,commits and gh pr diff <PR_NUMBER>.
Branch comparison mode: Use git diff <base>..<compare> --name-status, git diff --stat, git log --oneline --no-merges, and git diff for full diff.
From git diff --name-status: Added (A), Modified (M), Deleted (D), Renamed (R).
Focus on .java files. Mention other types (.yml, .properties) briefly.
Apply the same standards as /code-review skill:
Focus on the changed lines, not the entire file.
OrderService.java changed → OrderServiceTest.java should be updatedCheck for leftover System.out.println, TODO, FIXME:
git diff <base>..<compare> | grep -E "System.out.println|TODO|FIXME|XXX"
IMPORTANT: All output must be in Traditional Chinese (繁體中文)
# PR Review 報告
## 變更概覽
- **PR 資訊** (gh mode): 編號、標題、作者、狀態、base/head branch
- **變更統計**: 檔案數量、+新增行、-刪除行、主要變更類型
## Commit 歷史分析
- Commit 數量和品質評估
## 程式碼品質評估
- 複雜度、可維護性、Over-design 程度
## 變更檔案詳細審查
### Priority 1 - 必須修正
| 問題 | 位置 | 影響 | 修正方式 |
### Priority 2 - 建議改進
| 問題 | 位置 | 影響 | 修正方式 |
## PR 特定檢查
- 測試覆蓋 / 文件更新 / Breaking Changes / Debug Code
## 總結評估
**整體評價**: 優秀 / 良好 / 需改進 / 不建議合併
**建議合併時機**: [條件]
gh pr diff 對 500+ 行的 PR 可能不完整,超過時應逐檔案 gh api 讀取--find-renames 確認