PR Review & Fix
Systematically analyze open pull requests for CI failures, code review feedback, and code quality issues — then fix them efficiently.
When to use this skill
Use this skill when you need to:
- Check the status of all open PRs (CI, reviews, conflicts)
- Triage and fix CI build/test failures on PR branches
- Address code review feedback (reviewer comments, requested changes)
- Run a scheduled health check across all open PRs
- Fix multiple PRs in a single session without losing context
Do NOT use for:
- Creating new PRs or new features
- Merging PRs (that's a manual decision)
- General code refactoring unrelated to PR feedback
- Reviewing code as a reviewer (this skill is for responding to reviews)
Workflow
Phase 1 — Discovery
- Read
references/discovery.md for the full discovery procedure.
- Fetch the list of open PRs from GitHub:
gh pr list --state open --json number,title,headRefName,statusCheckRollup,reviewDecision,mergeable --limit 30
- For each PR, classify its health status:
- 🔴 CI Failed — at least one required check failed
- 🟡 Changes Requested — reviewer left requested changes
- 🟢 Healthy — CI passing + approved or no review yet
- ⚪ Conflict — merge conflicts detected
Phase 2 — Triage
- Read
references/triage.md for prioritization rules.
- Prioritize by severity: CI failures > review changes > conflicts.
- For each failing PR, identify root cause category:
- Build error — TypeScript/webpack compilation failure
- Test failure — vitest/jest test assertion or timeout
- Lint/type error — ESLint, type-check, or format issues
- Review feedback — code style, logic, security, or design concerns
- Present a summary table to the user before proceeding to fixes.
Phase 3 — Fix
- Read
references/fix-workflow.md for the fix procedure.
- For each PR to fix (in priority order):
a. Stash current work:
git stash
b. Check out the PR branch: git checkout -B <branch> github/<branch>
c. Reproduce the issue locally (build, test, or lint)
d. Apply the fix
e. Verify locally: build → test → lint
f. Commit with conventional-changelog format: fix(<scope>): 🔧 <description>
g. Push: git push github <branch>
h. Return to original branch: git checkout <original> && git stash pop
- After all fixes, present a completion summary.
Phase 4 — Verify
- After pushing fixes, wait 1-2 minutes for CI to trigger.
- Check CI status for each fixed PR:
gh pr checks <number>
- If CI still fails, loop back to Phase 3 for that PR.
Routing
| Task |
Read |
| Discover and list open PR status |
references/discovery.md |
| Prioritize which PRs to fix first |
references/triage.md |
| Execute fixes on PR branches |
references/fix-workflow.md |
| Understand project CI pipeline |
references/ci-pipeline.md |
| Common fix patterns and recipes |
references/fix-recipes.md |
Git safety rules
- Never force-push to a PR branch unless explicitly asked.
- Never amend commits that are already pushed.
- Always stash before switching branches.
- Always verify build + test locally before pushing.
- One commit per fix session — keep the diff reviewable.
Commit conventions
Follow the project's conventional-changelog format:
fix(<scope>): 🔧 <english description>
Where <scope> is the affected module (e.g., cloudrun, security, code-quality, test).
Minimum self-check
- Did you fetch the latest remote state before analyzing?
- Did you reproduce the failure locally before attempting a fix?
- Did you verify build + test pass after applying the fix?
- Did you switch back to the original branch after each fix?
- Did you present a clear summary of what was fixed and what remains?
1---2name: pr-review-fix3description: Periodically analyze open pull requests for CI failures, code review feedback, and quality issues, then fix them in batch. Use this skill when the user asks to check PR status, triage CI failures, fix review comments, analyze open PRs, or run a scheduled PR health check across the repository.4---5
6# PR Review & Fix
7
8Systematically analyze open pull requests for CI failures, code review feedback, and code quality issues — then fix them efficiently.
9
10## When to use this skill
11
12Use this skill when you need to:
13
14- Check the status of all open PRs (CI, reviews, conflicts)
15- Triage and fix CI build/test failures on PR branches
16- Address code review feedback (reviewer comments, requested changes)
17- Run a scheduled health check across all open PRs
18- Fix multiple PRs in a single session without losing context
19
20**Do NOT use for:**
21
22- Creating new PRs or new features
23- Merging PRs (that's a manual decision)
24- General code refactoring unrelated to PR feedback
25- Reviewing code as a reviewer (this skill is for *responding* to reviews)
26
27## Workflow
28
29### Phase 1 — Discovery
30
311. Read `references/discovery.md` for the full discovery procedure.
322. Fetch the list of open PRs from GitHub:
33 ```bash
34 gh pr list --state open --json number,title,headRefName,statusCheckRollup,reviewDecision,mergeable --limit 30
35 ```
363. For each PR, classify its health status:
37 - **🔴 CI Failed** — at least one required check failed
38 - **🟡 Changes Requested** — reviewer left requested changes
39 - **🟢 Healthy** — CI passing + approved or no review yet
40 - **⚪ Conflict** — merge conflicts detected
41
42### Phase 2 — Triage
43
441. Read `references/triage.md` for prioritization rules.
452. Prioritize by severity: CI failures > review changes > conflicts.
463. For each failing PR, identify root cause category:
47 - **Build error** — TypeScript/webpack compilation failure
48 - **Test failure** — vitest/jest test assertion or timeout
49 - **Lint/type error** — ESLint, type-check, or format issues
50 - **Review feedback** — code style, logic, security, or design concerns
514. Present a summary table to the user before proceeding to fixes.
52
53### Phase 3 — Fix
54
551. Read `references/fix-workflow.md` for the fix procedure.
562. For each PR to fix (in priority order):
57 a. Stash current work: `git stash`
58 b. Check out the PR branch: `git checkout -B <branch> github/<branch>`
59 c. Reproduce the issue locally (build, test, or lint)
60 d. Apply the fix
61 e. Verify locally: build → test → lint
62 f. Commit with conventional-changelog format: `fix(<scope>): 🔧 <description>`
63 g. Push: `git push github <branch>`
64 h. Return to original branch: `git checkout <original> && git stash pop`
653. After all fixes, present a completion summary.
66
67### Phase 4 — Verify
68
691. After pushing fixes, wait 1-2 minutes for CI to trigger.
702. Check CI status for each fixed PR:
71 ```bash
72 gh pr checks <number>
73 ```
743. If CI still fails, loop back to Phase 3 for that PR.
75
76## Routing
77
78| Task | Read |
79| --- | --- |
80| Discover and list open PR status | `references/discovery.md` |
81| Prioritize which PRs to fix first | `references/triage.md` |
82| Execute fixes on PR branches | `references/fix-workflow.md` |
83| Understand project CI pipeline | `references/ci-pipeline.md` |
84| Common fix patterns and recipes | `references/fix-recipes.md` |
85
86## Git safety rules
87
88- **Never force-push** to a PR branch unless explicitly asked.
89- **Never amend** commits that are already pushed.
90- **Always stash** before switching branches.
91- **Always verify** build + test locally before pushing.
92- **One commit per fix session** — keep the diff reviewable.
93
94## Commit conventions
95
96Follow the project's conventional-changelog format:
97
98```
99fix(<scope>): 🔧 <english description>
100```
101
102Where `<scope>` is the affected module (e.g., `cloudrun`, `security`, `code-quality`, `test`).
103
104## Minimum self-check
105
106- Did you fetch the latest remote state before analyzing?
107- Did you reproduce the failure locally before attempting a fix?
108- Did you verify build + test pass after applying the fix?
109- Did you switch back to the original branch after each fix?
110- Did you present a clear summary of what was fixed and what remains?