react-performance-optimization

react-performance-optimization is a skill for Claude Code from PMDevSolutions/Aurelius. It costs 77 tokens per session (3,923 once invoked), scanned A, original, MIT.

A guide to finding and improving slow React applications. It covers measurement with the React Profiler, bundle-size analysis, code splitting, rendering choices, image loading, Core Web Vitals, and server-side rendering performance.

In plain words
What is it for?
Use it to investigate slow rendering, frequent component re-renders, large bundles, slow pages, or weak Lighthouse and Core Web Vitals results.
Why use it?
It discourages speculative optimizations that add complexity without fixing a measured problem. It provides ways to locate slow components, oversized downloads, and poor page-loading results.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/pmdevsolutions/aurelius/react-performance-optimization
Any agent
npx skills add PMDevSolutions/Aurelius --skill react-performance-optimization
Clone the repo
git clone --depth 1 https://github.com/PMDevSolutions/Aurelius

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for react-performance-optimization

README.md
[![agentmods](https://agentmods.dev/badge/skills/pmdevsolutions/aurelius/react-performance-optimization.svg)](https://agentmods.dev/skills/pmdevsolutions/aurelius/react-performance-optimization)
Your own site
<a href="https://agentmods.dev/skills/pmdevsolutions/aurelius/react-performance-optimization"><img src="https://agentmods.dev/badge/skills/pmdevsolutions/aurelius/react-performance-optimization.svg" alt="Measured on agentmods" height="20"></a>
Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,923 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00077 $0.03923
Opus 5 $0.00039 $0.01962
Sonnet 5 $0.00015 $0.00785
Haiku 4.5 $0.00008 $0.00392

Measured yesterday against content hash bc4baeaa18f7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

react-performance-optimization scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/react-performance-optimization/SKILL.md · 561 lines

How it starts

The opening of the file, as written. The whole thing — 561 lines — stays where its author put it; the contents beside it link to each section on GitHub.

React Performance Optimization

Overview

This skill provides a systematic approach to identifying and resolving performance issues in React applications. It covers profiling tools, bundle optimization, rendering optimization, asset loading, and Core Web Vitals improvement.

Core Principle: Measure first, optimize second. Never apply performance optimizations speculatively. Every optimization adds complexity; only add complexity when measurements show a real problem.

When to Use

Use this skill when:

  • Application feels slow or janky
  • Bundle size is too large (over 200KB gzipped for initial load)
  • Core Web Vitals scores are below thresholds
  • Components re-render too frequently
  • Page load time exceeds 3 seconds
  • Lighthouse Performance score is below 80

Trigger phrases:

  • "Optimize performance"
  • "Reduce bundle size"
  • "Fix slow rendering"
  • "Improve web vitals"
  • "Profile this component"
  • "Code split this route"
  • "Why is this component slow"

Profiling Tools

React DevTools Profiler

The primary tool for identifying unnecessary re-renders and slow components.

How to profile:

  1. Open React DevTools > Profiler tab
  2. Click "Record"
  3. Interact with the application (the specific flow that feels slow)
  4. Click "Stop"
  5. Analyze the flamegraph

What to look for:

  • Components that render when they should not (gray = did not render, colored = rendered)
  • Components with high "self time" (the component's own rendering cost, excluding children)
  • Cascading re-renders (a parent change causing deep tree re-renders)

Ranked chart view: Shows components sorted by render time. Focus on the top entries.

React Profiler Component (Programmatic)

import { Profiler, type ProfilerOnRenderCallback } from "react";

const onRender: ProfilerOnRenderCallback = (id, phase, actualDuration) => {
  if (actualDuration > 16) {
    // Longer than one frame at 60fps
    console.warn(`Slow render: ${id} (${phase}) took ${actualDuration.toFixed(2)}ms`);
  }
};

function App() {
  return (
    <Profiler id="App" onRender={onRender}>
      <MainContent />
    </Profiler>
  );
}

Read the full file on GitHub · 561 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 561 lines · 0 tokens per session scan A bc4baeaa18f7

Subscribe to this mod's changes

react-performance-optimization is a skill published in the GitHub repository PMDevSolutions/Aurelius (8 stars, last pushed 21d ago), licensed MIT. It adds 77 tokens to every session and 3,923 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.

Related

Other skills, from other repositories

figma-codegen

Generate framework-aware code from a Figma design. Reads the project's stack profile and emits code matching the existing framework (React/Vue/Svelte/Next/etc.) and styling (Tailwind/CSS/CSS-in-JS), reusing existing components and design tokens instead of regenerating from scratch. Triggers whenever the user wants a…

awdr74100/figwright · 145 tokens

high-plains-drifter

Align a design to your real Storybook components instead of reconstructing it. Use when turning a Figma frame into React built from an existing component library (Build mode), or when pulling scrappy exploratory code into line with the library once a direction feels right (Align mode). Triggers include "build this…

alexconner-79/high-plains-drifter · 148 tokens

Figma Developer

Extract components from Figma, convert designs to React components, sync design tokens, and generate code from designs. Bridge the gap between design and code with automated workflows.

daffy0208/ai-dev-standards · 37 tokens

mcp-sdk-audit

Upgrade @modelcontextprotocol/server (the MCP TypeScript SDK v2) and prove the wire contract survived. The SDK is a runtime dependency whose breakage lands on the wire, not in the type checker — so this sorts each release by which SDK source files it touched (Figwright uses only the server + stdio slice of a…

awdr74100/figwright · 159 tokens

design-to-code

Mockup-to-component pipeline using Google Stitch, 21st.dev, and Storybook MCP. Accepts a screenshot, a description, or a URL and produces production-ready React components, checking existing Storybook components before generating anything new. Use when implementing UI from a mockup or screenshot. To call the MCP tool…

yonatangross/orchestkit · 86 tokens

figma-build

Build a Figma design from code or a description — the reverse of figma-codegen. Reuses the connected file's existing design system (components, variables, styles) instead of drawing primitives with hardcoded values. Triggers whenever the user wants something created or updated IN Figma from code or a spec — e.g.…

awdr74100/figwright · 180 tokens