vercel-react-best-practices

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

Updated Aug 6, 2026
One-click install
npx skills add https://github.com/ferrarifankid04/ai-skills-public --skill vercel-react-best-practices-ferrarifankid04
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/ferrarifankid04/ai-skills-public/tree/main/claude-code/skills/vercel-react-best-practices
Command: npx skills add https://github.com/ferrarifankid04/ai-skills-public --skill vercel-react-best-practices-ferrarifankid04

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 server-side bottlenecks. This Skill gives AI agents a structured, prioritized rule set from Vercel Engineering so generated and refactored code follows proven performance patterns. ## 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. - Incorrect vs. Correct Code Examples: Every rule includes concrete TypeScript/TSX examples showing the anti-pattern and the optimized implementation, with impact metrics like 2-10x improvements. - Use Case: When refactoring a Next.js page that sequentially awaits user, posts, and comments fetches, the Skill directs the agent to parallelize them with Promise.all() and add strategic Suspense boundaries for faster initial paint. ## Quick Start Review my Next.js page component and apply the Vercel React best practices rules 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?

Execute independent async operations concurrently with Promise.all() instead of sequential awaits, and start promises early in API routes before awaiting them. For partial dependencies, use better-all or chain promises so each task starts at the earliest possible moment.

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 and cost 200-800ms. 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 such as 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 use Suspense boundaries in React?

Use Suspense when only part of a page needs async data, so the wrapper layout renders immediately while data streams in. Avoid it for SEO-critical above-the-fold content, layout-determining data, or fast queries where the overhead is not worthwhile.

Why does my React component re-render too often?

Common causes include defining components inside components, missing memoization of expensive work, broad effect dependencies, and subscribing to raw state instead of derived values. The re-render rules cover useMemo, useDeferredValue, functional setState, and transitions.