vercel-react-best-practices

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

Updated Mar 22, 2026
One-click install
npx skills add https://github.com/Ahmed-Eldalatony/airbnb-clone-bench --skill vercel-react-best-practices-ahmed-eldalatony
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/Ahmed-Eldalatony/airbnb-clone-bench/tree/main/.agents/skills/vercel-react-best-practices
Command: npx skills add https://github.com/Ahmed-Eldalatony/airbnb-clone-bench --skill vercel-react-best-practices-ahmed-eldalatony

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 - 64 Prioritized Rules: Covers 8 categories from eliminating waterfalls (CRITICAL) to advanced patterns (LOW), each with impact ratings and incorrect/correct code examples. - Structured Rule Files: Individual rule files in rules/ organized by prefix (async-, bundle-, server-, client-, rerender-, rendering-, js-, advanced-) for targeted lookup. - Use Case: When refactoring a Next.js page that fetches user, posts, and comments sequentially, apply the async-parallel rule to convert the awaits into a single Promise.all() call, cutting three round trips to one. ## Quick Start Ask the agent to review your React component or Next.js page against the Vercel performance rules and refactor any waterfall or bundle-size issues it finds.

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(), or use better-all for partial dependency chains. In components, restructure with composition so sibling components fetch in parallel instead of sequentially.

How to reduce bundle size from barrel file imports?

Import directly from source files instead of barrel entry points, for example importing from lucide-react/dist/esm/icons/check rather than the package root. In Next.js 13.5+, enable optimizePackageImports to transform barrel imports automatically at build time.

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

Many rules apply to any React codebase, including re-render optimization, JavaScript performance, and client-side data fetching patterns. Next.js-specific rules cover server components, server actions, 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 session and authorization inside each action before performing mutations.