Skills Prompts

Popular categories

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

  1. 1
    Match 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.

  2. 2
    Start with high-impact rules

    Critical categories like eliminating waterfalls and bundle optimization are considered before lower-priority JavaScript tweaks.

  3. 3
    Open the specific rule file

    For each relevant rule the agent reads its file under rules/ to see the wrong pattern and the preferred one.

  4. 4
    Apply 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-skills

Commands 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

Also in this pack

All 9 skills →

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.