vercel-react-best-practices

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

Updated Mar 6, 2026
One-click install
npx skills add https://github.com/ebecerra-developer/ebecerra-web --skill vercel-react-best-practices-ebecerra-developer
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/ebecerra-developer/ebecerra-web/tree/main/.agents/skills/vercel-react-best-practices
Command: npx skills add https://github.com/ebecerra-developer/ebecerra-web --skill vercel-react-best-practices-ebecerra-developer

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, actionable rules from Vercel Engineering so AI agents and developers consistently generate 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 usable for automated refactoring and code review. - Use Case: When writing a Next.js API route that fetches user data, config, and posts sequentially, apply the waterfall elimination rules to restructure it with Promise.all() and early promise starts, cutting response time from three round trips to one. ## Quick Start Ask the AI to review your React component or Next.js page for performance issues using the Vercel React best practices rules.

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 use Promise.all() to await results together. For partial dependencies, use the better-all library or chain promises so each task starts at the earliest possible moment.

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

Import directly from source files instead of barrel entry points, or use Next.js 13.5+ optimizePackageImports to transform imports automatically. Barrel files in libraries like lucide-react or @mui/material can load thousands of unused modules, adding 200-800ms to cold starts.

When should I use Suspense boundaries in React Server Components?▼

Use Suspense when only part of the page needs async data, so the 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.

Does this skill work with plain React or only Next.js?▼

Most rules apply to any React codebase, including re-render optimization, JavaScript performance, and client-side fetching patterns. Some rules are Next.js-specific, such as Server Actions authentication, next/dynamic imports, and RSC serialization guidance.

Why should Server Actions be authenticated like API routes?▼

Server Actions are exposed as public endpoints and can be invoked directly, bypassing middleware or layout guards. Always verify authentication and authorization inside each action, and validate inputs with a schema library like zod before performing mutations.