react-performance

Organizes 70+ React and Next.js performance optimization rules across eight priority categories.

1|Updated Aug 31, 2026
One-click install
npx skills add https://github.com/gagandeepgill/puzzle-game --skill react-performance-gagandeepgill
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: react-performance
Source: https://github.com/gagandeepgill/puzzle-game/tree/main/.claude/skills/react-performance
Command: npx skills add https://github.com/gagandeepgill/puzzle-game --skill react-performance-gagandeepgill

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? React and Next.js applications often suffer from slow page loads, excessive bundle sizes, rendering waterfalls, and unnecessary re-renders, and developers lack a prioritized, actionable checklist for diagnosing and fixing these issues during code writing and review. ## Core Features & Use Cases - Prioritized Rule Catalog: Organizes 70+ performance rules into 8 priority categories, from critical waterfall elimination and bundle size optimization down to advanced patterns like useEffectEvent and stable refs. - Code Review Guidance: Provides incorrect/correct code pairs for each rule, making it directly usable when reviewing PRs touching app/, pages/, components/, or data layers. - Lighthouse Mapping: Maps rule categories to Core Web Vitals metrics (LCP, INP, CLS, TBT) so optimization effort targets the metric that is actually regressing. - Use Case: While reviewing a Next.js pull request, you notice sequential awaits in a Server Component and a barrel import from a component library; this Skill gives you the exact corrected patterns (Promise.all, direct imports) to suggest. ## Quick Start Ask the AI to review your React or Next.js component for performance issues using the react-performance priority checklist.

Frequently Asked Questions about react-performance

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I eliminate async waterfalls in Next.js Server Components?▼

Start independent promises together with Promise.all, or split sibling data fetching into separate child components so React runs them in parallel. Defer awaits until the branch that actually uses the data, and check cheap synchronous conditions before any await.

How to reduce React bundle size from barrel imports?▼

Replace barrel imports like import { Button } from '@/components' with direct per-module imports such as '@/components/Button'. Next.js 13.5+ Optimize Package Imports automates this for listed packages, but non-listed libraries still need manual direct imports.

When should I use useMemo and useCallback in React?▼

Use them for expensive computations and to preserve object identity passed to memoized children, not for simple primitives. If the project ships React Compiler, manual memoization becomes unnecessary and these rules downgrade to review-only.

Does React.cache deduplicate database queries across requests?▼

No, React.cache deduplicates only within a single request render, so three components calling getUser('1') produce one query. For cross-request caching of stable data, use an LRU cache or Next.js unstable_cache.

Why does my React list render slowly with hundreds of rows?▼

Long lists benefit from content-visibility: auto with contain-intrinsic-size so the browser skips offscreen rendering. Also check for new object identities in props breaking memoization and consider useDeferredValue for expensive filtering.

What are the limitations of manual React performance optimization?▼

Manual rules require ongoing discipline in code review and can become noise once React Compiler, Turbopack, and Optimize Package Imports automate them. The Skill itself notes demoting rerender rules to review-only when the compiler is present.