vercel-react-best-practices

Apply Vercel performance rules to refactor React and Next.js code.

2|Updated Feb 12, 2024
One-click install
npx skills add https://github.com/adibfirman/dotfiles --skill vercel-react-best-practices-adibfirman
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/adibfirman/dotfiles/tree/main/claude/.claude/skills/technical/react/react-best-practices
Command: npx skills add https://github.com/adibfirman/dotfiles --skill vercel-react-best-practices-adibfirman

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps teams eliminate common React and Next.js performance pitfalls (like waterfalls, bloated bundles, and inefficient re-renders) so apps load faster and feel more responsive.

Core Features & Use Cases

  • Actionable performance rules: Covers critical areas such as async waterfall elimination, bundle size optimization, and server/client data handling, each with clear incorrect vs. correct patterns.
  • Agent/LLM-friendly structure: Organized rule categories and consistent guidance to support automated review, refactoring, and code generation.
  • Real-world examples for React/Next.js: Includes SSR/RSC boundary advice, Suspense streaming guidance, and caching/auth/security practices for Server Actions.

Quick Start

Use the vercel-react-best-practices skill to audit your React or Next.js code for performance anti-patterns and rewrite it to match the recommended faster patterns.

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 fix React and Next.js performance issues like waterfalls and bundle bloat?

Eliminate React and Next.js performance pitfalls by applying Vercel engineering best-practice refactoring rules to existing code. It targets waterfalls, unnecessary re-renders, bundle bloat, and inefficient RSC props serialization to make applications load faster.

What is the best way to optimize React Server Components props serialization?

Optimize React Server Components props serialization by applying rule-driven guidance for server caching, auth, and data handling. It identifies inefficient serialization patterns and provides correct refactoring structures to improve rendering efficiency.

How do I parallelize async data fetching in Next.js to eliminate waterfalls?

Parallelize async data fetching in Next.js by applying specific refactoring rules for async waterfall elimination. It provides actionable patterns to restructure sequential data requests into parallel operations, significantly improving load times.

Does this refactoring approach work for both code review and automated remediation?

Yes, the refactoring approach works for both code review and automated remediation. Its rule categories and consistent guidance are structured to support automated review, refactoring, and code generation during feature implementation.

When should I use Suspense boundaries for streaming in Next.js?

Use Suspense boundaries for streaming in Next.js when you need to optimize rendering efficiency and handle server/client data fetching. The guidance provides correct patterns for implementing streaming to improve application responsiveness.

Why does my React app have unnecessary re-renders and how can I optimize client state?

Unnecessary re-renders occur due to inefficient client state and effect optimization. Apply the skill's rule-driven guidance to refactor client state management, eliminating unnecessary re-renders and improving overall rendering efficiency.