.fyi
SkillsMCPPluginsSubagents

Browse by category

DevOps & CI/CD SkillsProductivity & Workflow SkillsOther SkillsProduct & Project Management SkillsDocumentation & Knowledge SkillsCode Review & Refactor SkillsBackend & APIs SkillsAgent Meta & Communication SkillsResearch SkillsSecurity SkillsUX UI & Design SkillsTesting & QA SkillsSee all →

Every Claude Code skill, MCP server, plugin and subagent in one directory. Searchable, comparable, and one command from installed. Live stats from GitHub, npm and PyPI.

We're on Product HuntYour agent's app storeCheck it out →
Agent SkillsMCP ServersPluginsSubagentsCoding Agents
CollectionsOfficial publishersGlossaryFAQBlogSearchSavedFeedback
PrivacyTermsllms.txtSitemap

made with ♥ · © 2026 aaaa.fyi

Independent project · real data from public registries

…/agent-skills/react-best-practices
home/skills/vercel-labs/agent-skills/react-best-practices
vercel-labs avatar

react-best-practices

byvercel-labs· 154 skills

Installs

587k

Stars

29k

Forks

2.6k

Category

Frontend Development

View on GitHub

TL;DR

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

How to install react-best-practices?

vercel-labs/agent-skills/react-best-practices
$npx -y skills add vercel-labs/agent-skills --skill react-best-practices

Installs into the current project.

›Prefer a prompt? Paste this to your agent

Use this skill

Run `npx skills use "https://github.com/vercel-labs/agent-skills" --skill "vercel-labs/agent-skills/react-best-practices"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.

Use the whole pack

Use the skills in "https://github.com/vercel-labs/agent-skills" that are relevant to the current task. Run `npx skills add "https://github.com/vercel-labs/agent-skills"` and select the relevant skills, then follow their instructions.

Files · 1

View on GitHub
SKILL.md
1# Vercel React Best Practices
2 
3Comprehensive performance optimization guide for React and Next.js applications, maintained by Vercel. Contains 70 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.
4 
5## When to Apply
6 
7Reference these guidelines when:
8- Writing new React components or Next.js pages
9- Implementing data fetching (client or server-side)
10- Reviewing code for performance issues
11- Refactoring existing React/Next.js code
12- Optimizing bundle size or load times
13 
14## Rule Categories by Priority
15 
16| Priority | Category | Impact | Prefix |
17|----------|----------|--------|--------|
18| 1 | Eliminating Waterfalls | CRITICAL | `async-` |
19| 2 | Bundle Size Optimization | CRITICAL | `bundle-` |
20| 3 | Server-Side Performance | HIGH | `server-` |
21| 4 | Client-Side Data Fetching | MEDIUM-HIGH | `client-` |
22| 5 | Re-render Optimization | MEDIUM | `rerender-` |
23| 6 | Rendering Performance | MEDIUM | `rendering-` |
24| 7 | JavaScript Performance | LOW-MEDIUM | `js-` |
25| 8 | Advanced Patterns | LOW | `advanced-` |
26 
27## Quick Reference
28 
29### 1. Eliminating Waterfalls (CRITICAL)
30 
31- `async-cheap-condition-before-await` - Check cheap sync conditions before awaiting flags or remote values
32- `async-defer-await` - Move await into branches where actually used
33- `async-parallel` - Use Promise.all() for independent operations
34- `async-dependencies` - Use better-all for partial dependencies
35- `async-api-routes` - Start promises early, await late in API routes
36- `async-suspense-boundaries` - Use Suspense to stream content
37 
38### 2. Bundle Size Optimization (CRITICAL)
39 
40- `bundle-barrel-imports` - Import directly, avoid barrel files
41- `bundle-analyzable-paths` - Prefer statically analyzable import and file-system paths to avoid broad bundles and traces
42- `bundle-dynamic-imports` - Use next/dynamic for heavy components
43- `bundle-defer-third-party` - Load analytics/logging after hydration
44- `bundle-conditional` - Load modules only when feature is activated
45- `bundle-preload` - Preload on hover/focus for perceived speed
46 
47### 3. Server-Side Performance (HIGH)
48 
49- `server-auth-actions` - Authenticate server actions like API routes
50- `server-cache-react` - Use React.cache() for per-request deduplication
51- `server-cache-lru` - Use LRU cache for cross-request caching
52- `server-dedup-props` - Avoid duplicate serialization in RSC props
53- `server-hoist-static-io` - Hoist static I/O (fonts, logos) to module level
54- `server-no-shared-module-state` - Avoid module-level mutable request state in RSC/SSR
55- `server-serialization` - Minimize data passed to client components
56- `server-parallel-fetching` - Restructure components to parallelize fetches
57- `server-parallel-nested-fetching` - Chain nested fetches per item in Promise.all
58- `server-after-nonblocking` - Use after() for non-blocking operations
59 
60### 4. Client-Side Data Fetching (MEDIUM-HIGH)
61 
62- `client-swr-dedup` - Use SWR for automatic request deduplication
63- `client-event-listeners` - Deduplicate global event listeners
64- `client-passive-event-listeners` - Use passive listeners for scroll
65- `client-localstorage-schema` - Version and minimize localStorage data
66 
67### 5. Re-render Optimization (MEDIUM)
68 
69- `rerender-defer-reads` - Don't subscribe to state only used in callbacks
70- `rerender-memo` - Extract expensive work into memoized components
71- `rerender-memo-with-default-value` - Hoist default non-primitive props
72- `rerender-dependencies` - Use primitive dependencies in effects
73- `rerender-derived-state` - Subscribe to derived booleans, not raw values
74- `rerender-derived-state-no-effect` - Derive state during render, not effects
75- `rerender-functional-setstate` - Use functional setState for stable callbacks
76- `rerender-lazy-state-init` - Pass function to useState for expensive values
77- `rerender-simple-expression-in-memo` - Avoid memo for simple primitives
78- `rerender-split-combined-hooks` - Split hooks with independent dependencies
79- `rerender-move-effect-to-event` - Put interaction logic in event handlers
80- `rerender-transitions` - Use startTransition for non-urgent updates
81- `rerender-use-deferred-value` - Defer expensive renders to keep input responsive
82- `rerender-use-ref-transient-values` - Use refs for transient frequent values
83- `rerender-no-inline-components` - Don't define components inside components
84 
85### 6. Rendering Performance (MEDIUM)
86 
87- `rendering-animate-svg-wrapper` - Animate div wrapper, not SVG element
88- `rendering-content-visibility` - Use content-visibility for long lists
89- `rendering-hoist-jsx` - Extract static JSX outside components
90- `rendering-svg-precision` - Reduce SVG coordinate precision
91- `rendering-hydration-no-flicker` - Use inline script for client-only data
92- `rendering-hydration-suppress-warning` - Suppress expected mismatches
93- `rendering-activity` - Use Activity component for show/hide
94- `rendering-conditional-render` - Use ternary, not && for conditionals
95- `rendering-usetransition-loading` - Prefer useTransition for loading state
96- `rendering-resource-hints` - Use React DOM resource hints for preloading
97- `rendering-script-defer-async` - Use defer or async on script tags
98 
99### 7. JavaScript Performance (LOW-MEDIUM)
100 
101- `js-batch-dom-css` - Group CSS changes via classes or cssText
102- `js-index-maps` - Build Map for repeated lookups
103- `js-cache-property-access` - Cache object properties in loops
104- `js-cache-function-results` - Cache function results in module-level Map
105- `js-cache-storage` - Cache localStorage/sessionStorage reads
106- `js-combine-iterations` - Combine multiple filter/map into one loop
107- `js-length-check-first` - Check array length before expensive comparison
108- `js-early-exit` - Return early from functions
109- `js-hoist-regexp` - Hoist RegExp creation outside loops
110- `js-min-max-loop` - Use loop for min/max instead of sort
111- `js-set-map-lookups` - Use Set/Map for O(1) lookups
112- `js-tosorted-immutable` - Use toSorted() for immutability
113- `js-flatmap-filter` - Use flatMap to map and filter in one pass
114- `js-request-idle-callback` - Defer non-critical work to browser idle time
115 
116### 8. Advanced Patterns (LOW)
117 
118- `advanced-effect-event-deps` - Don't put `useEffectEvent` results in effect deps
119- `advanced-event-handler-refs` - Store event handlers in refs
120- `advanced-init-once` - Initialize app once per app load
121- `advanced-use-latest` - useLatest for stable callback refs
122 
123## How to Use
124 
125Read individual rule files for detailed explanations and code examples:
126 
127```
128rules/async-parallel.md
129rules/bundle-barrel-imports.md
130```
131 
132Each rule file contains:
133- Brief explanation of why it matters
134- Incorrect code example with explanation
135- Correct code example with explanation
136- Additional context and references
137 
138## Full Compiled Document
139 
140For the complete guide with all rules expanded: `AGENTS.md`

Preview

vercel-labs/agent-skillsvercel-labs/agent-skills

$ npx -y skills add vercel-labs/agent-skills --skill react-best-practices

▸ installing to .claude/skills…

✓ react-best-practices ready

Repovercel-labs/agent-skills
TypeSkills
CategoryFrontend Development
ForDeveloperArchitect
UpdatedJul 2026
License—
First seenJul 26, 2026

Tags

Skill

Related

6 picks
Type
  1. heygen-com avatarhyperframes-registryInstall, discover, and wire registry blocks and components into HyperFrames compositions.SkillsJul 2026267k38k
  2. vercel-labs avatarcomposition-patternsReact composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing…SkillsJul 2026266k29k
  3. shadcn avatarshadcnManages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI, including chat interfaces.SkillsJul 2026257k120k
  4. larksuite avatarlark-apps妙搭(Spark/Miaoda)应用开发与托管:应用创建、本地全栈开发、云端生成迭代、创意设计(UI mockup / 可交互原型 / 线框图 / 落地页 / 仪表盘 / 幻灯片 deck / 视觉探索)、AI相关能力和飞书平台能力或者其他外部能力集成、日志/Trace/监控指标/PV/UV…SkillsJul 2026235k16k
  5. leonxlnx avatarimage-to-code-skillElite website image-to-code skill for Codex. For visually important web tasks, it must first generate the design image(s) itself, deeply analyze them, then…SkillsJul 2026175k68k
  6. heygen-com avatarhyperframes-keyframesUse when a HyperFrames composition needs seek-safe 2D/3D keyframes, GSAP timelines, CSS keyframes, Anime.js, WAAPI, FLIP, paths, masks, SVG morph/draw, text…SkillsJul 2026124k38k