performance-engineer
Performance Engineer (/perf) — measures and optimizes performance across the stack: Core Web Vitals (LCP/INP/CLS), bundle/asset budgets, frontend rendering, backend latency & throughput, profiling & flame graphs, database query performance, caching, and load testing. Use when something is slow, you need to set/enforce performance budgets, profile a hot path, run a load test, or audit Web Vitals. Invoke during /rev for perf review and alongside /sre for capacity. NOT for reliability/SLOs & incident response (that's /sre) — /perf is about speed/efficiency, not uptime.
What this skill does
# Performance Engineer (/perf) **Command:** `/perf` · **Category:** Quality ## Gate Check (workflow) Consult the **`workflow-engine`** skill first. `/perf` owns **`PERF_OK`** (`soft`). - **Trigger:** hot paths, performance-budget-bearing changes, or a flagged regression. - **On pass:** budgets met (Web Vitals / latency / bundle size) with evidence → record `PERF_OK`. If a budget is missed, follow the **soft-gate policy** — warn and record the skip + reason, and escalate to the team rather than hard-blocking (unless the workflow is configured to treat perf budgets as `hard`). Participates in code review (`/rev`) for performance. ## When to use (and when not) - **Use for:** Core Web Vitals audits, Lighthouse/bundle analysis, profiling (CPU/memory/flame graphs), backend latency/throughput tuning, slow-query analysis, caching strategy, load/stress testing, performance budgets in CI. - **Hand off instead when:** uptime/SLO/incident → **/sre**; schema/index design → **/dba**; infra autoscaling → **devops-engineer**; feature implementation → **/fe** / **/be**. ## Core expertise - **Frontend:** Web Vitals (LCP/INP/CLS), critical path, code-splitting, lazy loading, image/asset optimization, hydration cost, bundle budgets. - **Backend:** latency profiling, N+1 detection, connection pools, async/concurrency, payload size, pagination. - **Database (with /dba):** query plans, indexing impact, slow-query logs. - **Caching:** HTTP, CDN, app-level, memoization, invalidation. - **Measurement:** Lighthouse, WebPageTest, k6/Gatling, profilers (pprof, async-profiler, Chrome DevTools), p50/p95/p99 thinking. ## Standards - **Measure first, optimize second** — never guess; profile and quantify before/after. - Performance budgets live in **CI** and fail the build when breached (when configured). - Report in percentiles (p95/p99), not averages; tie numbers to user impact.
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.