vercel-react-best-practices

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

Updated Jul 30, 2026
One-click install
npx skills add https://github.com/mrestrepoj10/re-hear --skill vercel-react-best-practices-mrestrepoj10
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/mrestrepoj10/re-hear/tree/main/.agents/skills/vercel-react-best-practices
Command: npx skills add https://github.com/mrestrepoj10/re-hear --skill vercel-react-best-practices-mrestrepoj10

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

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 work. This Skill gives an AI agent a structured, prioritized rulebook from Vercel Engineering so generated and refactored code follows proven performance patterns instead of common anti-patterns. ## 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. - On-demand rule lookup: individual rule files under rules/ (e.g., async-parallel.md, bundle-barrel-imports.md) can be read for detailed guidance, while AGENTS.md holds the full compiled document. - Use Case: When asked to optimize a slow Next.js page, the agent consults the waterfall rules to parallelize data fetching with Promise.all(), adds strategic Suspense boundaries, and replaces barrel imports with direct or optimized package imports. ## Quick Start Review my Next.js page component using the vercel-react-best-practices skill and refactor any data-fetching waterfalls or bundle-size 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 data fetching waterfalls in Next.js?

Start independent async operations immediately and await them together with Promise.all(), or use better-all for partial dependency chains. The skill's async rules show how to restructure API routes and Server Components so sequential awaits become parallel round trips.

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, cutting 200-800ms of import cost per cold start.

What React performance rules does this skill cover?

It covers 70 rules in 8 categories: eliminating waterfalls, bundle optimization, server-side performance, client data fetching, re-render optimization, rendering performance, JavaScript micro-optimizations, and advanced patterns like useEffectEvent. Each rule includes incorrect and correct code examples.

Does this skill work with React Server Components?

Yes, several rules target RSC specifically: minimizing serialization at RSC boundaries, avoiding duplicate serialization in props, per-request deduplication with React.cache(), and avoiding shared module state for request data during concurrent server renders.

When should I not use Suspense boundaries for data fetching?

Avoid Suspense when data drives layout decisions, when content is SEO-critical above the fold, when queries are small and fast, or when layout shift from loading-to-content jumps hurts UX. The skill documents this trade-off between faster initial paint and visual stability.