Agent skill

Vercel React Best Practices

by gambitph in gambitph/Stackable

React performance optimization guidelines from Vercel Engineering.

MITAuto-check passedFrontend & Design

Install Vercel React Best Practices

skills CLI
$ npx skills add gambitph/Stackable --skill vercel-react-best-practices -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install gambitph/Stackable vercel-react-best-practices --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/gambitph/Stackable.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.cursor/skills/vercel-react-best-practices .claude/skills/vercel-react-best-practices && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
vercel-react-best-practices
GitHub stars
350
Token cost
~2k tokens
SKILL.md length
763 words
Files
76
Skills in repo
18
Repo updated
First seen
Licence
MIT

At a glance

React performance optimization guidelines from Vercel Engineering.

  • Works in 8 steps: Eliminating Waterfalls (CRITICAL) → Bundle Size Optimization (CRITICAL) → Server-Side Performance (HIGH) → …
  • Refactoring React UI (Ahentic sidebar under src/admin/js/sidebar/)
  • SKILL.md covers Ahentic / WordPress scope, When to Apply, Rule Categories by Priority and Quick Reference, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Vercel React Best Practices is an agent skill from gambitph/Stackable. React performance optimization guidelines from Vercel Engineering. Use when writing, reviewing, or refactoring React UI (Ahentic sidebar under src/admin/js/sidebar/), data fetching, bundle size, re-renders, or load-time improvements. Prefer React client rules; skip Next.js/RSC-only guidance in this WordPress plugin.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 76 other files (for example `AGENTS.md`, `README.md` and `metadata.json`).

It sits in Frontend & Design, covering React components, Web performance and Performance optimization. It works with Vercel, React, WordPress and Next.js. The repository describes itself as: Page Builder Blocks for WordPress. An Amazing Block Library for the new WordPress Block Editor (Gutenberg). The licence is MIT.

When your agent uses it

  • Refactoring React UI (Ahentic sidebar under src/admin/js/sidebar/)
  • Load-time improvements

Example prompts

  • “/vercel-react-best-practices”

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Eliminating Waterfalls (CRITICAL)
  2. Bundle Size Optimization (CRITICAL)
  3. Server-Side Performance (HIGH)
  4. Client-Side Data Fetching (MEDIUM-HIGH)
  5. Re-render Optimization (MEDIUM)
  6. Rendering Performance (MEDIUM)
  7. JavaScript Performance (LOW-MEDIUM)
  8. Advanced Patterns (LOW)

What it can do on your machine

Read from SKILL.md and the folder at commit 5c13d80. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Vercel React Best Practices loads about 2k tokens when it runs. Until then it costs about 86 tokens; SKILL.md has 763 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~86
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from gambitph/Stackable at commit 5c13d80, republished under its MIT licence (© gambitph). 763 words, ~1,969 tokens.

