vercel-react-best-practices

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

Updated May 11, 2026
One-click install
npx skills add https://github.com/cloudofgeorge/AI-hands-Engineer --skill vercel-react-best-practices-cloudofgeorge
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/cloudofgeorge/AI-hands-Engineer/tree/main/skills/engineering/domains/web/vercel-react-best-practices
Command: npx skills add https://github.com/cloudofgeorge/AI-hands-Engineer --skill vercel-react-best-practices-cloudofgeorge

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? React and Next.js codebases often ship with hidden performance problems: sequential async waterfalls, bloated bundles from barrel imports, unnecessary re-renders, and duplicated server-side work. This Skill gives an agent a prioritized, rule-based checklist from Vercel Engineering so performance issues are caught and fixed during code generation and review rather than after production incidents. ## Core Features & Use Cases - 70 prioritized rules across 8 categories: from CRITICAL (eliminating waterfalls, bundle size) down to LOW (advanced hook patterns), each with incorrect vs. correct code examples and impact metrics. - Structured rule files: individual Markdown rules under rules/ with frontmatter (title, impact, tags), plus a compiled AGENTS.md containing the full guide. - Use Case: While refactoring a Next.js page, the agent applies async-parallel to convert sequential fetches into Promise.all(), replaces barrel imports from lucide-react per bundle-barrel-imports, and wraps slow sections in Suspense boundaries per async-suspense-boundaries. ## Quick Start Review my Next.js page component using the vercel-react-best-practices rules and fix any waterfalls, bundle, or re-render issues you find.

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 fetches, or the better-all library when operations have 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 skill work with React Server Components?

Yes, it includes server-side rules for RSC: minimizing serialization at RSC boundaries, per-request deduplication with React.cache(), avoiding shared module state for request data, 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 isn't worth it, or when you want to prevent layout shift from loading-to-content jumps.

Why do my React effects re-run on every render?

Common causes include including useEffectEvent functions in dependency arrays, passing unstable callbacks, or using non-primitive dependencies. Store handlers in refs or use useEffectEvent, and narrow dependencies to primitive values.