agentleFS
iadr-deviadr-dev/colab/skills/coding/vercel-react-best-practices/SKILL.md

vercel-react-best-practices

Skill2 starsChanged 7 months agoMITView on GitHub

Comprehensive performance and architecture optimization for React and Next.js. Use this for code reviews, refactoring, or building new components.

176 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use dep-refs, feature-boundary-planner and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • betacatslingSkill

    dep-refs

    Use when needs to inspect TypeScript export references in the z-code workspace, list exports from a file, verify whether an export is unused before deletion, investigate who imports a symbol during refactors, or combine pnpm knip unused-export results with pnpm dep:refs symbol-level reference tracing.

    Also in 5 projects that use this

  • betacatslingSkill

    feature-boundary-planner

    Map a ZCode behavior change to current UI surfaces, state owners, protocol commands, persistence, and validation. Use for impact analysis, product-boundary planning, or an implementation handoff grounded in the checked-out source.

    Also in 5 projects that use this

  • VercelSkill

    next-upgrade

    Upgrade Next.js to the latest version following official migration guides and codemods

    Also in 12 projects that use this

  • SentrySkill

    vercel-composition-patterns

    Also in 124 projects that use this

  • Cartograf666Skill

    architecture-governance

    Bootstrap, document, enforce, and review a project's architecture through layer responsibilities, dependency direction, architecture manifests, legacy baselines, Change Envelopes, cross-layer approval policy, and deterministic architecture checks. Use when starting a project, auditing an existing codebase, planning cross-layer work, preventing architecture erosion, reviewing structural changes, or deciding whether implementation may expand into another layer.

    Also in 5 projects that use this

  • VercelSkill

    next-cache-components

    Next.js 16 Cache Components - PPR, use cache directive, cacheLife, cacheTag, updateTag

    Also in 17 projects that use this

  • +3 more from vercel-labs

The file

Files
SKILL.md

vercel-react-best-practices

Optimizes React and Next.js applications using Vercel Engineering's 70+ rules across 8 categories.

Phase 1: Audit & Identify

Scan the codebase for common performance bottlenecks and anti-patterns.

  • Tools: grep_search or rg for specific hooks (useEffect, useState), Server Components, and Layout patterns.
  • Focus: RSC vs. Client Component boundaries, hydration mismatches, and waterfall fetches.

Phase 2: Category Analysis

Evaluate the code against these 8 core categories:

  1. Performance: Bundle size, re-renders, and memoization.
  2. RSC Optimization: Minimizing Client Component usage, data fetching patterns.
  3. Hydration: Preventing mismatches, using Suspense correctly.
  4. Data Fetching: Using fetch in RSC, cache tags, and revalidation.
  5. State Management: Avoiding prop drilling, choosing the right hook.
  6. Form Handling: Server Actions vs. traditional forms.
  7. Routing: Layout vs. Page structure, segment config.
  8. Security: Sanitizing inputs, CSRF protection in Server Actions.

Phase 3: Severity Ranking

Assign a priority to each finding:

  • P0 (Critical): Hydration errors, security gaps (missing auth in Server Actions).
  • P1 (High): Large bundle size regressions, blocking waterfalls.
  • P2 (Medium): Suboptimal hook usage, minor re-render issues.
  • P3 (Low): Style improvements, naming conventions.

Phase 4: Recommendation

Propose specific code changes using the "Fix it" or "Refactor it" pattern. Explain the "Why" behind each change (e.g., "Moving this to an RSC reduces client bundle by 20KB").

References

FilePurpose
rsc-checklist.mdServer Component best practices
performance-rules.mdSpecific React performance rules

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.