About this skill
React Performance Rules
Seventy concrete rules for fast React and Next.js code, ordered by how much they matter, that your agent applies while it writes and checks while it reviews. Request waterfalls and bundle size come first because they cost the most; micro-optimizations come last so the agent does not waste your time on them. Each rule is its own file with the reason it matters, an incorrect example and a correct one.
How it works. Install it and your agent loads it whenever it works on React components, Next.js pages, data fetching or bundle size. It reads the quick reference, then opens only the rule files it needs. Ask for a review (/react-performance-rules review app/dashboard) and it switches to review mode: a table of findings with rule, file and line, impact and a one-line explanation, plus a score out of 100 with the formula shown. It fixes only when you ask, one rule at a time, running your type check, tests and build after each.
What is covered. Eliminating waterfalls (Promise.all, deferred awaits, Suspense streaming), bundle size (barrel imports, dynamic imports, deferring third-party scripts), server performance (React.cache, LRU caches, RSC serialization, after()), client data fetching, re-renders, rendering, plain JavaScript hot paths and a few advanced patterns.
Based on react-best-practices by Vercel Engineering (MIT): https://github.com/vercel-labs/agent-skills
What we changed
- Added a review mode with a findings table and a transparent score (new text, marked in
NOTICE.md). - Renamed the skill and its title, normalized frontmatter to the SKILL.md spec, and renamed the compiled guide from
AGENTS.mdtocompiled-guide.mdso it is never picked up as project instructions. Fixed three links in that guide that pointed outside therules/folder. - Added attribution (
NOTICE.md,LICENSES/). The 70 rules are copied unchanged. - License note: the upstream repo states MIT in its README and skill frontmatter but has no LICENSE file; details in
NOTICE.md.
Checked against
Claude Code 2.1.317 (desktop app, Claude Opus 5.5), 2026-11-07. Installed under .claude/skills/react-performance-rules/, loaded from SKILL.md and run end to end on a Next.js dashboard route with a seeded request waterfall, a whole-lodash import and derived state in an effect: review mode produced a six-row table and a score of 62/100. All 70 rule files resolved; three links in the compiled guide were fixed, and the review-mode rules were tightened (NOTICE.md). The example output on this page is from that run, shortened. Not yet checked: automatic triggering from the skill description in a fresh session (the run started from an explicit request), and Codex, Cursor, GitHub Copilot and Gemini CLI, which read the same SKILL.md format but have not been run.
How to install
Copy the files/ folder of the download to either location in your project:
.agents/skills/react-performance-rules/(Codex, Cursor, Copilot, Gemini CLI and others that read.agents/skills).claude/skills/react-performance-rules/(Claude Code)
Or download the zip from this page and unpack it there.
Not a fit
React Native, and non-React frameworks (Vue, Svelte, Angular). Some rules assume the Next.js App Router; on other setups the agent should skip those.
Not affiliated with Vercel. React and Next.js are named to describe compatibility.
