vercel-react-best-practices

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

Updated May 28, 2026
One-click install
npx skills add https://github.com/mrisoli/pokerhouse --skill vercel-react-best-practices-mrisoli
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/mrisoli/pokerhouse/tree/main/.agents/skills/vercel-react-best-practices
Command: npx skills add https://github.com/mrisoli/pokerhouse --skill vercel-react-best-practices-mrisoli

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 request waterfalls, bloated bundles, unnecessary re-renders, and slow server responses. This Skill provides a structured, impact-prioritized rule set from Vercel Engineering so AI agents and developers consistently apply proven optimization patterns during code generation, review, and refactoring. ## 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 Code Examples: Each rule includes concrete TypeScript/TSX examples showing the anti-pattern and the optimized implementation, with impact metrics like 2-10x improvements or 200-800ms import cost reductions. - Use Case: When refactoring a Next.js page that sequentially awaits multiple fetches, the Skill guides restructuring with Promise.all(), Suspense boundaries, and React.cache() deduplication to eliminate waterfalls and speed up rendering. ## Quick Start Ask the AI to review your React component or Next.js page for performance issues using the Vercel React best practices guidelines.

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 to maximize parallelism.

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. Barrel files in libraries like lucide-react can load thousands of unused modules costing 200-800ms per cold start.

Does this guide apply to React projects without Next.js?▼

Yes, most rules apply to any React codebase, including re-render optimization, JavaScript performance, and client-side data fetching. Some rules like next/dynamic and Server Actions are Next.js-specific, with alternatives noted where applicable.

When should I not use Suspense boundaries for data fetching?▼

Avoid Suspense when data is critical for layout decisions, needed for SEO-critical above-the-fold content, or when queries are small and fast. The trade-off is faster initial paint versus potential layout shift.

Why should Server Actions be authenticated like API routes?▼

Server Actions are exposed as public endpoints and can be invoked directly, bypassing middleware or layout guards. Always verify authentication and authorization inside each action, and validate inputs with a schema like zod before performing mutations.