React Best Practices
Vercel's React and Next.js performance rule set for agents: eliminates request waterfalls, trims bundle size and applies rendering optimisations from production practice.
Install:
npx skills add vercel-labs/agent-skills --skill react-best-practices
Source: https://github.com/vercel-labs/agent-skills/tree/main/skills/react-best-practices
Repository: https://github.com/vercel-labs/agent-skills
Updated 27 November 2026.
Used in: Micro-SaaS with AI Coding Tools
What it does
- Dozens of performance rules organised by impact
- Covers async waterfalls, bundle size and server-side performance
- Includes client data-fetching and re-render optimisation guidance
- Rules carry explanations and code examples
- Maintained by the Vercel engineering team
Use it for
- Optimise a slow Next.js page before launch
- Review agent-written React code for performance traps
- Set a performance baseline for a new project
What it does
React Best Practices packages Vercel’s production performance knowledge as rules an agent applies while writing and reviewing React and Next.js code. The rule set is organised by impact — eliminating request waterfalls first, then bundle size, server performance, client-side fetching, and re-render behaviour — and each rule explains the problem and shows the fix. The practical effect: instead of an agent producing React that works but fetches sequentially, ships oversized bundles and re-renders half the page on every keystroke, it writes code that follows the patterns Vercel’s own teams use.
How to install and use
Install with the command in the frontmatter. The skill activates on React and Next.js work — writing components, building pages, refactoring, or reviewing existing code. For an existing project, ask for a performance review of a specific page and let the rules drive the findings; for new work, it steers generation from the start.
Example use
Ask: ‘This product page feels slow — review it against your performance rules.’ Expect findings in priority order: independent data fetches that should run in parallel, a heavy library imported whole for one function, client components pulling in code that could render on the server — each with the concrete change, not generic advice to ‘optimise images’.
Good to know
Rules are heuristics, not laws: a waterfall fix that complicates a rarely-visited admin page may not be worth it, and premature optimisation is a real cost. Apply the high-impact categories broadly, measure before and after on pages that matter, and remember the skill optimises performance — it says nothing about whether the feature itself is well designed.
Performance rules work best alongside structure rules: Composition Patterns covers how components should be shaped, and Webapp Testing verifies the result in a real browser. For the Next.js side of deployment, see Deploying Next.js on free tiers.
Requirements
You need an agent that supports the Agent Skills standard — Claude Code is the target tool listed for this skill — plus the install command shown at the top of this page: npx skills add vercel-labs/agent-skills --skill react-best-practices. The skill itself is a folder of instruction files (a SKILL.md, and in some cases bundled scripts or reference files) that the agent loads when a task matches its description. Nothing in the skill replaces the underlying tool it guides: where the skill covers an API, a document format or a platform, you still need your own access and accounts for that platform.
Safety notes
Installs as local instruction files — a SKILL.md plus any bundled scripts or assets — that your agent reads and follows locally. Review the SKILL.md and any scripts in the skill folder before first use; no third-party security scan was run and no scan result is claimed.
In practice: read the SKILL.md before the first run, skim any bundled scripts for network calls or file writes outside the project, and run the skill first on a copy of a real file rather than the original. A skill’s instructions are followed by your agent with your permissions, so the review standard is the same one you would apply to a script a stranger handed you. What was verified for this entry: Verified via the GitHub API on 2026-11-27: the skill exists in vercel-labs/agent-skills’s skills directory. Description rewritten in our own words; popularity/install counts deliberately not reproduced.
Before you rely on it
Run the example task from the section above on a small, real job and compare the output with doing the same job unaided. Keep the skill if it removes steps or errors you actually make; remove it if it only adds ceremony. Skills cost a description line of context on every session until they trigger, so a directory of unused skills is not free — it is a small, permanent tax on every conversation.
Safety notes
Verified via the GitHub API on 2026-11-27: the skill exists in vercel-labs/agent-skills's skills directory. Description rewritten in our own words; popularity/install counts deliberately not reproduced.
Installs as local instruction files — a SKILL.md plus any bundled scripts or assets — that your agent reads and follows locally. Review the SKILL.md and any scripts in the skill folder before first use; no third-party security scan was run and no scan result is claimed.