performance-audit

Audits React components for re-renders, memoization gaps, and bundle size impact.

5|9|Updated Mar 25, 2026
One-click install
npx skills add https://github.com/ajenchen/design-system --skill performance-audit-ajenchen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performance-audit
Source: https://github.com/ajenchen/design-system/tree/main/.agents/skills/performance-audit
Command: npx skills add https://github.com/ajenchen/design-system --skill performance-audit-ajenchen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? React components can pass type checks, linting, and visual review while still performing poorly in production due to excessive re-renders, broken memoization, and bloated bundles. This Skill detects those hidden performance issues before they surface in stakeholder demos or release builds. ## Core Features & Use Cases - Render & Re-render Analysis: Detects unnecessary re-renders, inline object/function props that break memoization, overly broad context values, and unstable list keys. - Memoization & Dependency Checks: Reviews useMemo, useCallback, and useEffect dependency arrays for stale closures, missing dependencies, and heavy computations that belong in useMemo. - Bundle Size Auditing: Flags full-library imports, lazy-loadable overlays, and duplicate dependencies, with an enforced bundle-size budget gate via npm run check:bundle-size. - Use Case: Before merging a new design-system component, run the audit to get a prioritized report of render issues, memoization gaps, and bundle impact, classified into engineering fixes (P2E) versus product trade-off decisions (P2H). ## Quick Start Ask the assistant to run a performance audit on a specific component or the whole design system to find re-render and bundle size problems.

Frequently Asked Questions about performance-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find unnecessary re-renders in React components?

Record a session with React DevTools Profiler and inspect the flame graph for components rendering without prop changes. Common causes include inline object or arrow-function props that break memoization, overly broad context values, and unstable list keys.

How to check bundle size impact of a React component?

Run a bundle analysis with vite build report or a bundle visualizer to see per-module contributions. Look for full-library imports like importing all of lucide-react, duplicate dependencies, and rarely used overlays that could be lazy-loaded with React.lazy.

Why does useEffect cause infinite loops in React?

Infinite loops happen when the dependency array contains objects or arrays recreated every render, so the effect re-fires continuously. Stabilize the dependency with useMemo or useCallback, or restructure the effect to depend on primitive values.

Does this audit modify my component code?

No, the audit is strictly read-only and produces a report as an evidence receipt. Fixes are applied afterward by the caller or the canonical component owner, with findings classified as engineering fixes or product trade-off decisions.

When should I run a React performance audit?

Run it before merging new components, before product demos scoped to key routes, and at release cut across the full design system. During daily development, a lightweight pass with type checking and a bundle diff threshold is sufficient.