vercel-react-best-practices

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

Updated Apr 30, 2026
One-click install
npx skills add https://github.com/AdityaBorkar/igbot-fork --skill vercel-react-best-practices-adityaborkar
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/AdityaBorkar/igbot-fork/tree/main/.agents/skills/vercel-react-best-practices
Command: npx skills add https://github.com/AdityaBorkar/igbot-fork --skill vercel-react-best-practices-adityaborkar

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, bloated bundles, and data-fetching waterfalls that are hard to spot during development. This Skill gives AI agents and developers a prioritized, rule-based checklist to catch and fix these performance issues automatically. ## Core Features & Use Cases - 57 Prioritized Rules Across 8 Categories: Covers eliminating waterfalls, bundle size optimization, server-side performance, client-side data fetching, re-render optimization, rendering performance, JavaScript performance, and advanced patterns, each tagged by impact level. - Incorrect vs. Correct Code Examples: Every rule includes concrete before/after TypeScript and TSX snippets, making it directly actionable for code generation and review. - Individual Rule Files: Each rule lives in its own file under rules/ for targeted lookup, plus a full compiled reference in AGENTS.md. - Use Case: When refactoring a Next.js page that fetches user, posts, and comments sequentially, the Skill directs you to parallelize with Promise.all(), restructure components for parallel server-side fetching, and add Suspense boundaries for faster initial paint. ## Quick Start Ask the agent 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 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 component trees, restructure so sibling components fetch in parallel instead of awaiting in a parent before rendering children.

How to reduce bundle size from libraries like lucide-react or MUI?▼

Import directly from source files instead of barrel entry points, which can load thousands of unused modules. In Next.js 13.5+, enable optimizePackageImports in next.config.js to transform barrel imports automatically at build time.

When should I use React.cache() versus an LRU cache?▼

React.cache() deduplicates calls within a single request, ideal for auth checks and database queries in one render pass. Use an LRU cache when data must persist across sequential requests, such as repeated user actions hitting multiple endpoints.

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

Most rules apply to any React codebase, including re-render optimization, JavaScript performance, and client-side fetching patterns. Next.js-specific rules cover Server Actions, RSC serialization, next/dynamic, and the after() API.

Why does my conditional render display 0 in React?▼

Using && with a numeric condition renders the falsy value 0 or NaN as text. Use an explicit ternary like count > 0 ? <Badge /> : null so nothing renders when the condition fails.