react-performance
/react-performance
Audytuje wydajność React i Next.js: wodospady zapytań, rozmiar bundle, memoizację, wirtualizację list i wskaźniki Core Web Vitals.
- Autor
- krishna-modi12 ↗
- Repozytorium
- frontend-design-pro ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 20.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 15
- Skrypty
- 7
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 20.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
- 7 skryptów w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.
Skrypty: examples/_r3f-jsx.d.ts, examples/_stubs.d.ts, examples/bad-performance.tsx, examples/good-perf.test.tsx, examples/good-perf.tsx, examples/good-performance-patterns.test.tsx, examples/good-performance-patterns.tsx
Co robi i kiedy
Audytuje wydajność React i Next.js: wodospady zapytań, rozmiar bundle, memoizację, wirtualizację list i wskaźniki Core Web Vitals.
Oryginalny opis (EN)
React/Next.js performance — waterfalls, bundle size, RSC, memoization, rendering, virtualization, Core Web Vitals. Use when the complaint is speed or the task is an audit — slow pages, request waterfalls, oversized bundles, unnecessary re-renders, long lists, Core Web Vitals, Server Component boundaries, lazy loading, prefetching.
Jak działa
- When to Use
- Stack
- Core Rules
- Patterns
- Examples
- Reference Index
- Constraints
Podgląd SKILL.md
---
name: react-performance
description: React/Next.js performance — waterfalls, bundle size, RSC, memoization, rendering, virtualization, Core Web Vitals. Use when the complaint is speed or the task is an audit — slow pages, request waterfalls, oversized bundles, unnecessary re-renders, long lists, Core Web Vitals, Server Component boundaries, lazy loading, prefetching.
metadata:
version: "15.0.0"
core-deps:
- core/component-api.md
- core/validate-checklist.md
---
# React Performance
## When to Use
Performance work and audits: slow pages, request waterfalls, oversized bundles, unnecessary re-renders, long lists, Core Web Vitals (LCP/INP/CLS), Server Component boundaries, lazy loading, prefetching.
## Stack
React 19 · Next.js App Router · TypeScript strict
## Core Rules
1. **Parallelize independent I/O.** `Promise.all()` for anything that doesn't depend on the previous result (`async-parallel`). Check cheap sync conditions *before* awaiting.
2. **Never import from a barrel.** `@/components` pulls the whole graph; import the module (`bundle-barrel-imports`). Keep import paths statically analyzable.
3. **Dynamic-import heavy components** — charts, editors, 3D, PDF — via `next/dynamic` (`bundle-dynamic-imports`). Defer analytics until after hydration.
4. **`React.cache()` for per-request dedup** in RSC; never module-level mutable request state (that's a correctness bug, not just perf). Pass the minimum across the server/client boundary.
5. **Derive during render, never in an effect.** `useEffect` + `setState` to compute a value costs an extra render and flashes stale UI (`rerender-derived-state-no-effect`).
6. **Memoize only with a named problem.** `useMemo`/`memo` on a primitive or a cheap expression is noise. Hoist non-primitive defaults; use functional `setState` for stable callbacks.
7. **Never define a component inside a component** — it remounts its whole subtree every render.
8. **Ternary, not `&&`, for conditional JSX** when the left side is numeric — `items.length && <List/>` renders a literal `0`.
9. **Long lists:** `content-visibility: auto` with `contain-intrinsic-size`, or virtualize past ~100 rendered rows.
10. **`startTransition`/`useDeferredValue`** to keep input responsive while an expensive tree re-renders.
## Patterns
- **Waterfall audit** — read the request timeline, find sequential awaits with no data dependency, collapse into `Promise.all`.
- **Bundle audit** — check for barrel imports, non-analyzable paths, heavy libs in the main chunk.
- **Suspense streaming** — stream the shell, suspend the slow region.
- **Prefetch on intent** — preload on hover/focus for perceived instantaneity.
- **Audit output** — `file:line — rule-id — one-line fix`, severity-ordered.
## Examples
`examples/good-perf.tsx` (virtualizer, lazy, memo, prefetch) · `examples/good-performance-patterns.tsx` (Promise.all, dynamic import, content-visibility, index maps) · `examples/bad-performance.tsx` (anti-example).
## Reference Index
Load only for the specific task:
| Task | Load |
|---|---|
| The 70-rule taxonomy with citable IDs across 8 categories | `references/react-performance.md` |
| Vercel UI + React perf rules in prose form | `references/vercel-ui-rules.md` |
| App Router, RSC, Server Actions, caching, Turbopack | `references/nextjs-patterns.md` |
| Component size, state init, import and type optimization | `references/token-optimization.md` |
| Promise.all/allSettled, workers, streaming SSR, IO batching | `references/parallelization.md` |
| Main-thread jank — frame budget, INP/TBT/LoAF, task-splitting, forced reflow, `content-visibility`, `will-change`, paint cost | `references/rendering-performance.md` |
| Making the wait feel short — skeleton vs spinner vs progress, spinner timing, optimistic UI, streaming-boundary placement, speculation rules | `references/perceived-performance.md` |
## Constraints
`PERF-01` no barrel imports · `PERF-02` no numeric `&&` in JSX · `PERF-04` no `transition: all` · `IMG-01` images declare dimensions · plus the shared baseline. Measure before optimizing — an unmeasured "optimization" is speculative complexity (P2).
Pliki w paczce (15)
- SKILL.md 4 KB
- examples/_r3f-jsx.d.ts 2 KB
- examples/_stubs.d.ts 4 KB
- examples/bad-performance.tsx 1 KB
- examples/good-perf.test.tsx 1 KB
- examples/good-perf.tsx 52 KB
- examples/good-performance-patterns.test.tsx 1 KB
- examples/good-performance-patterns.tsx 7 KB
- references/nextjs-patterns.md 20 KB
- references/parallelization.md 27 KB
- references/perceived-performance.md 8 KB
- references/react-performance.md 5 KB
- references/rendering-performance.md 12 KB
- references/token-optimization.md 19 KB
- references/vercel-ui-rules.md 14 KB
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · krishna-modi12/frontend-design-pro | 100 | MIT |
| Sanit-mann/The-Insectoids | 100 | MIT |
| HoangNguyen0403/agent-skills-standard | 100 | MIT |
| claude-dev-suite/claude-dev-suite | 100 | MIT |
| ssvinar/senior-agent-skills | 100 | MIT |
| SHRIJANAGAIN/Nemo-Cli | 95 | Apache-2.0 |
| ginaservice/ginaservice-skills | 95 | MIT |
| TheBushidoCollective/han | 95 | Apache-2.0 |
| adilkalam/orca | 95 | MIT |
Migawka bazy z 13.11.2026 · wersja paczki 4a11ddcc805b (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100performance
Stosuje wzorce przyspieszania stron i backendu: Core Web Vitals, React, leniwe ładowanie, obrazy i wnioskowanie LLM. - 100fec-performance-optimization
Diagnozuje i poprawia wydajność frontendu: Core Web Vitals, rozmiar bundla, koszt renderowania, wodospady sieciowe, wycieki pamięci, długie zadania, wyniki Lighthouse i budżety wydajności. - 100frontend-performance-engineering
Mierzy i poprawia wydajność frontendu: Core Web Vitals, ścieżkę renderowania, paczki JavaScript, obrazy, czcionki, cache i profilowanie. - 100rachnasutra-speed
Przegląda wydajność front-endu: ryzyka Core Web Vitals, wagę zasobów, wodospady żądań i koszty renderowania. - 100react-best-practices
Podpowiada zasady wydajności React i Next.js: wodospady, rozmiar bundla, renderowanie po stronie serwera i rerendery. - 90audit-performance
Audytuje wydajność względem Core Web Vitals i budżetów wydajności, gdy użytkownik prosi o sprawdzenie szybkości.