vercel-react-best-practices

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

Updated Aug 7, 2026
One-click install
npx skills add https://github.com/Ramadan-Elgamal/Autobees --skill vercel-react-best-practices-ramadan-elgamal
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/Ramadan-Elgamal/Autobees/tree/main/.agents/skills/vercel-react-best-practices
Command: npx skills add https://github.com/Ramadan-Elgamal/Autobees --skill vercel-react-best-practices-ramadan-elgamal

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 a structured, prioritized rule set from Vercel Engineering so AI agents and developers consistently apply proven optimization patterns 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 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 or 200-800ms import cost reductions. - Use Case: When refactoring a Next.js page that sequentially awaits user, posts, and comments fetches, the Skill directs you to parallelize with Promise.all(), add Suspense boundaries for streaming, and avoid barrel file imports to cut bundle size. ## 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 await the promises later. Use Promise.all() for independent fetches and the better-all library for operations with partial dependencies, achieving 2-10x improvements.

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 config; otherwise import directly from subpaths like @mui/material/Button.

Does this skill work with Next.js Server Components and Server Actions?

Yes, it includes dedicated server-side rules covering React.cache() deduplication, RSC prop serialization, Server Action authentication, and avoiding shared module state for request data in concurrent renders.

When should I not use Suspense boundaries for data fetching?

Avoid Suspense when data is critical for layout decisions, needed for SEO above the fold, or when queries are small and fast. The trade-off is faster initial paint versus potential layout shift.

What is the difference between useMemo and deriving state during render?

The rules recommend calculating derived state directly during rendering instead of using effects, and avoiding useMemo for simple expressions with primitive results. Reserve memoization for genuinely expensive computations in extracted components.