vercel-react-best-practices

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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 slow server responses. This Skill gives AI agents and developers a prioritized, rule-based checklist from Vercel Engineering to catch and fix these issues during code generation, review, and refactoring. ## Core Features & Use Cases - 65 Prioritized Rules Across 8 Categories: Covers eliminating waterfalls, bundle size optimization, server-side performance, client-side data fetching, re-render optimization, rendering performance, JavaScript micro-optimizations, 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". - Use Case: When asked to optimize a slow Next.js page, the agent consults rules like async-parallel (Promise.all for independent fetches), server-serialization (minimize RSC props), and bundle-barrel-imports (avoid barrel file imports) to produce a faster implementation. ## 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 promises immediately and await them together with Promise.all, or use better-all for partial dependencies. In components, split async children so sibling fetches run in parallel, and use Suspense boundaries so layout renders while data streams in.

How to reduce bundle size from barrel file imports?▼

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 skill work with React Server Components?▼

Yes, it includes dedicated server-side rules for RSC boundaries: minimize serialized props, avoid duplicate serialization from array transformations, use React.cache for per-request deduplication, and parallelize nested data fetching with component composition.

When should I not use Suspense boundaries for data fetching?▼

Avoid Suspense when data drives layout decisions, for SEO-critical above-the-fold content, for small fast queries where overhead isn't worth it, or when you want to prevent layout shift between loading and loaded states.

What is the difference between React.cache and LRU caching?▼

React.cache deduplicates fetches only within a single request. For data shared across sequential requests, use a module-level LRU cache with TTL, which is especially effective on Vercel Fluid Compute where instances are shared.