Skills DirectoryCurated open-source Skills from GitHub

react-best-practicescommit dc8367e · v1.0.0SKILL.md · Code Standards

Vercel React Best Practices

Vercel's React and Next.js performance guide: 70 rules in 8 categories, ordered by impact, for writing and refactoring code.

npx skills add vercel-labs/agent-skills --skill vercel-react-best-practices
Permissions
  • read-repo
  • write-files
  • shell
  • network
Compatible with
Any SKILL.md agent
GitHub
33.3k
Source
Official · Vercel Labs
Status
Scan passed
License
MIT

Core rule

Apply rules in order of impact, starting with the two CRITICAL categories: eliminating waterfalls and reducing bundle size.

Execution Phases

  1. Phase 01Eliminate waterfalls

    Run independent work with Promise.all, move await into the branches that need it, and stream with Suspense.

  2. Phase 02Shrink the bundle

    Import directly instead of via barrel files, load heavy components with next/dynamic, and defer third-party scripts until after hydration.

  3. Phase 03Server and data fetching

    Deduplicate with React.cache() and LRU caches, minimise data sent to client components, and use SWR for client-side deduplication.

  4. Phase 04Rendering and JS tuning

    Cut unnecessary re-renders, tune rendering and JavaScript hot paths, and consider advanced patterns last.

  5. Phase 05Read rule files

    For detail, read the matching file under rules/ for incorrect and correct examples, or the compiled AGENTS.md.

Permissions (summarised from SKILL.md)

CapabilityNeededDetails
File writesRequiredWrites or refactors React/Next.js code following the rules.
Command executionNot requiredA rules reference; it does not call for running commands.
Network outboundNot requiredRule files ship with the skill; no network access needed.

SKILL.md frontmatter (YAML)

SKILL.md frontmatter (YAML)commit dc8367e · v1.0.0
---
name: vercel-react-best-practices
description: React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
license: MIT
metadata:
  author: vercel
  version: "1.0.0"
---

Related skills

A rule scan cannot catch every risk. Read this skill's SKILL.md and check its permissions before installing.