React and Next.js performance rules

Gives the agent Vercel's 70 React and Next.js performance rules, ranked by impact: request waterfalls, bundle size, server work, re-renders, rendering. Use when writing, refactoring or reviewing React or Next.js code for speed.

CodingPack: Vercel skillslinkreact-best-practices
Author
Source
vercel-labs/agent-skills/skills/react-best-practices @ 1a2c79d
License
MIT

About this skill

What it does

The skill is Vercel Engineering's rulebook for fast React and Next.js code: 70 rules in eight categories, ranked by impact. Two categories are marked critical. Request waterfalls: start independent work together with Promise.all, move an await into the branch that needs it, stream with Suspense. Bundle size: import directly instead of through barrel files, load heavy components with next/dynamic, load analytics after hydration. Then come server work (authenticated server actions, React.cache() per request, an LRU cache across requests, after() for non-blocking work), client fetching, re-renders, rendering, JavaScript micro-optimizations and a few advanced patterns.

SKILL.md is only the index, one line per rule. Each rule has a file in rules/ with the reason, a wrong and a right example and references; the agent opens the ones the task touches. AGENTS.md (about 100 KB) compiles them all. Some rules name libraries, such as SWR and better-all.

When to use it, and when not

Use it while writing or refactoring components, pages, data fetching and server actions in React or Next.js, and for a performance-minded review of that code.

The rules are about code shape, not measurements: there is no profiling step, and the skill will not tell you which page is slow. The js- rules are rated low to medium impact and are meant for hot paths; elsewhere they add churn rather than speed. For React Native this pack has a separate skill.

How to run it

We do not copy this skill: its frontmatter says MIT, but the repository ships no licence text to put beside a copy. Install it from Vercel's repository with the button to the source. The README there uses the skills.sh installer: npx skills add vercel-labs/agent-skills offers the whole collection to pick from, --skill vercel-react-best-practices takes only this one. The skill's name is vercel-react-best-practices, not the folder name, so call it that:

  • Claude Code: /vercel-react-best-practices, or ask for the skill by name.
  • Codex: $vercel-react-best-practices.
  • Cursor: type / in the Agent chat and pick vercel-react-best-practices.

Example: /vercel-react-best-practices Review app/dashboard/page.tsx for waterfalls and bundle size, worst first.

How it differs from similar skills

Performance review and Performance optimization work from evidence on any stack, with a cost estimate per finding or a measure-fix-remeasure loop; this skill is a fixed React checklist with code examples. Web performance audit measures a live page through Chrome DevTools MCP. Vercel cost and performance tuning starts from production metrics and can cite this skill's rules by name.

Install

This skill is not copied to the catalog: the author's repository has no licence text. Install it from there.

Open the source

Connect through AnyModel API

This skill runs on whatever model your agent uses. Point Claude Code, Codex or Cursor at AnyModel to run it on Claude, GPT, Gemini and more with one key — pay per token, no subscription.

More from the pack Vercel skills

React composition patterns

Applies eight Vercel rules that replace boolean props with compound components, provider-held state and explicit variants, plus React 19 ref and use() changes. Use when a component has too many flags or when designing a component library.

React Native best practices

Applies Vercel's React Native and Expo rules: virtualized lists, transform and opacity animations, native navigators, expo-image, state, monorepo setup. Use when building or speeding up a mobile app or reviewing React Native code.

React view transitions

Implements animations with React's View Transition API: shared element morphs, Suspense reveals, list reorder and directional route slides, with CSS recipes and Next.js integration. Use when adding page or state transitions to a React or Next.js app.

Deploy to Vercel, Vercel Labs

Deploys a project to Vercel as a preview, choosing git push, CLI deploy, linking first or a temporary deploy without an account by the project's state, and returns the URL. Use when asked to deploy an app and get a link.

Vercel CLI with tokens

Runs the Vercel CLI from an access token instead of a browser login: finds the token, deploys previews, manages env vars, logs and domains, keeps the token out of command flags. Use when working with Vercel from a non-interactive shell.

Vercel cost and performance tuning

Audits a deployed Vercel project for cost and performance: collects metrics first, picks candidates by fixed thresholds, inspects only flagged routes and returns verified, cited recommendations. Use when cutting a Vercel bill or fixing slow routes.

Web Interface Guidelines review

Reviews UI code against Vercel's Web Interface Guidelines, fetched fresh on each run, and lists findings as file:line: accessibility, focus, forms, animation, typography, images, performance. Use when checking components or pages before a pull request.

Writing Guidelines review

Reviews docs and prose against Vercel's writing handbook, fetched fresh on each run, and lists findings as file:line: voice, structure, headings, code samples, units, typography. Use when checking English docs before publishing.