vercel-react-best-practices
Skill1.4k starsChanged 11 months agoMITView on GitHub
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.
182 other projects use a version of this, 180 of them edited.
Trending
More talk lately.thin dataabout the whole repository
Most recently taken up by
- Significant-Gravitas/AutoGPTedited, first seen Nov 18, 2026
- gilsmt/skillsedited, first seen Oct 4, 2026
- calesthio/OpenMontageedited, first seen Oct 3, 2026
- STIFLEUR390/kwiktalk-docsedited, first seen Oct 3, 2026
- delorenj/skillsedited, first seen Oct 2, 2026
- louisbrulenaudet/monorepo-templateedited, first seen Oct 2, 2026
Who's talking about CloudAI-X/claude-workflow-v2
- @tom-doerr.bsky.social“https://github.com/CloudAI-X/claude-workflow-v2”Bluesky · Feb 21, 2026 · 1 likes
- LeszekKantorek/skills-library“Import: some development skills”GitHub · Oct 5, 2026
- sudosubin/agents.nix“codex-plugins.github.cloudai-x.claude-workflow-v2: init at 2.0.7”GitHub · Oct 4, 2026
- sudosubin/agents.nix“claude-code-plugins.github.cloudai-x.claude-workflow-v2: init at 2.0.7”GitHub · Oct 4, 2026
- sudosubin/agents.nix“claude-code-marketplaces.github.cloudai-x.claude-workflow-v2: init at 2.0.7”GitHub · Oct 4, 2026
The biggest 5 of 11 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 11
Talked about on GitHub and Bluesky (11 times).
On GitHub · 10
- Oct 5, 2026Import: some development skills — LeszekKantorek/skills-library0 reactions · 1 comment
- Oct 4, 2026codex-plugins.github.cloudai-x.claude-workflow-v2: init at 2.0.7 — sudosubin/agents.nix0 reactions
- Oct 4, 2026claude-code-plugins.github.cloudai-x.claude-workflow-v2: init at 2.0.7 — sudosubin/agents.nix0 reactions
- Oct 4, 2026claude-code-marketplaces.github.cloudai-x.claude-workflow-v2: init at 2.0.7 — sudosubin/agents.nix0 reactions
- Oct 3, 2026agent-skills.github.cloudai-x.claude-workflow-v2: 0-unstable-2026-06-02 → 2.0.7 — sudosubin/agents.nix0 reactions
5 more on GitHub
- Sep 26, 2026[Candidate] cloudai-x/claude-workflow-v2/skills/convex-backend - convex-backend — ProSkillsMD/proskills0 reactions · 2 comments
- Sep 26, 2026[Candidate] cloudai-x/claude-workflow-v2/skills/analyzing-projects - analyzing-projects — ProSkillsMD/proskills0 reactions · 1 comment
- Sep 26, 2026agent-skills.github.cloudai-x.claude-workflow-v2: init at 0-unstable-2026-06-02 — sudosubin/agents.nix0 reactions
- Apr 6, 2026Audit candidate: CloudAI-X/claude-workflow-v2 — xiaolai/nlpm0 reactions · 3 comments
- Jan 10, 2026New plugins: 41 skills from skills (low risk) — aiskillstore/marketplace0 reactions
On Bluesky · 1
- Feb 21, 2026https://github.com/CloudAI-X/claude-workflow-v2 — @tom-doerr.bsky.social1 likes and repost
Used with
Projects with it also use next-cache-components, vercel-composition-patterns and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
VercelSkillnext-cache-components
Next.js 16 Cache Components - PPR, use cache directive, cacheLife, cacheTag, updateTag
Also in 7 projects that use this
SentrySkillvercel-composition-patterns
Also in 45 projects that use this
SentrySkillnext-best-practices
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling
Also in 20 projects that use this
jarrodwattsSkillreact-useeffect
React useEffect best practices from official docs. Use when writing/reviewing useEffect, useState for derived values, data fetching, or state synchronization. Teaches when NOT to use Effect and better alternatives.
Also in 5 projects that use this
VercelSkillvercel-react-native-skills
Also in 17 projects that use this
itsyasirkhandevSkilltailwind-css-patterns
Provides comprehensive Tailwind CSS utility-first styling patterns including responsive design, layout utilities, flexbox, grid, spacing, typography, colors, and modern CSS best practices. Use when styling React/Vue/Svelte components, building responsive layouts, implementing design systems, or optimizing CSS workflow.
Also in 3 projects that use this
- +3 more from vercel-labs
Other versions182 projects use a version of this.
Word for word · 0
None found.
Edited · 180
- Significant-Gravitas/AutoGPT★ 188k91% same
- calesthio/OpenMontage★ 63k61% same
- CherryHQ/cherry-studio★ 52k69% same
- vercel-labs/agent-skills★ 32k60% same
- open-metadata/OpenMetadata★ 15k60% same
- zhukunpenglinyutong/jetbrains-cc-gui★ 6.8k60% same
- vercel-labs/open-agents★ 5.8k73% same
- zebbern/claude-code-guide★ 4.6k74% same
- compozy/compozy★ 2.8k91% same
- agentset-ai/agentset★ 2.1k74% same
170 more not listed
Wrote their own version · 2
- QuantumNous/new-api★ 49ksame name
- coder-zhuzm/vercel-react-skills-zh★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository16 other files it gives its agents.
- skills/convex-backend/AGENTS.mdAGENTS.md
- skills/vercel-react-best-practices/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- analyzing-projectsSkill
- convex-backendSkill
- database-designSkill
- designing-apisSkill
- designing-architectureSkill
- designing-testsSkill
- devops-infrastructureSkill
- error-handlingSkill
- managing-gitSkill
- optimizing-performanceSkill
- parallel-executionSkill
- security-patternsSkill
- web-design-guidelinesSkill
The file
Files
Vercel React Best Practices
When to Load
- Trigger: React or Next.js development, component writing, data fetching patterns, bundle optimization
- Skip: Project does not use React or Next.js
Comprehensive performance optimization guide for React and Next.js applications, maintained by Vercel. Contains 47 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.
When to Apply
Reference these guidelines when:
- Writing new React components or Next.js pages
- Implementing data fetching (client or server-side)
- Reviewing code for performance issues
- Refactoring existing React/Next.js code
- Optimizing bundle size or load times
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
| 1 | Eliminating Waterfalls | CRITICAL | async- |
| 2 | Bundle Size Optimization | CRITICAL | bundle- |
| 3 | Server-Side Performance | HIGH | server- |
| 4 | Client-Side Data Fetching | MEDIUM-HIGH | client- |
| 5 | Re-render Optimization | MEDIUM | rerender- |
| 6 | Rendering Performance | MEDIUM | rendering- |
| 7 | JavaScript Performance | LOW-MEDIUM | js- |
| 8 | Advanced Patterns | LOW | advanced- |
Quick Reference
1. Eliminating Waterfalls (CRITICAL)
async-defer-await- Move await into branches where actually usedasync-parallel- Use Promise.all() for independent operationsasync-dependencies- Use better-all for partial dependenciesasync-api-routes- Start promises early, await late in API routesasync-suspense-boundaries- Use Suspense to stream content
2. Bundle Size Optimization (CRITICAL)
bundle-barrel-imports- Import directly, avoid barrel filesbundle-dynamic-imports- Use next/dynamic for heavy componentsbundle-defer-third-party- Load analytics/logging after hydrationbundle-conditional- Load modules only when feature is activatedbundle-preload- Preload on hover/focus for perceived speed
3. Server-Side Performance (HIGH)
server-cache-react- Use React.cache() for per-request deduplicationserver-cache-lru- Use LRU cache for cross-request cachingserver-serialization- Minimize data passed to client componentsserver-parallel-fetching- Restructure components to parallelize fetchesserver-after-nonblocking- Use after() for non-blocking operations
4. Client-Side Data Fetching (MEDIUM-HIGH)
client-swr-dedup- Use SWR for automatic request deduplicationclient-event-listeners- Deduplicate global event listeners
5. Re-render Optimization (MEDIUM)
rerender-defer-reads- Don't subscribe to state only used in callbacksrerender-memo- Extract expensive work into memoized componentsrerender-dependencies- Use primitive dependencies in effectsrerender-derived-state- Subscribe to derived booleans, not raw valuesrerender-functional-setstate- Use functional setState for stable callbacksrerender-lazy-state-init- Pass function to useState for expensive valuesrerender-transitions- Use startTransition for non-urgent updates
6. Rendering Performance (MEDIUM)
rendering-animate-svg-wrapper- Animate div wrapper, not SVG elementrendering-content-visibility- Use content-visibility for long listsrendering-hoist-jsx- Extract static JSX outside componentsrendering-svg-precision- Reduce SVG coordinate precisionrendering-hydration-no-flicker- Use inline script for client-only datarendering-activity- Use Activity component for show/hiderendering-conditional-render- Use ternary, not && for conditionals
7. JavaScript Performance (LOW-MEDIUM)
js-batch-dom-css- Group CSS changes via classes or cssTextjs-index-maps- Build Map for repeated lookupsjs-cache-property-access- Cache object properties in loopsjs-cache-function-results- Cache function results in module-level Mapjs-cache-storage- Cache localStorage/sessionStorage readsjs-combine-iterations- Combine multiple filter/map into one loopjs-length-check-first- Check array length before expensive comparisonjs-early-exit- Return early from functionsjs-hoist-regexp- Hoist RegExp creation outside loopsjs-min-max-loop- Use loop for min/max instead of sortjs-set-map-lookups- Use Set/Map for O(1) lookupsjs-tosorted-immutable- Use toSorted() for immutability
8. Advanced Patterns (LOW)
advanced-event-handler-refs- Store event handlers in refsadvanced-use-latest- useLatest for stable callback refs
Full Compiled Document
For the complete guide with all rules expanded and detailed code examples, see AGENTS.md.
Each rule contains:
- Brief explanation of why it matters
- Incorrect code example with explanation
- Correct code example with explanation
- Additional context and references
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

