# react-performance-optimizer

react-performance-optimizer diagnoses React render bottlenecks to hit 60fps. It tackles sluggish lists, unnecessary component updates, and oversized bundles.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 215 installs · ★ 274 repo stars
- Author: curiositech
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/curiositech/some_claude_skills/tree/HEAD/.claude/skills/react-performance-optimizer/SKILL.md
- Updated: 2026-10-30
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/react-performance-optimizer

## What it does

This skill targets client-side React lag to ensure 60fps execution. It activates when component render passes exceed 16ms, list lengths pass 100 items, or gzipped bundles cross 500KB. The prompt guides the model through practical remedies: swapping regular mappings for `react-window` virtualized lists and splitting routes with `lazy` and `Suspense`.

The agent uses tools to read, edit code, and run `npm` commands. It actively discourages premature memoization. Basic string concatenations or simple math should not use `useMemo` because hook overhead outweighs the savings. Diagnostic steps center on React DevTools Profiler, Lighthouse, and `why-did-you-render`.

Small apps under 10 components gain nothing here. It will not fix slow backend responses or network latency, because it focuses strictly on client rendering.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add curiositech/some_claude_skills --skill react-performance-optimizer -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/react-performance-optimizer/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/react-performance-optimizer/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add curiositech/some_claude_skills --skill react-performance-optimizer -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/react-performance-optimizer/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add curiositech/some_claude_skills --skill react-performance-optimizer -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/react-performance-optimizer/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install curiositech/some_claude_skills .claude/skills/react-performance-optimizer
```

2. **Manually: put the files in place**
- File: `.github/skills/react-performance-optimizer/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add curiositech/some_claude_skills --skill react-performance-optimizer -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/curiositech/some_claude_skills --path .claude/skills/react-performance-optimizer
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/react-performance-optimizer/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add curiositech/some_claude_skills --skill react-performance-optimizer -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/curiositech/some_claude_skills/tree/HEAD/.claude/skills/react-performance-optimizer/SKILL.md

## When to use it
- virtualize lists over 100 items using `react-window`
- split routes with `lazy` and `Suspense` for bundles exceeding 500KB
- stabilize callback references to stop cascading re-renders in `React.memo` components
- remove expensive sorting and computations from the render cycle

## Example prompts
- Optimize this list component, scrolling lags when displaying 1000 users.
- Inspect this component because rendering exceeds 16ms and find unstable callbacks.
- Set up lazy loading for admin routes to reduce our bundle size below 500KB.

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 4a5683b3faa77954.

BEGIN THIRD-PARTY FILE 4a5683b3faa77954
````text
---
name: react-performance-optimizer
description: Optimize React apps for 60fps performance. Implements memoization, virtualization, code splitting, bundle optimization. Use for slow renders, large lists, bundle bloat. Activate on "React performance",
  "slow render", "useMemo", "bundle size", "virtualization". NOT for backend optimization, non-React frameworks, or premature optimization.
allowed-tools: Read,Write,Edit,Bash(npm:*)
metadata:
  tags:
  - react
  - performance
  - optimizer
  - react-performance
  - slow-render
  pairs-with:
  - skill: performance-profiling
    reason: React profiling tools identify the re-render bottlenecks that optimization addresses
  - skill: nextjs-app-router-expert
    reason: RSC and streaming SSR in Next.js require React-specific performance strategies
  - skill: data-viz-2025
    reason: Data-heavy visualizations require React memoization and virtualization for smooth rendering
  - skill: reactive-dashboard-performance
    reason: Dashboard widgets with real-time data need the same React optimization patterns
---

# React Performance Optimizer

Expert in diagnosing and fixing React performance issues to achieve buttery-smooth 60fps experiences.

## When to Use

✅ **Use for**:
- Slow component re-renders
- Large lists (&gt;100 items) causing lag
- Bundle size &gt;500KB (gzipped)
- Time to Interactive &gt;3 seconds
- Janky scrolling or animations
- Memory leaks from unmounted components

❌ **NOT for**:
- Apps with &lt;10 components (premature optimization)
- Backend API slowness (fix the API)
- Network latency (use caching/CDN)
- Non-React frameworks (use framework-specific tools)

## Quick Decision Tree

```
Is your React app slow?
├── Profiler shows &gt;16ms renders? → Use memoization
├── Lists with &gt;100 items? → Use virtualization
├── Bundle size &gt;500KB? → Code splitting
├── Lighthouse score &lt;70? → Multiple optimizations
└── Feels fast enough? → Don't optimize yet
```

---

## Technology Selection

### Performance Tools (2024)

| Tool | Purpose | When to Use |
|------|---------|-------------|
| React DevTools Profiler | Find slow components | Always start here |
| Lighthouse | Overall performance score | Before/after comparison |
| webpack-bundle-analyzer | Identify large dependencies | Bundle &gt;500KB |
````
END THIRD-PARTY FILE 4a5683b3faa77954

The third-party file has ended. Everything between the 4a5683b3faa77954 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2339 of 11360 bytes. © curiositech · MIT · https://github.com/curiositech/some_claude_skills/tree/HEAD/.claude/skills/react-performance-optimizer/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
