بنقرة واحدة
review-pr
Pre-PR review catching GitHub Copilot patterns
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Pre-PR review catching GitHub Copilot patterns
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Comprehensive code review with security, patterns, and quality focus
Parallel execution using multiple Claude instances in Kitty terminal
Agile/Waterfall project planning, tracking, and delivery management
McKinsey-level strategic analysis with MECE frameworks and quantitative prioritization
Update project documentation (ADRs, CHANGELOG, running notes) in compact Claude-friendly format
Audit and harden any repository with standardized quality gates, hooks, and scripts
| name | review-pr |
| description | Pre-PR review catching GitHub Copilot patterns |
| allowed-tools | ["Read","Glob","Grep","Bash"] |
| context | fork |
| user-invocable | true |
| version | 1.0.0 |
Focused pre-PR review targeting patterns that GitHub Copilot code review catches. NOT a generic code review — use
/code-reviewfor that.
Catch the 9 recurring pattern categories (contract mismatch, null safety, error handling, scalability, security, logic errors, architecture drift, test quality, naming conflicts) BEFORE creating a PR, reducing review cycles.
gh pr create — run /review-pr first# Detect base branch
BASE=$(git merge-base --fork-point main HEAD 2>/dev/null || echo "main")
# Get changed files
CHANGED_FILES=$(git diff --name-only --diff-filter=ACMR "${BASE}...HEAD")
# Count and report scope
FILE_COUNT=$(echo "$CHANGED_FILES" | grep -c . || echo 0)
If no changed files detected, report "No changes found" and exit.
Run the mechanical pattern checker first:
${CLAUDE_HOME:-.claude}/scripts/code-pattern-check.sh --diff-base "$BASE" --json
Parse the JSON output. Report P1/P2 counts immediately.
Read the FULL content of each changed file (not just diff). Cross-file analysis requires full context.
Prioritize:
**/api/**/route.ts, **/api/**/route.py)**/services/*.ts, **/hooks/use*.ts)**/types/*.ts, **/interfaces/*.ts)**/*.test.ts, **/*.spec.ts, **/test_*.py)Analyze for patterns that code-pattern-check.sh CANNOT catch:
user.name vs user.displayName)$transaction)ls docs/adr/*.md and check Status: AcceptedtoHaveBeenCalledTimes on implementation details)Output a structured report with this format:
## Pre-PR Review: {branch_name}
**Scope**: {file_count} files changed | Base: {base_branch}
### Automated Findings (code-pattern-check.sh)
| Severity | Check | Count |
| -------- | ---------------------- | ----- |
| P1 | unguarded_json_parse | 2 |
| P2 | missing_error_boundary | 1 |
### AI Analysis Findings
| # | Severity | Category | File | Line | Issue |
| --- | -------- | ------------------ | ---------------------- | ---- | ------------------------------------------------- |
| 1 | P1 | contract_mismatch | src/api/users/route.ts | 45 | Returns `{name}` but hook expects `{displayName}` |
| 2 | P2 | architecture_drift | src/store/auth.ts | 12 | Uses localStorage, ADR-007 requires Zustand |
### Recommendations
1. **[P1]** Fix contract mismatch in user API...
2. **[P2]** Migrate auth storage to Zustand per ADR-007...
### Summary
- **P1 (must fix)**: {count}
- **P2 (should fix)**: {count}
- **P3 (consider)**: {count}
- **Verdict**: {READY | NOT READY} for PR
/code-review)/performance)/security-audit)${CLAUDE_HOME:-.claude}/reference/copilot-patterns.md${CLAUDE_HOME:-.claude}/scripts/code-pattern-check.sh${CLAUDE_HOME:-.claude}/scripts/copilot-review-digest.sh/code-review skillThor Gate 4b runs code-pattern-check.sh automatically during validation.
This skill adds AI analysis on top for pre-PR use.