react-performance
Skill3 starsChanged 8 months agoMITView on GitHub
Use when optimizing React component rendering, fixing Core Web Vitals (LCP, INP, CLS), reducing bundle size, diagnosing re-renders, a store update under a large tree, code splitting, memoization decisions, Server Component patterns, or profiling React apps. Covers React 19, React Compiler, useTransition, useDeferredValue, useEffectEvent, Activity, Suspense, hydration mismatches, and Next.js optimization.
18 other projects use a version of this.
Adopted by
Most recently taken up by
- Lu1sDV/skillsmdtheir own version, first seen Nov 8, 2026
- ahmadvahidi/skill-atlastheir own version, first seen Nov 8, 2026
- conjurer-rich/skillstheir own version, first seen Oct 25, 2026
- renepf/claude-skillstheir own version, first seen Oct 25, 2026
- davidanthonyn/claude-skillstheir own version, first seen Oct 20, 2026
- Ronnasayd/aipptheir own version, first seen Oct 20, 2026
Used with
Projects with it also use orch-pipeline, parallel-execution-optimizer 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.
renepfSkillorch-pipeline
Shared orchestration engine for the orch-* skill family. Defines the gated Research-Plan-TDD-Review-Commit pipeline, the size classifier, the agent map, and the two human gates that the orch-* operation skills delegate to. Not usually invoked directly.
Also in 3 projects that use this
marcusgollSkillparallel-execution-optimizer
Identify and execute independent operations in parallel for 3-5x speedup. Auto-analyzes task dependencies, groups into batches, launches parallel Task() calls. Applies to /optimize (5 checks), /ship pre-flight (5 checks), /implement (task batching), /prototype (N screens). Auto-triggers when detecting multiple independent operations in a phase.
Also in 4 projects that use this
ronmkrSkillvite-patterns
Vite build tool patterns including config, plugins, HMR, env variables, proxy setup, SSR, library mode, dependency pre-bundling, and build optimization. Activate when working with vite.config.ts, Vite plugins, or Vite-based projects.
Also in 4 projects that use this
RojiosSkilldefi-amm-security
Security checklist for Solidity AMM contracts, liquidity pools, and swap flows. Covers reentrancy, CEI ordering, donation or inflation attacks, oracle manipulation, slippage, admin controls, and integer math.
Also in 3 projects that use this
RojiosSkillsecurity-bounty-hunter
Hunt for exploitable, bounty-worthy security issues in repositories. Focuses on remotely reachable vulnerabilities that qualify for real reports instead of noisy local-only findings.
Also in 4 projects that use this
renepfSkillplan-orchestrate
Read a plan document, decompose it into steps, design a per-step agent chain from the ECC catalogue, and emit ready-to-paste /orchestrate custom prompts. Generative only — never invokes /orchestrate itself. Use when the user has a multi-step plan and wants to drive it through orchestrate without composing chains by hand.
Also in 3 projects that use this
Other versions18 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 18
- s-hiraoku/synapse-a2a★ 17same name
- wpank/ai★ 11same name
- gongyijie85/dsh-ecc★ 8same name
- jscott3201/yet-more-skills★ 4same name
- nek1987/auto-agent-harness★ 4same name
- Lu1sDV/skillsmd★ 2same name
- badri-ravi/skills★ 1same name
- conjurer-rich/skills★ 1same name
- Evan-Kim2028/agent-skills★ 1same name
- NISTALTALSON/essential-claude-skills★ 1same name
8 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository17 other files it gives its agents.
- api-securitySkill
- ascii-artSkill
- code-readabilitySkill
- gotchasSkill
- llm-agent-securitySkill
- nextjs-app-routerSkill
- plain-docsSkill
- product-marketingSkill
- prompt-rewriteSkill
- react-testingSkill
- seoSkill
- spa-performanceSkill
- tailwind-design-systemSkill
- typescript-safetySkill
- ux-copySkill
- wcag-accessibilitySkill
- webgpuSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 18 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 45
Before prescribing an API, inspect the app's installed React/Next versions, bundler and Compiler configuration.
- Distinctive: line 105
When reviewing code, watch for these performance killers:
“Common” is measured: kept by at least 6 in 10 of the 18 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
React Performance
Comprehensive React performance guidance covering measurement, rendering optimization, bundle size, Core Web Vitals, and Server Component patterns. Verified against React docs and Web Vitals specifications.
First principle: Measure before you optimize. This skill teaches you to find problems before fixing them.
Contents
- Architecture Overview
- Quick Reference
- Decision Matrix: Which Optimization?
- Choose a proportional fix
- Anti-Patterns Checklist
Architecture Overview
[Diagnose]
├── React DevTools Profiler (component render times)
├── Chrome Performance Panel (main thread activity)
├── web-vitals library (LCP, INP, CLS in production)
└── Bundle analyzer (what's in the bundle)
↓
[Identify Root Cause]
├── Unnecessary re-renders? → Memoization / state colocation
├── Slow initial load? → Code splitting / Server Components
├── Janky interactions? → useTransition / useDeferredValue
├── Layout shifts? → Image/font optimization
└── Large bundle? → Dynamic imports / tree shaking
↓
[Fix — Least Invasive First]
├── 1. Restructure components (children pattern, local state)
├── 2. Consider incremental Compiler adoption if supported and justified
├── 3. Use concurrent features (transitions, deferred values)
├── 4. Move work to Server Components
├── 5. Code split heavy dependencies
└── 6. Manual memo/useMemo/useCallback (last resort)Before prescribing an API, inspect the app's installed React/Next versions, bundler and Compiler configuration. Preserve the project's supported setup; an optimization task is not automatic authorization to enable a compiler or change frameworks. Source checks are scoped in SOURCES.md.
Quick Reference
| Need to... | See |
| Measure performance before optimizing | Profiling and Measurement |
| Fix unnecessary re-renders | Rendering Optimization |
| Reduce JavaScript bundle size | Bundle Optimization |
| Fix LCP, INP, or CLS scores | Core Web Vitals |
| Decide Server vs Client Components | Server Components |
| Handle large lists and data sets | Data and Lists |
| Optimize images, fonts, and media | Assets |
| Decide when React Compiler handles it | React Compiler |
Decision Matrix: Which Optimization?
"My page loads slowly"
| Symptom | Likely Cause | Fix | Resource |
| LCP > 2.5s, large image | Unoptimized hero image | Measure image discovery/size; choose version-supported loading hints | assets |
| LCP > 2.5s, text content | Render-blocking JS | Server Components, code split | server-components, bundle |
| LCP > 2.5s, font flash | Font loading delay | next/font | assets |
| TTFB > 800ms | Slow data fetching | Parallel fetches, streaming | server-components |
| Large client JS bundle | Too much client code | Measure with next analyze, then split or tree-shake | bundle |
"My page feels janky/unresponsive"
| Symptom | Likely Cause | Fix | Resource |
| INP > 200ms on typing | Heavy re-renders on input | useTransition, state colocation | rendering |
| INP > 200ms on click | Long task in the handler | scheduler.yield(), or a worker | web-vitals |
| INP > 200ms on navigation | Route transition re-renders | useTransition for navigation | rendering |
| Scrolling stutter | Large list rendering | Virtualization | data-and-lists |
| Input lag | Context re-rendering entire tree | Split context, selector pattern | rendering |
| Input loses focus, state resets or an animation restarts on each render | Component declared inside another component, so React remounts it | Declare it at module top level, pass props | rendering |
| Effect tears down and re-subscribes on every render | Object, function or read-only value in its dependencies | Depend on primitives or a derived boolean; useEffectEvent for values only read when it fires | rendering |
| Switching tabs loses state or remounts slowly | Hidden panel is unmounted | <Activity mode="hidden"> | rendering |
| Slow first interaction after load, hydration error in console | Server HTML and first client render differ | Make them match; client-only parts after hydration | server-components |
"Layout is jumping around"
| Symptom | Likely Cause | Fix | Resource |
| CLS > 0.1, images | Missing width/height | next/image or explicit dimensions | assets, web-vitals |
| CLS > 0.1, fonts | Font swap | next/font | assets |
| CLS > 0.1, dynamic content | Content inserted after load | Reserve space, Suspense fallback | web-vitals |
| CLS > 0.1, animations | Layout-triggering CSS | Use transform instead of top/left | web-vitals |
"Should I use memo/useMemo/useCallback?"
Inspect whether the affected component is actually compiled. Prefer measuring and fixing state placement or repeated work first. Existing memo/useMemo/useCallback can remain; do not remove them in bulk when enabling Compiler. If the compiler covers new code, manual memoization is often unnecessary, but it can still be useful for a measured case or an external identity contract. A stable callback can matter to an Effect or subscription even when a child is not wrapped in memo.
Choose a proportional fix
Keep code correct, identify the measured bottleneck, and choose the smallest effective change: component structure, memoization, deferred rendering, bundle splitting or server work where the framework supports it. Compiler adoption is a separate, incremental project choice with behavior/performance checks, not an official universal ordering of optimizations. Transitions schedule rendering; they do not split an expensive synchronous function into yielding work.
Anti-Patterns Checklist
When reviewing code, watch for these performance killers:
- Effect chains —
useEffectthat sets state triggering anotheruseEffect(derive during render instead) - Inline object/function props to
memo()-wrapped children (defeats memoization) - State too high — input state at page level re-rendering entire tree
useEffectfor derived state —setFiltered(items.filter(...))in effect (useuseMemoor calculate during render)- Missing
keyprop — or using array index as key for dynamic lists - Context monolith — one Provider with user + theme + cart + notifications
- Client Component boundary too high —
'use client'at layout/page level instead of leaf components - Heavy imports in client bundle — syntax highlighters, markdown parsers, date libraries not code-split
- Images without dimensions — causes CLS
onPaste={e => e.preventDefault()}on password fields — blocks password managers (also an a11y violation)- Manual memo/useMemo/useCallback without measuring first — adds complexity for no proven benefit
- Per-asset state or store hook under thousands of siblings. The cost is the walk from the root. Subscribe in an effect and write the DOM. See rendering.md.
new ExpensiveThing()inuseRefinitializer — runs every render (use lazy init pattern)useState(expensive()). The call runs on every render. Pass() => expensive().- A component declared inside another component. It remounts on every parent render. Declare it at module level.
- App-wide setup in a mount Effect. It runs twice in development. Use a module-level flag or module top-level code.
- State set after
awaitinsidestartTransition. It is not a transition. Wrap it in anotherstartTransition.
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
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.

