vercel-react-best-practices

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

Updated Sep 15, 2026
One-click install
npx skills add https://github.com/Nadav011/nadavai-claude --skill vercel-react-best-practices-nadav011
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/Nadav011/nadavai-claude/tree/main/plugins/nadavai/skills/vercel-react-best-practices
Command: npx skills add https://github.com/Nadav011/nadavai-claude --skill vercel-react-best-practices-nadav011

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 unoptimized server-side data fetching. This Skill gives an AI agent a prioritized, rule-based checklist 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. - Structured rule files: individual Markdown rules under rules/ (e.g., async-parallel.md, bundle-barrel-imports.md) let the agent load only the relevant guidance, with a compiled AGENTS.md for the full document. - Use Case: When asked to optimize a slow Next.js page, the agent applies rules like parallelizing fetches with Promise.all(), adding Suspense boundaries, replacing barrel imports with direct imports, and lazy-loading heavy components via next/dynamic. ## 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 optimize React and Next.js performance with AI code review?

Apply the 70 prioritized rules from Vercel Engineering covering waterfalls, bundle size, server-side rendering, re-renders, and JavaScript hot paths. Each rule includes incorrect and correct code examples with impact metrics to guide refactoring.

How to eliminate async waterfalls in Next.js API routes?

Start independent promises immediately and await them later, or use Promise.all() for operations without interdependencies. For partial dependency chains, the rules recommend better-all to maximize parallelism, yielding 2-10x improvements.

Does this work with Next.js App Router and React Server Components?

Yes, the rules specifically cover RSC concerns like minimizing serialization at server-client boundaries, authenticating Server Actions, per-request deduplication with React.cache(), and avoiding shared module state for request data.

Why are barrel file imports bad for bundle size?

Barrel files can re-export thousands of modules, costing 200-800ms per import and slowing builds. The rules recommend Next.js optimizePackageImports or direct path imports for libraries like lucide-react and @mui/material.

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.