react-optimise
БесплатноБез исполняемых скриптовНе проверенApplication-level React performance optimization covering React Compiler mastery, bundle optimization, rendering performance, data fetching, Core Web Vitals…
от pproenca★ 231 звезда на GitHubОб этом скилле
React Optimise Best Practices
Application-level performance optimization guide for React applications. Contains 43 rules across 8 categories, prioritized by impact from critical (React Compiler, bundle optimization) to incremental (memory management).
When to Apply
- Optimizing React application performance or bundle size
- Adopting or troubleshooting React Compiler v1.0
- Splitting bundles and configuring code splitting
- Improving Core Web Vitals (INP, LCP, CLS)
- Profiling render performance and identifying bottlenecks
- Fixing memory leaks in long-lived single-page applications
- Optimizing data fetching patterns and eliminating waterfalls
Rule Categories
| Category | Impact | Rules | Key Topics |
|---|---|---|---|
| React Compiler Mastery | CRITICAL | 6 | Compiler-friendly code, bailout detection, incremental adoption |
| Bundle & Loading | CRITICAL | 6 | Route splitting, barrel elimination, dynamic imports, prefetching |
| Rendering Optimization | HIGH | 6 | Virtualization, children pattern, debouncing, CSS containment |
| Data Fetching Performance | HIGH | 5 | Waterfall elimination, route preloading, SWR, deduplication |
| Core Web Vitals | MEDIUM-HIGH | 5 | INP yielding, LCP priority, CLS prevention, image optimization |
| State & Subscription Performance | MEDIUM-HIGH | 5 | Context splitting, selectors, atomic state, derived state |
| Profiling & Measurement | MEDIUM | 5 | DevTools profiling, flame charts, CI budgets, production builds |
| Memory Management | LOW-MEDIUM | 5 | Effect cleanup, async cancellation, closure leaks, heap analysis |
Quick Reference
Critical patterns — get these right first:
- Write compiler-friendly components to unlock automatic 2-10x optimization
- Split code at route boundaries to reduce initial bundle by 40-70%
- Eliminate barrel files to enable tree shaking
- Detect and fix silent compiler bailouts
Common mistakes — avoid these anti-patterns:
- Reading refs during render (breaks compiler optimization)
- Importing entire libraries when only using one function
- Not profiling before optimizing (targeting the wrong bottleneck)
- Missing effect cleanup (subscription memory leaks)
Table of Contents
- React Compiler Mastery — CRITICAL
- 1.1 Detect and Fix Silent Compiler Bailouts — CRITICAL (prevents losing automatic memoization)
- 1.2 Isolate Side Effects from Render for Compiler Correctness — CRITICAL (prevents compiler from producing incorrect cached output)
- 1.3 Remove Manual Memoization After Compiler Adoption — CRITICAL (20-40% code reduction in component files)
- 1.4 Use Incremental Compiler Adoption with Directives — CRITICAL (enables safe rollout without full codebase migration)
- 1.5 Use Ref Access Patterns That Enable Compilation — CRITICAL (maintains compiler optimization for ref-using components)
- 1.6 Write Compiler-Friendly Component Patterns — CRITICAL (2-10x automatic render optimization)
- Bundle & Loading — CRITICAL
- 2.1 Configure Dependencies for Effective Tree Shaking — CRITICAL (50-90% dead code elimination in dependencies)
- 2.2 Eliminate Barrel Files to Enable Tree Shaking — CRITICAL (200-800ms import cost eliminated)
- 2.3 Enforce Bundle Size Budgets with Analysis Tools — CRITICAL (prevents gradual bundle size regression)
- 2.4 Prefetch Likely Next Routes on Interaction — CRITICAL (200-1000ms faster perceived navigation)
- 2.5 Split Code at Route Boundaries with React.lazy — CRITICAL (40-70% reduction in initial bundle size)
- 2.6 Use Dynamic Imports for Heavy Libraries — CRITICAL (100-500KB removed from critical path)
- Rendering Optimization — HIGH
- 3.1 Avoid Inline Object Creation in JSX Props — HIGH (prevents unnecessary child re-renders)
- 3.2 Debounce Expensive Derived Computations — HIGH (50-200ms saved per keystroke)
- 3.3 Use CSS Containment to Isolate Layout Recalculation — HIGH (60-90% layout recalc reduction)
- 3.4 Use Children Pattern to Prevent Parent Re-Renders — HIGH (eliminates re-renders of static subtrees)
- 3.5 Use Stable Keys for List Rendering Performance —
Установить react-optimise в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл react-optimise?
Application-level React performance optimization covering React Compiler mastery, bundle optimization, rendering performance, data fetching, Core Web Vitals, state subscriptions, profiling, and memory management. Use when optimizing React app performance, analyzing bundle size, improving Core Web Vitals, or profiling render bottlenecks. Complements the react skill (API-level patterns) with holistic performance strategies. Does NOT cover React 19 API usage (see react skill) or Next.js-specific features (see nextjs-16-app-router skill).
Как установить скилл react-optimise?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл react-optimise запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic