vercel-react-best-practices

Applies Vercel performance optimization rules when writing and refactoring React and Next.js code.

3|1|Updated Apr 29, 2026
One-click install
npx skills add https://github.com/firstsun-dev/skills --skill vercel-react-best-practices-firstsun-dev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/firstsun-dev/skills/tree/main/plugins/frontend-product-design/skills/vercel-react-best-practices
Command: npx skills add https://github.com/firstsun-dev/skills --skill vercel-react-best-practices-firstsun-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? React and Next.js codebases often suffer from slow load times, data-fetching waterfalls, bloated bundles, and unnecessary re-renders. This Skill gives AI agents a structured, prioritized rule set from Vercel Engineering so generated and refactored code follows proven performance patterns instead of common anti-patterns. ## Core Features & Use Cases - 70 Prioritized Rules Across 8 Categories: Covers eliminating waterfalls, bundle size optimization, server-side performance, client-side data fetching, re-render optimization, rendering performance, JavaScript performance, and advanced patterns, each tagged by impact level from CRITICAL to LOW. - Incorrect vs. Correct Code Examples: Every rule includes concrete TypeScript/TSX examples showing the anti-pattern and the optimized implementation, plus impact metrics like 2-10x improvements from parallelizing fetches. - Use Case: When asked to optimize a slow Next.js page, the agent applies rules such as replacing sequential awaits with Promise.all(), using Suspense boundaries for streaming, avoiding barrel file imports, and deduplicating requests with React.cache() or SWR. ## Quick Start Review my Next.js page component and apply the Vercel React best practices to eliminate data-fetching waterfalls and reduce bundle size.

Frequently Asked Questions about vercel-react-best-practices

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

FAQPage Schema
How do I eliminate data fetching waterfalls in Next.js?▼

Start independent async operations immediately and await them together with Promise.all() instead of awaiting sequentially. For partial dependencies, start promises early and chain dependent fetches, or use the better-all library to maximize parallelism automatically.

How to reduce bundle size in a React or Next.js app?▼

Avoid barrel file imports from libraries like lucide-react or @mui/material, use next/dynamic for heavy components, and defer non-critical third-party scripts until after hydration. Next.js 13.5+ can optimize package imports automatically via optimizePackageImports.

Does this skill work with React Server Components?▼

Yes, it includes server-side rules specific to RSC and Next.js, such as minimizing serialization at RSC boundaries, per-request deduplication with React.cache(), authenticating Server Actions like API routes, and avoiding shared module state for request data.

When should I use Suspense boundaries in React?▼

Use Suspense when only part of a page needs async data, so the surrounding layout renders immediately while data streams in. Avoid it for SEO-critical above-the-fold content, layout-determining data, or very fast queries where the overhead is not worthwhile.

Why does my React component re-render too often?▼

Common causes include defining components inside components, missing memoization for expensive work, broad effect dependencies, and subscribing to raw state instead of derived values. The re-render optimization rules cover functional setState, useDeferredValue, transitions, and lazy state initialization.