vercel-react-best-practices

Applies Vercel's React and Next.js performance optimization rules to code generation and refactoring.

Updated Aug 9, 2026
One-click install
npx skills add https://github.com/adinj00/player-performance --skill vercel-react-best-practices-adinj00
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/adinj00/player-performance/tree/main/.agents/skills/vercel-react-best-practices
Command: npx skills add https://github.com/adinj00/player-performance --skill vercel-react-best-practices-adinj00

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? React and Next.js codebases often suffer from performance issues like async waterfalls, bloated bundles, unnecessary re-renders, and inefficient data fetching. This Skill provides 70 prioritized, example-driven rules from Vercel Engineering so AI agents and developers can write, review, and refactor code that follows proven performance patterns. ## Core Features & Use Cases - 70 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 prioritized by impact from CRITICAL to LOW. - Incorrect vs. Correct Examples: Every rule includes concrete code comparisons with explanations and impact metrics, making it directly actionable for automated refactoring and code review. - Use Case: When reviewing a Next.js page that sequentially awaits three independent fetches, apply the async-parallel rule to rewrite it with Promise.all(), cutting three network round trips down to one. ## Quick Start Ask the AI to review your React or Next.js component for performance issues using the Vercel best practices rules and suggest refactors.

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 async waterfalls in Next.js API routes?

Start independent operations immediately without awaiting them, then await the promises later. Use Promise.all() for fully independent operations, or the better-all library for operations with partial dependencies, achieving 2-10x improvement.

How to reduce bundle size from barrel file imports in React?

Avoid importing from barrel files like 'lucide-react' or '@mui/material' entry points, which can load thousands of modules. In Next.js 13.5+, use optimizePackageImports; otherwise import directly from subpaths like '@mui/material/Button'.

Does this guide work with React Server Components?

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

When should I not use Suspense boundaries for data fetching?

Avoid Suspense when data is critical for layout decisions, when content is SEO-critical above the fold, for small fast queries where overhead is not worth it, or when you want to prevent layout shift from loading states.

What is the difference between useEffectEvent and storing handlers in refs?

Both keep stable subscriptions while accessing the latest callback. useEffectEvent is the modern React API providing a cleaner stable function reference, while the ref pattern manually syncs the handler into a ref inside an effect.