Skip to content
HUIAHUB

vercel-labs/agent-skills/skills/react-best-practices

Vercel React performance rules

React and Next.js performance guidelines from Vercel Engineering, for writing, reviewing or refactoring React and Next.js code.

Agent skillAgent skills

What Vercel React performance rules does

This skill gives the agent 70 performance rules for React and Next.js, written by Vercel Engineering. They sit in eight categories ranked by impact. Eliminating async waterfalls and cutting bundle size are marked critical, followed by server-side performance, client-side data fetching, re-renders, rendering, JavaScript micro-optimizations and, last, advanced patterns. The agent applies them when it writes components or pages, adds data fetching, reviews code for performance problems, refactors existing code, or works on bundle size and load time.

SKILL.md is a quick index with one line per rule and an ID prefix such as async- or bundle-. For detail, the agent opens the matching file in rules/. Each rule explains why it matters and pairs an incorrect code example with a corrected one, often with a link to React, Next.js or Vercel documentation. AGENTS.md holds every rule compiled into one document. Typical rules: run independent work with Promise.all(), import from source files instead of barrel files, check authentication inside each Server Action, and use React.cache() to deduplicate work within a request.

The SKILL.md presents the set as a guide for automated refactoring and code generation, so the output is code or review feedback that follows these rules.

Install

npx skills add vercel-labs/agent-skills

Read the security check below before you run it. The repository's own instructions win if they differ.

Security check

What the skill's files do, from reading them. A flag that nobody has checked yet says "Not checked", never "No".

Runs scripts
No
Uses the network
Yes
Installs hooks
No
Asks for secrets
No

Checked at commit 1a2c79d on 2026-11-05. The folder holds SKILL.md, a compiled AGENTS.md, a README, metadata.json and 72 Markdown files under rules/ (70 rules plus a section list and a template). None of them are scripts, and there are no hooks or secret variables. The scan marks network use. SKILL.md has no URLs of its own, but the rule files link to react.dev, nextjs.org, vercel.com and other documentation an agent may open. One rule suggests npx svgo for shrinking SVG files, and the folder README lists pnpm build commands for maintainers. Before installing, skim the rules the agent will apply and review its code changes as usual.

Scan details: SKILL.md instructions include web requests or URLs to fetch. Checked at commit 1a2c79d4e6c4.

Use cases

  • Review a React or Next.js component for performance problems.
  • Remove sequential awaits and data-fetching waterfalls in server code.
  • Shrink bundles with direct imports, dynamic imports and deferred third-party code.
  • Refactor existing React code against a list of rules ranked by impact.

Limitations

  • The folder holds guidance only: no scripts, linters or automated checks.
  • Several rules depend on Next.js features such as `next/dynamic` and `after()`.
  • Some rules note that React Compiler makes manual memoization or JSX hoisting unnecessary.
  • The repository README and metadata.json say 40+ rules, while the folder holds 70.

Sources