/devkit-stack:react-performancefrom devkit-stack
Performance rules for React and Next.js from Vercel - eliminating waterfalls, bundle size, server-side rendering and caching, client data fetching, re-renders, rendering and JavaScript hot paths. Use when writing React components or Next.js pages, implementing data fetching, optimizing bundle size or load time, or reviewing React code for performance issues.
Ships in devkit-stack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Comprehensive performance optimization guide for React and Next.js applications, maintained by Vercel. Contains 45 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.
Reference these guidelines when:
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Eliminating Waterfalls | CRITICAL | async- |
| 2 | Bundle Size Optimization | CRITICAL | bundle- |
| 3 | Server-Side Performance | HIGH | server- |
| 4 | Client-Side Data Fetching | MEDIUM-HIGH | client- |
| 5 | Re-render Optimization | MEDIUM | rerender- |
| 6 | Rendering Performance | MEDIUM | rendering- |
| 7 | JavaScript Performance | LOW-MEDIUM | js- |
| 8 | Advanced Patterns | LOW | advanced- |
async-defer-await - Move await into branches where actually usedasync-parallel - Use Promise.all() for independent operationsasync-dependencies - Use better-all for partial dependenciesasync-api-routes - Start promises early, await late in API routesasync-suspense-boundaries - Use Suspense to stream contentbundle-barrel-imports - Import directly, avoid barrel filesbundle-dynamic-imports - Use next/dynamic for heavy componentsbundle-defer-third-party - Load analytics/logging after hydrationbundle-conditional - Load modules only when feature is activatedbundle-preload - Preload on hover/focus for perceived speedserver-cache-react - Use React.cache() for per-request deduplicationserver-cache-lru - Use LRU cache for cross-request cachingserver-serialization - Minimize data passed to client componentsserver-parallel-fetching - Restructure components to parallelize fetchesserver-after-nonblocking - Use after() for non-blocking operationsclient-swr-dedup - Use SWR for automatic request deduplicationclient-event-listeners - Deduplicate global event listenersrerender-defer-reads - Don't subscribe to state only used in callbacksrerender-memo - Extract expensive work into memoized componentsrerender-dependencies - Use primitive dependencies in effectsrerender-derived-state - Subscribe to derived booleans, not raw valuesrerender-functional-setstate - Use functional setState for stable callbacksrerender-lazy-state-init - Pass function to useState for expensive valuesrerender-transitions - Use startTransition for non-urgent updatesrendering-animate-svg-wrapper - Animate div wrapper, not SVG elementrendering-content-visibility - Use content-visibility for long listsrendering-hoist-jsx - Extract static JSX outside componentsrendering-svg-precision - Reduce SVG coordinate precisionrendering-hydration-no-flicker - Use inline script for client-only datarendering-activity - Use Activity component for show/hiderendering-conditional-render - Use ternary, not && for conditionalsjs-batch-dom-css - Group CSS changes via classes or cssTextjs-index-maps - Build Map for repeated lookupsjs-cache-property-access - Cache object properties in loopsjs-cache-function-results - Cache function results in module-level Mapjs-cache-storage - Cache localStorage/sessionStorage readsjs-combine-iterations - Combine multiple filter/map into one loopjs-length-check-first - Check array length before expensive comparisonjs-early-exit - Return early from functionsjs-hoist-regexp - Hoist RegExp creation outside loopsjs-min-max-loop - Use loop for min/max instead of sortjs-set-map-lookups - Use Set/Map for O(1) lookupsjs-tosorted-immutable - Use toSorted() for immutabilityadvanced-event-handler-refs - Store event handlers in refsadvanced-use-latest - useLatest for stable callback refsPick the categories that match the task and read only those rule files (linked above). Each rule file contains: why it matters, an incorrect code example, a correct code example, and additional context and references. Category definitions: rules/_sections.md.
rules/_sections.md (opens in a new tab)rules/advanced-event-handler-refs.md (opens in a new tab)rules/advanced-use-latest.md (opens in a new tab)rules/async-api-routes.md (opens in a new tab)rules/async-defer-await.md (opens in a new tab)rules/async-dependencies.md (opens in a new tab)rules/async-parallel.md (opens in a new tab)rules/async-suspense-boundaries.md (opens in a new tab)rules/bundle-barrel-imports.md (opens in a new tab)rules/bundle-conditional.md (opens in a new tab)rules/bundle-defer-third-party.md (opens in a new tab)rules/bundle-dynamic-imports.md (opens in a new tab)rules/bundle-preload.md (opens in a new tab)rules/client-event-listeners.md (opens in a new tab)rules/client-swr-dedup.md (opens in a new tab)rules/js-batch-dom-css.md (opens in a new tab)rules/js-cache-function-results.md (opens in a new tab)rules/js-cache-property-access.md (opens in a new tab)rules/js-cache-storage.md (opens in a new tab)rules/js-combine-iterations.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub chacal88/devkit --plugin devkit-stack6 skills in this plugin
/neon-postgresPatterns for Neon serverless Postgres - pooled vs direct connections, Prisma and Drizzle integration, the serverless driver, database branching for preview environments and CI. Use when the project uses Neon, or when the user mentions serverless Postgres, database branching, per-preview databases, or Neon connection pooling./postgresPostgres best practices and schema design - query and index performance, connection pooling, RLS and privileges, locking, data access patterns, monitoring, plus PostgreSQL table design (data types, constraints, indexing, partitioning, JSONB). Use when writing, reviewing or optimizing SQL queries, designing or migrating a Postgres schema, or tuning database configuration./saas-multi-tenantDesigns and implements multi-tenant SaaS data isolation in PostgreSQL and TypeScript - shared-schema vs schema- or database-per-tenant, row-level security, tenant-scoped queries, and safe cross-tenant admin access. Use when building a SaaS where customers share a database, adding tenant_id to a single-tenant app, or when the user asks about tenant isolation or data leakage between tenants./threat-modelRepository-grounded threat modeling that enumerates trust boundaries, assets, attacker capabilities, abuse paths and mitigations, and writes a concise Markdown threat model. Use only when the user explicitly asks to threat model a codebase or path, enumerate threats or abuse paths, or do AppSec threat modeling - not for general architecture summaries, code review or non-security design./vitestReference for Vitest, the Vite-powered test framework with a Jest-compatible API - config, CLI, test/describe/expect APIs, hooks, mocking, snapshots, coverage, fixtures, concurrency, filtering, environments and type testing. Use when writing or debugging Vitest tests, mocking modules or timers, configuring coverage, or setting up Vitest projects.