vercel-react-best-practices

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

Updated Jun 29, 2026
One-click install
npx skills add https://github.com/iJosueeh/amauta --skill vercel-react-best-practices-ijosueeh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/iJosueeh/amauta/tree/main/.agents/skills/vercel-react-best-practices
Command: npx skills add https://github.com/iJosueeh/amauta --skill vercel-react-best-practices-ijosueeh

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? React and Next.js codebases often suffer from slow load times, unnecessary re-renders, and data-fetching waterfalls that are hard to spot during development. This Skill provides a structured, prioritized rule set so AI-assisted code generation and review consistently 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 micro-optimizations, and advanced patterns. - Incorrect vs. Correct Examples: Each rule includes concrete code comparisons with impact metrics (e.g., 2-10x improvement from parallelizing fetches, 200-800ms savings from avoiding barrel imports). - Use Case: When refactoring a Next.js page that fetches user, posts, and comments sequentially, apply the async rules to convert them into a single Promise.all() call and wrap slow sections in Suspense boundaries for faster initial paint. ## Quick Start Review my React component and Next.js data fetching code against the Vercel best practices rules and refactor any performance 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() instead of awaiting sequentially. For partial dependencies, start promises early and chain dependent fetches, or use the better-all library to maximize parallelism automatically.

How to reduce React bundle size from icon libraries?

Avoid barrel file imports from libraries like lucide-react or @mui/material, which can load thousands of unused modules. In Next.js 13.5+, use optimizePackageImports config; otherwise import directly from subpaths like @mui/material/Button.

Does this guide apply to React apps without Next.js?

Yes, 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, React Server Components, and next/dynamic imports.

When should I not use Suspense boundaries for data fetching?

Avoid Suspense when data drives layout decisions, for SEO-critical above-the-fold content, for small fast queries where overhead is not worth it, or when you want to prevent layout shift between loading and loaded states.

Why do Server Actions need authentication checks inside them?

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.