pr-review
Reviews pull requests and diffs with parallel specialist analysis: security, correctness, architecture, React patterns, and accessibility. Use when the user says "review this PR", "review my changes", "review the diff", or mentions a PR number. Also use when the user invokes /pr-review directly.
What this skill does
# PR Review ## Step 1 — Acquire Context (run in parallel) ```bash # If PR number given: gh pr view <number> --json title,body,files,baseRefName,headRefName gh pr diff <number> git log main..<branch> --oneline # If no PR number (current branch): git diff main..HEAD git log main..HEAD --oneline ``` ## Step 2 — Profile the Diff Check what the diff touches to decide which specialists to spawn: - `HAS_REACT` — diff contains `.tsx`, `.jsx`, `use*.ts`, `components/`, or similar - `HAS_ARCH` — diff touches `services/`, `schemas/`, `api/`, `routes/`, `migrations/`, `prisma/` - `HAS_UI` — diff contains CSS, Tailwind classes, styled-components, or design tokens ## Step 3 — Spawn Specialist Agents (parallel via Task tool) **Always run:** - Security + correctness: auth flows, SQL injection, data loss paths, type safety gaps, unhandled errors **If HAS_ARCH:** - Architecture concerns: coupling, boundary violations, schema design, backward compatibility **If HAS_REACT:** - React patterns: hook dependencies, memoization correctness, prop drilling, stale closures, key stability, component size **If HAS_UI:** - Accessibility + design: WCAG 2.2 violations, missing ARIA labels, keyboard navigation, interactive states, contrast ## Step 4 — Reconcile Findings 1. Deduplicate findings that reference the same file:line 2. Score severity P0–P4: - **P0** — blocks merge (security hole, data loss, broken core flow) - **P1** — should fix before merge (correctness bug, bad UX) - **P2** — fix soon (performance, maintainability) - **P3** — nice to have (style, minor cleanup) - **P4** — nit / preference 3. If specialists contradict each other on the same finding, surface the conflict via AskUserQuestion rather than silently choosing one ## Output Format ``` ## PR Review — <title> Issues: N P0 · N P1 · N P2 · N P3 ### P0 — Block merge - `path/to/file.ts:42` — [Issue description] → [Specific fix] ### P1 — Fix before merge - `path/to/file.ts:88` — [Issue description] → [Specific fix] ### P2 — Fix soon ... ### Verdict: Approve | Request Changes | Block ``` Omit sections that have no findings. End with a one-sentence overall verdict.
Related in Web Dev
generating-lwc-components
IncludedLightning Web Components with PICKLES methodology and 165-point scoring. Use this skill when the user creates or edits LWC components, builds wire service patterns, or writes Jest tests for LWC. TRIGGER when: user creates/edits LWC components, touches lwc/**/*.js, .html, .css, .js-meta.xml files, or asks about wire service, SLDS, or Jest LWC tests. DO NOT TRIGGER when: Apex classes (use generating-apex), Aura components, or Visualforce.
tanstack-query
IncludedManage server state in React with TanStack Query v5. Set up queries with useQuery, mutations with useMutation, configure QueryClient caching strategies, implement optimistic updates, and handle infinite scroll with useInfiniteQuery. Use when: setting up data fetching in React projects, migrating from v4 to v5, or fixing object syntax required errors, query callbacks removed issues, cacheTime renamed to gcTime, isPending vs isLoading confusion, keepPreviousData removed problems.
document-processor-api
IncludedProcess documents with Nutrient DWS. Use when the user wants to generate PDFs from HTML or URLs, convert Office/images/PDFs, assemble or split packets, OCR scans, extract text/tables/key-value pairs, redact PII, watermark, sign, fill forms, optimize PDFs, or produce compliance outputs like PDF/A or PDF/UA. Triggers include convert to PDF, merge these PDFs, OCR this scan, extract tables, redact PII, sign this PDF, make this PDF/A, or linearize for web delivery.
nutrient-document-processing
IncludedProcess documents with Nutrient DWS. Use when the user wants to generate PDFs from HTML or URLs, convert Office/images/PDFs, assemble or split packets, OCR scans, extract text/tables/key-value pairs, redact PII, watermark, sign, fill forms, optimize PDFs, or produce compliance outputs like PDF/A or PDF/UA. Triggers include convert to PDF, merge these PDFs, OCR this scan, extract tables, redact PII, sign this PDF, make this PDF/A, or linearize for web delivery.
tanstack-query
IncludedManage server state in React with TanStack Query v5. Covers useMutationState, simplified optimistic updates, throwOnError, network mode (offline/PWA), and infiniteQueryOptions. Use when setting up data fetching, fixing v4→v5 migration errors (object syntax, gcTime, isPending, keepPreviousData), or debugging SSR/hydration issues with streaming server components.
accelint-nextjs-best-practices
IncludedNext.js performance optimization and best practices. Use when writing Next.js code (App Router or Pages Router); implementing Server Components, Server Actions, or API routes; optimizing RSC serialization, data fetching, or server-side rendering; reviewing Next.js code for performance issues; fixing authentication in Server Actions; or implementing Suspense boundaries, parallel data fetching, or request deduplication.