vercel-react-best-practices

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

2|Updated May 30, 2026
One-click install
npx skills add https://github.com/virahitvin8/crafty-gis --skill vercel-react-best-practices-virahitvin8
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/virahitvin8/crafty-gis/tree/main/GIT_STAR/assignment-generator/antigravity-skills-main/antigravity-skills-main/skills/react-best-practices
Command: npx skills add https://github.com/virahitvin8/crafty-gis --skill vercel-react-best-practices-virahitvin8

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 bloated bundles because developers lack a consolidated, prioritized set of performance rules. This Skill provides 70 impact-ranked rules from Vercel Engineering so AI agents and developers can write, review, and refactor code against proven optimization patterns. ## Core Features & Use Cases - Prioritized Rule Catalog: 70 rules across 8 categories ranked by impact, from critical waterfall elimination and bundle size reduction to advanced hook patterns. - Incorrect vs. Correct Examples: Every rule includes side-by-side TypeScript/TSX code examples with explanations and impact metrics for automated refactoring. - Use Case: When reviewing a Next.js page that fetches data sequentially, apply the async rules to convert sequential awaits into parallel Promise.all() calls and add Suspense boundaries for faster initial paint. ## Quick Start Ask the AI to review your React component or Next.js page for performance issues using the Vercel 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?

Apply impact-prioritized rules starting with eliminating async waterfalls using Promise.all() and Suspense boundaries, then reduce bundle size with direct imports and dynamic imports. The rules cover 8 categories from critical server-side fixes to incremental JavaScript micro-optimizations.

How to prevent waterfalls in Next.js API routes?

Start independent async operations immediately without awaiting them, then await the promises later. For operations with partial dependencies, use the better-all library or chain promises so each task starts at the earliest possible moment.

Why are barrel file imports slow in React projects?

Barrel files re-export thousands of modules, costing 200-800ms per import on cold starts. Use Next.js optimizePackageImports config or direct path imports like @mui/material/Button to load only the modules you actually use.

Does this guide work with React Server Components?

Yes, it includes dedicated rules for RSC serialization, React.cache() per-request deduplication, avoiding shared module state across concurrent renders, and authenticating Server Actions like public API endpoints.

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.