vercel-react-best-practices

Applies Vercel's React and Next.js performance optimization rules when writing, reviewing, or refactoring code.

1|Updated Aug 11, 2026
One-click install
npx skills add https://github.com/Chia1104/agent-air --skill vercel-react-best-practices-chia1104
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/Chia1104/agent-air/tree/main/skills/shared/vercel-react-best-practices
Command: npx skills add https://github.com/Chia1104/agent-air --skill vercel-react-best-practices-chia1104

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 data-fetching waterfalls, bloated bundles, unnecessary re-renders, and inefficient server-side patterns. This Skill provides a structured, impact-prioritized rule set from Vercel Engineering so AI agents and developers can consistently identify and fix these problems during code generation, review, and refactoring. ## 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 with an 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 improvement" or "200-800ms import cost". - Modular Rule Files with Compiled Guide: Individual rules live in rules/ for targeted lookup, while AGENTS.md provides the full compiled document for comprehensive reviews. - Use Case: When asked to optimize a slow Next.js page, the agent can apply rules like async-parallel (Promise.all for independent fetches), bundle-barrel-imports (direct imports instead of barrel files), and server-cache-react (React.cache for per-request deduplication) to eliminate the most impactful bottlenecks first. ## Quick Start Ask the agent to review your React or Next.js component for performance issues using the Vercel best practices rules and suggest prioritized fixes.

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 optimize React and Next.js performance with these rules?▼

Start with the CRITICAL categories: eliminate waterfalls using Promise.all for independent fetches and reduce bundle size by avoiding barrel file imports. Then apply HIGH-impact server-side rules like React.cache deduplication before moving to medium-impact re-render optimizations.

How to fix data fetching waterfalls in Next.js?▼

Start independent promises immediately and await them late, or use Promise.all for operations without dependencies. For partial dependency chains, the rules recommend the better-all library to maximize parallelism automatically.

Does this guide work with Next.js App Router and Server Components?▼

Yes, the rules specifically cover React Server Components, Server Actions, and the Next.js App Router. Topics include RSC prop serialization, server action authentication, Suspense boundaries, and Next.js output file tracing.

Why are barrel file imports slow in React projects?▼

Barrel files can re-export thousands of modules, costing 200-800ms per import on cold starts. The rules recommend Next.js optimizePackageImports or direct path imports, with a caveat that some libraries lack type declarations for deep import paths.

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, or when queries are small and fast. The trade-off is faster initial paint versus potential layout shift.

What are the limitations of these React performance rules?▼

The rules are guidelines, not absolute requirements; several include explicit exceptions, such as keeping await order when side effects must run in fixed sequence. Micro-optimizations in the JavaScript category only matter in genuinely hot code paths.