Skip to content
Coding

React Performance

Review React and Next.js performance by starting with waterfalls and bundle costs.

Install with Skills CLI
npx skills add vercel-labs/agent-skills --skill vercel-react-best-practices

What it does

A React application can feel slow for reasons that are not visible in one component. This skill organizes performance guidance so the agent investigates expensive data flows and shipped code before spending time on small rendering changes.

What changes after install

  • Prioritizes asynchronous waterfalls and bundle size before lower-impact micro-optimizations.
  • Provides separate rules for server work, client fetching, rendering, and JavaScript patterns.
  • Links individual recommendations to supporting rule files with contrasting examples.

Install

Run this command with Node.js 22.20 or later and select your agent in the Skills CLI.

Install with Skills CLI
npx skills add vercel-labs/agent-skills --skill vercel-react-best-practices

Before using React Performance

  • Give the agent access to the React or Next.js files under review and the project’s dependency versions. Keep the bundled rules available to check recommendations against the actual application.

Read the reviewed setup instructions for the selected workflow.

When to use it

  • Reviewing React or Next.js code with an identified performance problem.
  • Refactoring data loading or heavy imports while preserving page behavior.

When not to use it

  • Applying React-specific patterns to a static site that does not use React.
  • Claiming a performance improvement without measuring the relevant user interaction.

Use it on a defined performance problem

Suppose a Next.js product page waits for several independent data requests before showing useful content. Give the agent the route, the data-loading code, the framework version, and a trace or reproduction of the delay. Ask it to identify which requests depend on each other before introducing concurrency. Independent work may be started together; a request that needs another result still has a real dependency.

The upstream rules group recommendations by likely impact. Waterfalls and unnecessary bundle weight receive attention before small JavaScript changes. This makes the skill a useful review aid when an agent is otherwise inclined to add memoization everywhere without first locating the expensive work.

Read the supporting rules

The skill folder contains individual rule documents and a compiled guide. Keep these files with SKILL.md: the short entry is an index to more detailed examples, not the whole reference. Relevant areas include client data fetching, server caching, serialization between server and client components, rerenders, and loading optional code only when it is needed.

Preserve application semantics

Before changing caching or concurrency, identify authentication boundaries, request-specific data, and the required freshness of a result. Before replacing imports, confirm the dependency still builds and exports the expected API. The source offers implementation guidance, not a guarantee that a particular change is appropriate for your app.

Choose React Composition instead when the primary problem is an inflexible component API. Choose this skill when the question concerns data flow, shipped code, or rendering cost. Record before-and-after measurements before calling an optimization successful; SkillDex has reviewed the source, not benchmarked this package.

FAQ

Does this skill automatically benchmark my application?
No. It provides code guidance; use your application measurements and suitable profiling tools to establish the actual effect.
Should every recommendation be applied at once?
No. Select rules that match the observed problem and framework version, then verify each change.