Agent skill · Vercel Agent Skills
/react-best-practices React and Next.js performance rules
This skill gives an agent Vercel's catalog of React and Next.js performance rules, grouped into eight categories and ordered by impact. Request waterfalls and bundle size come first, micro-optimizations last. Each rule has its own file with an incorrect and a corrected code example, so the agent can apply or explain a specific fix.
Works with
- Agent Skills-compatible agents
Used forCode reviewFrontend and UI
When to use it
- Writing a new React component or Next.js page
- Reviewing a pull request for performance regressions
- Reducing bundle size or slow page loads in an existing app
How it works
- 1Match the task to a category
The agent checks which of the eight rule groups, such as async, bundle or rerender, applies to the code at hand.
- 2Start with high-impact rules
Critical categories like eliminating waterfalls and bundle optimization are considered before lower-priority JavaScript tweaks.
- 3Open the specific rule file
For each relevant rule the agent reads its file under rules/ to see the wrong pattern and the preferred one.
- 4Apply or report the fix
The agent rewrites the code or explains the change, citing the rule name.
What it steers the agent away from
- Sequential awaits that could run in parallel
- Barrel imports and heavy modules that inflate the client bundle
- Unnecessary re-renders from unstable dependencies or components defined inside components
Install this skill
It installs with the Vercel Agent Skills pack.
Agent Skills-compatible agentsUses the skills CLI from skills.sh; skills load automatically when a matching task comes up.
npx skills add vercel-labs/agent-skillsCommands come from the author’s README; check it for changes before you run them.
Questions
Does it only apply to Next.js?
No. Many rules cover plain React and general JavaScript, while some, such as server actions and dynamic imports, are specific to Next.js.
Can the agent read all rules at once?
Yes. Besides the per-rule files, the skill ships a compiled AGENTS.md with every rule expanded.
More guides from Vercel Agent Skills
/deploy-to-vercelDeploy a project to VercelDeploys a project to Vercel, choosing git push, CLI deploy or a temporary claimable deployment.Read the guide →/web-design-guidelinesWeb interface guideline reviewReviews UI code against Vercel's web interface guidelines and reports issues by file and line.Read the guide →
Also in this pack
/react-native-skillsGuides React Native and Expo work on list performance, animations, images and native setup.↗/vercel-cli-with-tokensRuns Vercel CLI deploys and project management using an access token instead of interactive login.↗/writing-guidelinesReviews documentation and prose against Vercel's writing handbook and lists violations by line.↗
Summary by trendhub. The skill itself lives in vercel-labs/agent-skills/skills/react-best-practices by Vercel Labs (MIT); read the full, current text there.