react-component-performance

react-component-performance is a skill for Claude Code, Codex from beel-collab/presets.dev. It costs 11 tokens per session (1,227 once invoked), scanned A, a copy of react-component-performance, MIT.

A guide for finding why React components render slowly and choosing focused fixes. React is a library for building web interfaces from reusable components.

In plain words
What is it for?
Use it to investigate slow components, excessive re-renders, laggy lists, expensive calculations, or interactions that feel delayed.
Why use it?
It helps separate the actual source of lag from unrelated code changes. It focuses on measuring renders, locating expensive updates, and improving performance without changing the interface's behavior.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to investigate slow components, excessive re-renders, laggy lists, expensive calculations, or interactions that feel delayed.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/beel-collab/presets.dev/react-component-performance
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.

Any agent
npx skills add beel-collab/presets.dev --skill react-component-performance
Clone the repo
git clone --depth 1 https://github.com/beel-collab/presets.dev

Made for: Claude Code, Codex.

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-component-performance

README.md
[![agentmods](https://agentmods.dev/badge/skills/beel-collab/presets.dev/react-component-performance/github.svg)](https://agentmods.dev/skills/beel-collab/presets.dev/react-component-performance)
Your own site
<a href="https://agentmods.dev/skills/beel-collab/presets.dev/react-component-performance"><img src="https://agentmods.dev/badge/skills/beel-collab/presets.dev/react-component-performance/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for react-component-performance

Your own site · 80×15
<a href="https://agentmods.dev/skills/beel-collab/presets.dev/react-component-performance"><img src="https://agentmods.dev/badge/skills/beel-collab/presets.dev/react-component-performance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 11 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,227 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 91% copy Near-identical to another mod 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.00011 $0.01227
Opus 5.5 $0.00004 $0.00491
Sonnet 5.5 $0.00002 $0.00245
Haiku 4.5 $0.00001 $0.00123

Measured 1mo ago against content hash 2978c62ad5a5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

react-component-performance 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 1mo ago.

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.

Origin

This is a copy

91% identical to react-component-performance — 19 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

claude/skills/web-development/react-component-performance/SKILL.md · 141 lines

How it starts

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

React Component Performance

Overview

Identify render hotspots, isolate expensive updates, and apply targeted optimizations without changing UI behavior.

When to Use

  • When the user asks to profile or improve a slow React component.
  • When you need to reduce re-renders, list lag, or expensive render work in React UI.

Workflow

  1. Reproduce or describe the slowdown.
  2. Identify what triggers re-renders (state updates, props churn, effects).
  3. Isolate fast-changing state from heavy subtrees.
  4. Stabilize props and handlers; memoize where it pays off.
  5. Reduce expensive work (computation, DOM size, list length).
  6. Validate: open React DevTools Profiler → record the interaction → inspect the Flamegraph for components rendering longer than ~16 ms → compare against a pre-optimization baseline recording.

Checklist

  • Measure: use React DevTools Profiler or log renders; capture baseline.
  • Find churn: identify state updated on a timer, scroll, input, or animation.
  • Split: move ticking state into a child; keep heavy lists static.
  • Memoize: wrap leaf rows with memo only when props are stable.
  • Stabilize props: use useCallback/useMemo for handlers and derived values.
  • Avoid derived work in render: precompute, or compute inside memoized helpers.
  • Control list size: window/virtualize long lists; avoid rendering hidden items.
  • Keys: ensure stable keys; avoid index when order can change.
  • Effects: verify dependency arrays; avoid effects that re-run on every render.
  • Style/layout: watch for expensive layout thrash or large Markdown/diff renders.

Optimization Patterns

Isolate ticking state

Move a timer or animation counter into a child so the parent list never re-renders on each tick.

// ❌ Before – entire parent (and list) re-renders every second
function Dashboard({ items }: { items: Item[] }) {
  const [tick, setTick] = useState(0);
  useEffect(() => {
    const id = setInterval(() => setTick(t => t + 1), 1000);
    return () => clearInterval(id);
  }, []);
  return (
    <>
      <Clock tick={tick} />
      <ExpensiveList items={items} /> {/* re-renders every second */}
    </>
  );
}

// ✅ After – only <Clock> re-renders; list is untouched
function Clock() {
  const [tick, setTick] = useState(0);
  useEffect(() => {
    const id = setInterval(() => setTick(t => t + 1), 1000);
    return () => clearInterval(id);
  }, []);
  return <span>{tick}s</span>;
}

function Dashboard({ items }: { items: Item[] }) {
  return (
    <>
      <Clock />
      <ExpensiveList items={items} />
    </>
  );
}

Read the full file on GitHub · 141 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. 1mo ago First seen · 141 lines · 11 tokens per session scan A 2978c62ad5a5

Subscribe to this mod's changes

react-component-performance is a skill published in the GitHub repository beel-collab/presets.dev (3 stars, last pushed 5mo ago), licensed MIT. It adds 11 tokens to every session and 1,227 once invoked, about $0.0000 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 91% identical to react-component-performance, differing in 19 lines, and is treated as a copy.

Related

Other skills, from other repositories

systematic-debugging

Applies a modified Fagan Inspection methodology to resolve persistent bugs and complex issues. Use when several fix or debugging attempts have already failed and a methodical root-cause analysis warranting a Fagan inspection is needed. Do not use for simple troubleshooting.

sammcj/agentic-coding · 55 tokens

reframe-voice

Write, rewrite, or review content in the evidence-led reframe voice style. Use when the user explicitly asks to write in "reframe voice" or "reframe style". Do NOT use for general writing tasks.

sammcj/agentic-coding · 49 tokens

qa-to-issues

Interactive QA session where user reports bugs or issues conversationally, and the agent files GitHub issues. Use when user wants to report bugs in their own codebase and create Github issues conversationally.

sammcj/agentic-coding · 43 tokens

diagnose-hard-problem

Disciplined diagnosis loop for hard problems, diagnosing bugs and regressions. Reproduce → minimise → hypothesise → instrument → fix → regression-test.

sammcj/agentic-coding · 37 tokens

react18-batching-patterns

Provides exact patterns for diagnosing and fixing automatic batching regressions in React 18 class components. Use this skill whenever a class component has multiple setState calls in an async method, inside setTimeout, inside a Promise .then() or .catch(), or in a native event handler. Use it before writing any…

FluxonLab/Skillry · 104 tokens

agents-sdk-dotnet-debugging

Use when troubleshooting an agent built with the Microsoft Agents SDK (Microsoft.Agents.Hosting.AspNetCore and related packages) in C# / .NET. Trigger on any of these symptoms: build or C# compile errors, crashes on startup, 401 or auth errors on incoming requests, the bot not responding to messages, appsettings.json…

microsoft/Agents · 136 tokens