vercel-react-best-practices

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

Updated Jun 9, 2026
One-click install
npx skills add https://github.com/TOBIASpuchito/Citec --skill vercel-react-best-practices-tobiaspuchito
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/TOBIASpuchito/Citec/tree/main/citec-frontend/.agents/skills/vercel-react-best-practices
Command: npx skills add https://github.com/TOBIASpuchito/Citec --skill vercel-react-best-practices-tobiaspuchito

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 such as async waterfalls, bloated bundles, unnecessary re-renders, and unauthenticated server actions. This Skill gives an AI agent a prioritized, rule-based checklist from Vercel Engineering so generated and refactored code follows proven performance patterns from the start. ## 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. - On-demand rule lookup: individual rule files under rules/ (e.g., async-parallel.md, bundle-barrel-imports.md) provide detailed explanations, impact metrics, and references. - Compiled reference document: AGENTS.md contains the full expanded guide for deep review sessions. - Use Case: When asked to optimize a slow Next.js page, the agent consults the waterfall and server-side rules to parallelize data fetching with Promise.all(), add Suspense boundaries, and deduplicate requests with React.cache(). ## Quick Start Review my Next.js page component using the vercel-react-best-practices skill and fix any data fetching waterfalls or bundle size issues.

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 sequential awaits. For partial dependencies, use the better-all library or chain promises so each task starts at the earliest possible moment.

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 or @mui/material can load thousands of unused modules costing 200-800ms per cold start.

Does this skill work with React Server Components?▼

Yes, it includes dedicated server-side rules for RSC such as minimizing serialization at RSC boundaries, per-request deduplication with React.cache(), avoiding shared module state, and authenticating Server Actions like public API routes.

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

Avoid Suspense when data drives layout decisions, when content is SEO-critical above the fold, when queries are small and fast, or when layout shift from loading to content would harm the user experience.

What is the difference between useEffectEvent and storing handlers in refs?▼

Both keep subscriptions stable while accessing the latest callback. useEffectEvent is the modern React API providing a stable function that always calls the latest handler, while the ref pattern manually syncs the handler into a ref inside an effect.