Download SKILL.mdSave it as .claude/skills/vercel-react-best-practices/SKILL.md (or your agent's skills folder). This skill also uses 75 other files; get the full folder from GitHub.
name
vercel-react-best-practices
description
React performance optimization guidelines from Vercel Engineering. Use when writing, reviewing, or refactoring React UI (Ahentic sidebar under src/admin/js/sidebar/), data fetching, bundle size, re-renders, or load-time improvements. Prefer React client rules; skip Next.js/RSC-only guidance in this WordPress plugin.
license
MIT
metadata.author
vercel
metadata.version
1.0.0

Vercel React Best Practices

Comprehensive performance optimization guide for React and Next.js applications, maintained by Vercel. Contains 70 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.

Ahentic / WordPress scope

This repo is a WordPress plugin, not a Next.js app:

  • UI uses @wordpress/element (React) and plain .js (JSX via wp-scripts) — not TypeScript, not the Next.js App Router.
  • Prefer rules under rerender-, rendering-, js-, bundle-, client-, and applicable async- categories.
  • Do not apply Next.js / RSC / server-actions guidance (next/dynamic, React.cache, server components, after(), App Router data fetching, etc.) unless the user explicitly asks about Next.js.
  • Defer to Ahentic project rules for WordPress packages, theming tokens, and sidebar architecture.

When to Apply

Reference these guidelines when:

  • Writing or reviewing Ahentic React sidebar components
  • Implementing client-side data fetching
  • Reviewing code for performance issues
  • Refactoring React UI for fewer re-renders or smaller bundles
  • Optimizing bundle size or load times

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Eliminating WaterfallsCRITICALasync-
2Bundle Size OptimizationCRITICALbundle-
3Server-Side PerformanceHIGHserver-
4Client-Side Data FetchingMEDIUM-HIGHclient-
5Re-render OptimizationMEDIUMrerender-
6Rendering PerformanceMEDIUMrendering-
7JavaScript PerformanceLOW-MEDIUMjs-
8Advanced PatternsLOWadvanced-

Quick Reference

1. Eliminating Waterfalls (CRITICAL)
  • async-cheap-condition-before-await - Check cheap sync conditions before awaiting flags or remote values
  • async-defer-await - Move await into branches where actually used
  • async-parallel - Use Promise.all() for independent operations
  • async-dependencies - Use better-all for partial dependencies
  • async-api-routes - Start promises early, await late in API routes
  • async-suspense-boundaries - Use Suspense to stream content
2. Bundle Size Optimization (CRITICAL)
  • bundle-barrel-imports - Import directly, avoid barrel files
  • bundle-analyzable-paths - Prefer statically analyzable import and file-system paths to avoid broad bundles and traces
  • bundle-dynamic-imports - Use next/dynamic for heavy components
  • bundle-defer-third-party - Load analytics/logging after hydration
  • bundle-conditional - Load modules only when feature is activated
  • bundle-preload - Preload on hover/focus for perceived speed
3. Server-Side Performance (HIGH)
  • server-auth-actions - Authenticate server actions like API routes
  • server-cache-react - Use React.cache() for per-request deduplication
  • server-cache-lru - Use LRU cache for cross-request caching
  • server-dedup-props - Avoid duplicate serialization in RSC props
  • server-hoist-static-io - Hoist static I/O (fonts, logos) to module level
  • server-no-shared-module-state - Avoid module-level mutable request state in RSC/SSR
  • server-serialization - Minimize data passed to client components
  • server-parallel-fetching - Restructure components to parallelize fetches
  • server-parallel-nested-fetching - Chain nested fetches per item in Promise.all
  • server-after-nonblocking - Use after() for non-blocking operations
4. Client-Side Data Fetching (MEDIUM-HIGH)
  • client-swr-dedup - Use SWR for automatic request deduplication
  • client-event-listeners - Deduplicate global event listeners
  • client-passive-event-listeners - Use passive listeners for scroll
  • client-localstorage-schema - Version and minimize localStorage data
Show full SKILL.md (357 more words)Show less
5. Re-render Optimization (MEDIUM)
  • rerender-defer-reads - Don't subscribe to state only used in callbacks
  • rerender-memo - Extract expensive work into memoized components
  • rerender-memo-with-default-value - Hoist default non-primitive props
  • rerender-dependencies - Use primitive dependencies in effects
  • rerender-derived-state - Subscribe to derived booleans, not raw values
  • rerender-derived-state-no-effect - Derive state during render, not effects
  • rerender-functional-setstate - Use functional setState for stable callbacks
  • rerender-lazy-state-init - Pass function to useState for expensive values
  • rerender-simple-expression-in-memo - Avoid memo for simple primitives
  • rerender-split-combined-hooks - Split hooks with independent dependencies
  • rerender-move-effect-to-event - Put interaction logic in event handlers
  • rerender-transitions - Use startTransition for non-urgent updates
  • rerender-use-deferred-value - Defer expensive renders to keep input responsive
  • rerender-use-ref-transient-values - Use refs for transient frequent values
  • rerender-no-inline-components - Don't define components inside components
6. Rendering Performance (MEDIUM)
  • rendering-animate-svg-wrapper - Animate div wrapper, not SVG element
  • rendering-content-visibility - Use content-visibility for long lists
  • rendering-hoist-jsx - Extract static JSX outside components
  • rendering-svg-precision - Reduce SVG coordinate precision
  • rendering-hydration-no-flicker - Use inline script for client-only data
  • rendering-hydration-suppress-warning - Suppress expected mismatches
  • rendering-activity - Use Activity component for show/hide
  • rendering-conditional-render - Use ternary, not && for conditionals
  • rendering-usetransition-loading - Prefer useTransition for loading state
  • rendering-resource-hints - Use React DOM resource hints for preloading
  • rendering-script-defer-async - Use defer or async on script tags
7. JavaScript Performance (LOW-MEDIUM)
  • js-batch-dom-css - Group CSS changes via classes or cssText
  • js-index-maps - Build Map for repeated lookups
  • js-cache-property-access - Cache object properties in loops
  • js-cache-function-results - Cache function results in module-level Map
  • js-cache-storage - Cache localStorage/sessionStorage reads
  • js-combine-iterations - Combine multiple filter/map into one loop
  • js-length-check-first - Check array length before expensive comparison
  • js-early-exit - Return early from functions
  • js-hoist-regexp - Hoist RegExp creation outside loops
  • js-min-max-loop - Use loop for min/max instead of sort
  • js-set-map-lookups - Use Set/Map for O(1) lookups
  • js-tosorted-immutable - Use toSorted() for immutability
  • js-flatmap-filter - Use flatMap to map and filter in one pass
  • js-request-idle-callback - Defer non-critical work to browser idle time
8. Advanced Patterns (LOW)
  • advanced-effect-event-deps - Don't put useEffectEvent results in effect deps
  • advanced-event-handler-refs - Store event handlers in refs
  • advanced-init-once - Initialize app once per app load
  • advanced-use-latest - useLatest for stable callback refs

How to Use

Read individual rule files for detailed explanations and code examples:

rules/async-parallel.md
rules/bundle-barrel-imports.md

Each rule file contains:

  • Brief explanation of why it matters
  • Incorrect code example with explanation
  • Correct code example with explanation
  • Additional context and references

Full Compiled Document

For the complete guide with all rules expanded: AGENTS.md

© gambitph, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 75 other files in .cursor/skills/vercel-react-best-practices of gambitph/Stackable.

  • SKILL.md
  • AGENTS.md
  • README.md
  • metadata.json
  • rules/_sections.md
  • rules/_template.md
  • rules/advanced-effect-event-deps.md
  • rules/advanced-event-handler-refs.md
  • rules/advanced-init-once.md
  • rules/advanced-use-latest.md
  • rules/async-api-routes.md
  • rules/async-cheap-condition-before-await.md
  • rules/async-defer-await.md
  • rules/async-dependencies.md
  • rules/async-parallel.md
  • rules/async-suspense-boundaries.md
  • rules/bundle-analyzable-paths.md
  • rules/bundle-barrel-imports.md
  • rules/bundle-conditional.md
  • rules/bundle-defer-third-party.md
  • … and 56 more

Open the folder on GitHubat commit 5c13d80

Compare with similar skills

Vercel React Best Practices next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Vercel React Best Practices compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Vercel React Best Practices this skillgambitph/Stackable350—~2kAutomated safety check: PassMIT
React Best Practicesryokun6/ryos1.3k—~2kAutomated safety check: PassMIT
React Performanceaffaan-m/ECC274k1 repos~4.5kAutomated safety check: PassMIT
Vercel React Best Practicessanity-io/sanity6.4k130 repos~1.6kAutomated safety check: PassMIT
React Best Practicesmajiayu000/spellbook286—~1.1kAutomated safety check: PassMIT
React Best Practicespoteto/noodle420—~1.4kAutomated safety check: PassMIT

Similar skills

  • React performance optimization guidelines from Vercel Engineering (vercel-labs/agent-skills).

    1.3k GitHub stars~2k tokensUpdated today
    Frontend & DesignAuto-check passed
  • React Performance

    affaan-m/ECC

    React and Next.js performance optimization patterns adapted from Vercel Engineering's React Best Practices (https://github.com/vercel-labs/agent-skills).

    274k GitHub starsUsed in 1 repo~4.5k tokens
    DevelopmentAuto-check passed
  • Official

    React and Next.js performance optimization guidelines from Vercel Engineering.

    6.4k GitHub starsUsed in 130 repos~1.6k tokens
    Frontend & DesignAuto-check passed
  • React Best Practices

    majiayu000/spellbook

    React and Next.js performance playbook distilled from Vercel Engineering guidance.

    286 GitHub stars~1.1k tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • React performance optimization guidelines. An agent skill from poteto/noodle.

    420 GitHub stars~1.4k tokensUpdated 6 mo ago
    Frontend & DesignAuto-check passed
  • React Best Practices

    shapeshift/web

    Comprehensive React and Next.js performance optimization guide with 40+ rules for eliminating waterfalls, optimizing bundles, and improving rendering.

    206 GitHub starsUsed in 1 repo~2k tokens
    DevelopmentAuto-check passed

More from gambitph/Stackable

All 18 skills in this repo
  • Wp Block Development

    gambitph/Stackable

    A skill your agent uses when developing WordPress (Gutenberg) blocks: block.json metadata, registerblocktype(frommetadata), attributes/serialization, supports, dynamic rendering…

    350 GitHub starsUsed in 3 repos~1.6k tokens
    Auto-check passed
  • Wp Block Themes

    gambitph/Stackable

    A skill your agent uses when developing WordPress block themes: theme.json (global settings/styles), templates and template parts, patterns, style variations, and Site Editor troubleshooting (style…

    350 GitHub starsUsed in 3 repos~985 tokens
    Auto-check passed
  • Wp Performance

    gambitph/Stackable

    A skill your agent uses when investigating or improving WordPress performance (backend-only agent): profiling and measurement (WP-CLI profile/doctor, Server-Timing, Query Monitor via REST headers)…

    350 GitHub starsUsed in 3 repos~1.5k tokens
    Auto-check passed
  • Wp Plugin Development

    gambitph/Stackable

    A skill your agent uses when developing WordPress plugins: architecture and hooks, activation/deactivation/uninstall, admin UI and Settings API, data storage, cron/tasks, security…

    350 GitHub starsUsed in 3 repos~999 tokens
    Auto-check passed
  • Wp Project Triage

    gambitph/Stackable

    A skill your agent uses when you need a deterministic inspection of a WordPress repository (plugin/theme/block theme/WP core/Gutenberg/full site) including tooling/tests/version hints, and a…

    350 GitHub starsUsed in 3 repos~371 tokens
    Auto-check passed
  • A skill your agent uses when reviewing WordPress plugins for GPL compliance, checking license headers or compatibility, evaluating upsell/freemium/trialware patterns, validating plugin naming or…

    350 GitHub starsUsed in 1 repo~1.6k tokens
    Auto-check passed

Questions about Vercel React Best Practices

What does Vercel React Best Practices do?

React performance optimization guidelines from Vercel Engineering. Vercel React Best Practices is an agent skill from gambitph/Stackable. React performance optimization guidelines from Vercel Engineering.

When should I use Vercel React Best Practices?

Vercel React Best Practices fits situations like: refactoring React UI (Ahentic sidebar under src/admin/js/sidebar/); load-time improvements.

How do I install Vercel React Best Practices in Claude Code?

Run `npx skills add gambitph/Stackable --skill vercel-react-best-practices -a claude-code`. Or copy the skill folder (.cursor/skills/vercel-react-best-practices in gambitph/Stackable) into .claude/skills/vercel-react-best-practices in your project. Claude Code loads it when a task matches its description.

How do I install Vercel React Best Practices in Codex?

Run `npx skills add gambitph/Stackable --skill vercel-react-best-practices -a codex`. Or copy the skill folder (.cursor/skills/vercel-react-best-practices in gambitph/Stackable) into .agents/skills/vercel-react-best-practices in your project. Codex loads it when a task matches its description.

Can I use Vercel React Best Practices in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add gambitph/Stackable --skill vercel-react-best-practices -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/vercel-react-best-practices, .gemini/skills/vercel-react-best-practices, .github/skills/vercel-react-best-practices and .opencode/skills/vercel-react-best-practices in your project.

What does Vercel React Best Practices need to run?

SKILL.md names no scripts, command-line tools or credentials: Vercel React Best Practices is instructions for the agent only.

Does Vercel React Best Practices access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Vercel React Best Practices safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Vercel React Best Practices use?

Vercel React Best Practices is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Vercel React Best Practices use?

About 2k tokens (SKILL.md is roughly 7.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Vercel React Best Practices?

Skills that share tags, products or a category with Vercel React Best Practices: React Best Practices (ryokun6/ryos, 1.3k stars), React Performance (affaan-m/ECC, 274k stars), Vercel React Best Practices (sanity-io/sanity, 6.4k stars) and React Best Practices (majiayu000/spellbook, 286 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Vercel React Best Practices?

gambitph (a GitHub organization) maintains it in gambitph/Stackable, which has 350 GitHub stars. The repository holds 18 skills in this directory. The repository was last updated on October 7, 2026.

Source: gambitph/Stackable on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.