vercel-react-best-practices

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

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

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 server-side serialization waste. This Skill gives an AI agent a structured, prioritized rulebook from Vercel Engineering so generated and refactored code follows proven performance patterns from the start. ## 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. - Quick-reference index in SKILL.md: rule IDs grouped by category let the agent jump directly to the relevant rule file in rules/ for detailed guidance. - Use Case: While refactoring a Next.js page, the agent applies async-parallel to convert sequential fetches into Promise.all(), uses bundle-barrel-imports to fix lucide-react imports, and wraps slow sections in Suspense boundaries per async-suspense-boundaries. ## Quick Start Review my Next.js page component for performance issues and refactor it 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, which can yield 2-10x improvement.

How to reduce bundle size from barrel file imports in React?

Import directly from source files instead of barrel entry points, or use Next.js 13.5+ optimizePackageImports to transform imports automatically. Libraries like lucide-react and @mui/material can load thousands of unused modules otherwise, costing 200-800ms per cold start.

When should I use Suspense boundaries in React Server Components?

Use Suspense when only part of the 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 very fast queries where overhead is not worth it.

Does this guide cover React Server Components and Server Actions?

Yes. It includes rules for authenticating Server Actions like public API routes, avoiding shared module state for request data, minimizing RSC serialization, per-request deduplication with React.cache(), and using after() for non-blocking operations.

What are the limitations of these React performance rules?

The rules are guidelines, not universal mandates; several list explicit exceptions, such as keeping await order when side effects matter or skipping memoization for cheap primitives. They target React and Next.js specifically and do not cover other frameworks.