vercel-react-best-practices

Applies Vercel's React and Next.js performance optimization rules to code generation and review.

1|Updated Apr 26, 2026
One-click install
npx skills add https://github.com/CarlosPavajeau/light --skill vercel-react-best-practices-carlospavajeau
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/CarlosPavajeau/light/tree/main/.claude/skills/vercel-react-best-practices
Command: npx skills add https://github.com/CarlosPavajeau/light --skill vercel-react-best-practices-carlospavajeau

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, and unnecessary re-renders that are hard to spot during development and code review. ## Core Features & Use Cases - 70 Prioritized Performance Rules: Covers 8 categories from critical (eliminating waterfalls, bundle size) to incremental (advanced patterns), each with impact ratings and incorrect-vs-correct code examples. - Structured Rule Files: Individual rule files organized by prefix (async-, bundle-, server-, client-, rerender-, rendering-, js-, advanced-) for targeted lookups during refactoring. - Use Case: When reviewing a Next.js page that fetches user, posts, and comments sequentially, apply the async-parallel rule to rewrite the fetches with Promise.all() and cut three round trips down to one. ## Quick Start Review my React component and Next.js API route for performance issues using the Vercel best practices rules and suggest fixes.

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?

Use Promise.all() to run independent async operations concurrently instead of awaiting them sequentially. For partial dependencies, start promises early and await late, or use the better-all library to maximize parallelism automatically.

How to reduce React bundle size from barrel file imports?

Import directly from source files instead of barrel entry points that re-export thousands of modules. In Next.js 13.5+, use the optimizePackageImports config option to automatically transform barrel imports while preserving TypeScript support.

Does this skill work with React frameworks other than Next.js?

Most rules apply to any React codebase, including re-render optimization, JavaScript performance, and client-side fetching patterns. Next.js-specific rules cover Server Actions, RSC serialization, and next/dynamic imports.

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, or when queries are small and fast. The trade-off is faster initial paint versus potential layout shift.

Why do Server Actions need authentication checks inside the function?

Server Actions are exposed as public endpoints just like API routes, so middleware or layout guards alone are insufficient. Always verify authentication and authorization inside each action, and validate inputs before performing mutations.