mcpField
R
react-optimise

react-optimise

github.com/pproencaDevelopment218399 installsUpdated 11w ago
Repository

About react-optimise

A 43-rule guide for developers and coding agents optimizing React application performance, organized into eight categories by impact. It covers compiler adoption, loading, rendering, data fetching, measurement, and memory management.

Key features

  1. 0143 rules across eight categories
  2. 02React Compiler adoption and bailout guidance
  3. 03Bundle splitting and loading practices
  4. 04Rendering and data-fetching optimization
  5. 05Profiling, Core Web Vitals, and memory guidance

Use cases

  1. 01Reviewing React code for performance issues
  2. 02Adopting React Compiler incrementally
  3. 03Reducing route bundles and fetch waterfalls
  4. 04Finding render bottlenecks or memory leaks

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/pproenca/dot-skills --skill react-optimise

After installing, type/react-optimisein Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

AGENTS.md
metadata.json
README.md
assets/templates/
_template.md
references/
_sections.md
bundle-analyze-budgets.md
bundle-barrel-elimination.md
bundle-dynamic-imports.md
bundle-prefetch-routes.md
bundle-route-splitting.md
bundle-tree-shake-deps.md
compiler-friendly-code.md
compiler-incremental-adoption.md
compiler-ref-access-patterns.md
compiler-remove-manual-memo.md
compiler-side-effect-rules.md
compiler-silent-bailouts.md
cwv-cls-prevention.md
cwv-image-optimization.md
cwv-inp-optimization.md
cwv-instrumentation.md
cwv-lcp-optimization.md
fetch-abort-stale.md
fetch-eliminate-waterfalls.md
fetch-request-deduplication.md
fetch-route-preloading.md
fetch-stale-while-revalidate.md
mem-async-cancellation.md
mem-closure-leaks.md
mem-effect-cleanup.md

Details

From the project README

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

CategoryImpactRulesKey Topics
React Compiler MasteryCRITICAL6Compiler-friendly code, bailout detection, incremental adoption
Bundle & LoadingCRITICAL6Route splitting, barrel elimination, dynamic imports, prefetching
Rendering OptimizationHIGH6Virtualization, children pattern, debouncing, CSS containment
Data Fetching PerformanceHIGH5Waterfall elimination, route preloading, SWR, deduplication
Core Web VitalsMEDIUM-HIGH5INP yielding, LCP priority, CLS prevention, image optimization
State & Subscription PerformanceMEDIUM-HIGH5Context splitting, selectors, atomic state, derived state
Profiling & MeasurementMEDIUM5DevTools profiling, flame charts, CI budgets, production builds
Memory ManagementLOW-MEDIUM5Effect 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

  1. React Compiler Mastery — CRITICAL
  2. Bundle & Loading — CRITICAL
  3. Rendering Optimization — HIGH
  4. Data Fetching Performance — HIGH
  5. Core Web Vitals — MEDIUM-HIGH
  6. State & Subscription Performance — MEDIUM-HIGH
  7. Profiling & Measurement — MEDIUM
  8. Memory Management — LOW-MEDIUM

References

  1. https://react.dev
  2. https://react.dev/blog/2025/10/07/react-compiler-1
  3. https://web.dev/articles/vitals
  4. https://tanstack.com/virtual
  5. https://developer.chrome.com/docs/devtools/performance

Related Skills

  • For React 19 API best practices, see react skill
  • For Next.js App Router optimization, see nextjs-16-app-router skill
  • For client-side form handling, see react-hook-form skill

Comments

Markdown supported