$npx -y skills add vercel/next.js --skill pr-status-triageTriage CI failures and PR review comments using scripts/pr-status.js. Use when investigating failing CI jobs, flaky tests, or PR review feedback. Covers blocker-first prioritization (build > lint > types > tests), CI env var matching for local reproduction, and the Known Flaky Te
| 1 | # PR Status Triage |
| 2 | |
| 3 | Use this skill when the user asks about PR status, CI failures, or review comments in the Next.js monorepo. |
| 4 | |
| 5 | ## Workflow |
| 6 | |
| 7 | 1. Run `node scripts/pr-status.js --wait` in the background (timeout 1 min), then read `scripts/pr-status/results/index.md`. |
| 8 | 2. Analyze each `job-{id}.md` and `thread-{N}.md` file in `scripts/pr-status/results/` for failures and review feedback. |
| 9 | 3. Prioritize blocking jobs first: build, lint, types, then test jobs. |
| 10 | 4. Treat failures as real until disproven; check the "Known Flaky Tests" section before calling anything flaky. |
| 11 | 5. Reproduce locally with the same mode and env vars as CI. |
| 12 | 6. After addressing review comments, reply to the thread describing what was done, then resolve it. Use `reply-and-resolve-thread` to do both in one step, or use `reply-thread` + `resolve-thread` separately. See `scripts/pr-status/results/thread-N.md` files for ready-to-use commands. |
| 13 | 7. When the only remaining failures are known flaky tests and no code changes are needed, retrigger the failing CI jobs with `gh run rerun <run-id> --failed`. Then wait 5 minutes and go back to step 1. Repeat this loop up to 5 times. |
| 14 | |
| 15 | ## Quick Commands |
| 16 | |
| 17 | ```bash |
| 18 | node scripts/pr-status.js # current branch PR |
| 19 | node scripts/pr-status.js <number> # specific PR |
| 20 | node scripts/pr-status.js [PR] --wait # background mode, waits for CI to finish |
| 21 | node scripts/pr-status.js --skip-flaky-check # skip flaky test detection |
| 22 | ``` |
| 23 | |
| 24 | Thread interaction: |
| 25 | |
| 26 | ```bash |
| 27 | node scripts/pr-status.js reply-thread <threadNodeId> "<body>" # reply to a review thread |
| 28 | node scripts/pr-status.js resolve-thread <threadNodeId> # resolve a review thread |
| 29 | node scripts/pr-status.js reply-and-resolve-thread <threadNodeId> "<body>" # reply and resolve in one step |
| 30 | ``` |
| 31 | |
| 32 | ## References |
| 33 | |
| 34 | - [workflow.md](./workflow.md) — prioritization, common failure patterns, resolving review threads |
| 35 | - [local-repro.md](./local-repro.md) — mode/env matching and isolation guidance |