- Home
- Skills
- Frontend & Web Apps
- React Performance Audit: Find Wasted Re-renders
Works with the AI Agents you already use
React Performance Audit: Find Wasted Re-renders
Finds the re-renders and wasted work that actually slow your React app, ranks them by impact and gives the smallest fix plus how to verify it.
$3
React Performance Audit: Find Wasted Re-renders
Example session with this skill installed
/react-perf audit src/ (the product list has about 5,000 items)
- Read your context and instructions
- Compiled the react performance audit
Setup: React 18.3 + Vite, plain Context, no React Compiler.
| Impact | File:line | Problem | Why it costs | Fix |
|---|---|---|---|---|
| 🔴 high | App.jsx:12, App.jsx:14, ProductList.jsx:5 | Context value {cart, setCart, currency, locale} and onAdd={(p) => …} are new objects every render; static and changing values share one context | Every keystroke gives the context a new value and every Row a new onAdd, so memo(Row) never skips: ~5,000 rows re-render per keystroke | Static currency/locale in their own constant context; onAdd = useCallback(p => setCart(c => [...c, p]), []) (also fixes a stale-closure bug) |
| 🔴 high | ProductList.jsx:6 | new Intl.NumberFormat(...) inside every row | Slow to construct; ~5,000 per keystroke | Create the formatter once and pass the formatted price |
| 🔴 high | ProductList.jsx:19 | 5,000 <li> without virtualization | Mounting and diffing thousands of nodes | react-window or @tanstack/react-virtual (~30 rows mounted) |
| 🔴 high | ProductList.jsx:11-18 | Filtered list copied into state by an effect, re-sorted on every query | Two renders per keystroke plus an O(n log n) sort that doesn't depend on the query | Sort once with useMemo + Intl.Collator, filter during render, optional useDeferredValue |
| 🟡 medium | ProductList.jsx:19 | key={i} on a filtered, sorted list | Keys point at different products after each filter | key={p.id} |
| 🟡 medium | SalesChart.jsx:6-9 | Effect with no dependency array and no cleanup | New Chart on every render ("Canvas is already in use") and intervals that pile up | Empty deps, return () => { chart.destroy(); clearInterval(id) } |
| 🟡 medium | App.jsx:3 | chart.js imported eagerly, used only after a click | ~60–70 KB gzipped in the main bundle | lazy(() => import("./SalesChart")) + Suspense |
How to verify: Profiler "Highlight updates" while typing one character (before: ~5,000 Row renders; after: only changed rows, 0 on "Add"); one commit per keystroke instead of two; document.querySelectorAll("li").length drops from ~5,000 to ~30.
Connects securely to your tools. The creator never sees your data.
About this skill
Type "/react-perf" (optionally with files or a folder) and your agent audits your components in a fixed order:
- Re-render cascades: inline objects/functions passed to memoized children or context providers, contexts that mix fast and static values, state kept too high.
- Expensive work in render: sorting/filtering/formatting large data every render, derived state synced with effects.
- Effects: missing or unstable dependencies, state set from effects, missing cleanup for timers and subscriptions.
- Lists: index keys on reorderable lists, long lists without virtualization.
- Loading: heavy libraries imported eagerly on routes that rarely use them.
It detects your React version, framework and whether the React Compiler is on, so it doesn't suggest memoization the compiler already does. You get a table ranked by impact (file:line, problem, why it costs, smallest fix) plus how to verify each high-impact fix with the React DevTools Profiler. It does not edit code unless you ask, and it never recommends blanket useMemo/useCallback.
Tested in Claude Code 2.1 on a React 18 + Vite store with ~5,000 products and 6 planted performance bugs: it found all 6 and also proposed virtualizing the list (see the sample output).
Unofficial. Not affiliated with Anthropic.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Frontend & Web Apps.
Static analysis of your code: it does not run your app or a real profiler, so confirm the gains with the verification steps it gives. Focused on React (web); React Native specifics are not covered.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed today
- Software
Git
Permissions
File Scopes
Reads your components and package.json; may run git diff/git status to find changed files. Does not write files unless you ask, no network access.