assets/skills/review/pr/SKILL.md
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".
npx skillsauth add phuthuycoding/moicle review-prInstall 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.
Review someone else's PR across 5 dimensions and post structured feedback to GitHub.
gh pr view <number> accessible)/review-branch/review-architect/fix-pr-commentLoad ~/.claude/architecture/ddd-architecture.md + the stack-specific doc. Detect stack via ~/.claude/architecture/_shared/stack-detection.md.
FETCH → ANALYZE → REVIEW (5 dims) → FEEDBACK → POST
Goal: load PR + diff + context in one pass.
PR={number}
gh pr view $PR --json number,title,body,author,state,headRefName,baseRefName,commits,files
gh pr diff $PR
gh pr checks $PR
gh pr view $PR --comments
Goal: understand scope before going line-by-line.
Severity definitions: ~/.claude/architecture/_shared/severity-levels.md (code severity table).
For DDD-aware code, check against architecture doc:
ports/ dir (not inline interfaces)For deep DDD audit: call /review-architect instead and link result.
EXPLAIN)data, info, manager, helper)Goal: turn findings into actionable comments at the right place.
| Decision | When | |----------|------| | APPROVE | 0 CRITICAL / HIGH; LOW only | | REQUEST CHANGES | Any CRITICAL or HIGH; or multiple MEDIUM in same area | | COMMENT | Only style / nit comments; or asking questions before final review |
Be specific. File + line + rationale + suggested fix:
file: internal/wallet/usecases/withdraw.go:42
severity: HIGH
issue: Business logic in handler — `if wallet.Balance < amount` should live in
the Withdraw usecase, not here. The handler should just call usecase and
return the error.
suggest:
// handler
result, err := s.WithdrawUsecase.Execute(ctx, req)
// usecase
func (u *WithdrawUsecase) Execute(ctx, req) (Result, error) {
if !wallet.HasSufficientBalance(amount) { return ErrInsufficient }
// ...
}
## Review Summary
**Decision:** REQUEST CHANGES
**Must fix (HIGH):**
- [ ] `withdraw.go:42` — business logic moved out of handler
- [ ] `withdraw.go:88` — missing input validation on `amount`
**Should fix (MEDIUM):**
- [ ] `withdraw_test.go` — only happy path tested, add insufficient-balance case
- [ ] `wallet_store.go:120` — N+1 query loading transactions
**Nits (LOW):**
- [ ] `helper.go:5` — rename `helper` to something specific
**What looked great:**
- Clean port interface, good test naming, clear PR description.
# Inline comments (one per finding)
gh pr review $PR --request-changes --body "$(cat summary.md)"
# or
gh pr review $PR --approve --body "LGTM, see one nit"
# or
gh pr review $PR --comment --body "Questions before final review"
# Optional: label
gh pr edit $PR --add-label "needs-changes"
| When | Use |
|------|-----|
| Reviewing own branch before push | /review-branch |
| Only checking DDD architecture | /review-architect |
| Fixing comments on your own PR | /fix-pr-comment |
| Bug surfaced by review | /fix-hotfix |
| Phase | Agent | Purpose |
|-------|-------|---------|
| ANALYZE | @clean-architect | Architecture context |
| REVIEW 3.1 | @clean-architect | Architecture compliance |
| REVIEW 3.2 | @security-audit | Security findings |
| REVIEW 3.3 | @perf-optimizer | N+1, indexes, slow paths |
| REVIEW 3.4 | @test-writer | Coverage + test quality |
| REVIEW 3.5 | @code-reviewer | Naming + quality |
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
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".
development
Research solutions on the internet for a given topic or the current conversation context. Use when user says "research", "tìm giải pháp", "search solution", "investigate", "find best practice", "so sánh giải pháp".