Skip to main content
skill CX Codex

performance · millionco — Claude Code skill: what it does, how to install

This skill measures React runtime performance for one repeatable interaction and ties browser delays to component renders.

MIT 314 installs ★ 15,176 updated 2026-10-25

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add millionco/react-doctor --skill performance -a claude-code
Open on GitHub

What performance does

The skill investigates a slow React interaction, unexpected re-renders, or a measured change after a fix. It runs npx react-doctor@latest scan against an explicit URL, records the session in an isolated Chrome profile, and uses live component outlines during the interaction. Authenticated pages can be traced through CDP.

Its report checks React detection, build type, Long Animation Frame support, interaction timing, blocking work, LCP, CLS, script hotspots, and component self time. It then searches the repository for recorded component names and handlers, using the DevTools trace when the summary cannot explain a long frame. Nearby timestamps alone are not treated as proof of causality.

Automated runs need an explicit URL, or the scan can wait for input. To validate a change, repeat the same flow and viewport; when timing varies, compare medians from three samples before and after.

What it helps with

  • locate the source of a slow React interaction
  • connect a long frame to component renders
  • separate browser-bound work from React work
  • find re-renders with measured user impact
  • compare runtime timings before and after a fix

Example prompts for the agent

  • Run /performance on the slow interaction at http://localhost:3000.
  • Use /performance to investigate unexpected re-renders and connect them to the recorded flow.
  • Run /performance before and after the fix, using the same interaction and viewport.

How to install performance

1Skills CLI (Vercel)

npx skills add millionco/react-doctor --skill performance -a claude-code

2Manually: put the files in place

~/.claude/skills/performance/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/performance/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about performance

How do I install performance in Claude Code?

Run npx skills add millionco/react-doctor --skill performance -a claude-code. The skill file is placed at ~/.claude/skills/performance/SKILL.md.

What does performance do?

It records a reproducible React interaction with React Doctor, connects browser work to component renders, and reports conclusions supported by the trace.

How does performance handle an authenticated page?

Connect Chrome through CDP with --cdp, sign in, and pass the page URL to the scan. A dedicated debug profile is recommended because Chrome tracing is browser-wide.

Source text

SKILL.md · MIT
---
name: performance
description: Diagnose React runtime performance with React Doctor traces, live render outlines, Long Animation Frames, interaction timing, and component render evidence. Use when invoked as `/performance` for a slow interaction, unexpected re-renders, or a measured before-and-after comparison.
disable-model-invocation: true
---

# Diagnose React runtime performance

Measure one reproducible interaction, connect browser work to React renders, and report only conclusions supported by the trace.

## Define the interaction

Before recording:

1. Identify the target URL
2. Write the exact actions to reproduce
3. Choose the expected result
4. Confirm whether authentication is required

Use a production build when available. Development builds add framework work that can distort render and script timings. If you must measure a development build, label that limitation in the report.

## Record the trace

Run the scan in an interactive terminal:

```bash
npx react-doctor@latest scan http://localhost:3000 --format json
```

React Doctor opens an isolated Chrome profile. Perform the planned interaction while purple outlines identify rendered components. Press Enter after the interaction settles; recordings stop automatically after five minutes.

Interactive users can omit the URL and choose a detected localhost app or enter another URL. Agents must always pass the explicit URL so automated runs never wait for input.

For an authenticated session, connect through the Chrome DevTools Protocol (CDP):

```bash
npx react-doctor@latest scan https://app.example.com \
  --cdp http://127.0.0.1:9222 \
  --format json
```

Use a dedicated debug profile for CDP because Chrome tracing is browser-wide. Sign in, close every non-blank tab, and then start the scan. React Doctor closes leftover blank tabs before tracing. Never request cookies, copy a browser profile, or close an externally managed browser.

The compressed `.json.gz` trace can contain URLs, source paths, and application behavior. Keep it local unless an upload is explicitly approved.

## Read the report

Evaluate the report in this order:

1. **Capture support**: confirm React detection, build type, React tracks, and Long Animation Frame support
2. **User impact**: inspect the worst interaction, total blocking duration, Largest Contentful Paint (LCP), and Cumulative Layout Shift (CLS)
3. **Browser work**: inspect long frames and script hotspots for event handling, JavaScript, style, layout, and paint cost
4. **React work**: inspect component render count, total self time, and maximum self time
5. **Capture limits**: read every warning, especially dropped event counts

Follow these interpretation rules:

- A high render count is evidence, not a defect. Pair it with duration and user impact
- Generated chunk names identify browser work, not the owning source component
- A slow interaction can be browser-bound even when every component render is cheap
- Repeated Event Timing records with one interaction identifier represent one interaction
- Dropped component events make hotspot totals incomplete
- Use purple labels to identify the active subtree, then use recorded timings to set severity

## Connect measurements to source

Search the repository for measured component display names and event handlers. Confirm that each candidate runs in the recorded flow before reporting it.

Open the DevTools trace when the summary cannot explain a long frame. Correlate the interaction timestamp with script tasks, style or layout work, React tracks, and paint. Do not infer causality from neighboring timestamps alone.

## Report findings

Use this structure:

```markdown
## Flow tested

tested_url, build_type, and exact_interaction

## Verdict

one_evidence_backed_paragraph

## Evidence

| Signal            |                  Measurement | Interpretation  |
| ----------------- | ---------------------------: | --------------- |
| Worst interaction |                  duration_ms | measured_cause  |
| Total blocking    |                  duration_ms | measured_scope  |
| Top component     | render_count and duration_ms | measured_impact |

## Findings

1. `path/to/component.tsx:42`: measured_problem, evidence, and smallest_fix

## Limits

capture_warnings, missing_support, or environmental_caveats
```

Do not pad the report with static lint findings. Include source findings only when runtime evidence connects them to the tested flow.

## Validate a fix

Do not edit code unless code changes are requested. After a fix:

1. Rebuild with the same mode
2. Record the same interaction at the same viewport
3. Run three before and three after samples when timing variance could change the conclusion
4. Compare medians for interaction, blocking, and component duration
5. Confirm behavior and accessibility did not regress

Reject improvements that only move work outside the recorded window or disable useful behavior.

© millionco · MIT · millionco/react-doctor

Similar skills

All skills for Frontend and UI →

performance by other authors comes first.

performance daveebbelaar performance — a skill for Claude Code that measures CPU, memory, and energy usage in macOS apps. It identifies causes of freezes and helps offload tasks from the main thread to the GPU. CX Codex +1 1,000installs performance plugin87 This Claude Code skill guides UI performance work against Core Web Vitals. It activates for slow interactions, animation jank, layout shifts, and loading problems. CX Codex +1 562installs performance rshankras performance diagnoses slow apps, hangs, and memory leaks using Instruments; spots unnecessary SwiftUI re-renders and view identity issues. CX Codex +1 212installs performance OrchestKit This skill helps diagnose slow web pages, React renders, backend requests, and LLM inference across a performance review. CX Codex +1 233installs performance cognitedata performance is a Claude Code skill that finds and fixes performance issues in Flows apps. It activates for requests about slow pages, re-renders, CDF queries, bundles, or memory leaks. CX Codex +1 1,900installs remotion-performance-optimizer ncklrs remotion-performance-optimizer finds bottlenecks in Remotion compositions: redundant re-renders, expensive calculations, oversized assets. Outputs a report with actionable fixes and speed-up estimates. CX Codex +1 171installs react-component-performance Dimillian react-component-performance identifies React render hotspots, isolates fast-changing state, and eliminates re-render churn. Useful when lists lag or components re-render too often. CX Codex +1 1,100installs react-performance oakoss react-performance is a Claude Code skill that applies React optimization patterns automatically when a task concerns app speed. CX Codex +1 163installs performance-profiling curiositech performance-profiling guides performance analysis across Node.js and React, covering flame graphs, heap snapshot diffing, and event loop saturation. CX Codex +1 148installs performance-optimizer davila7 The performance-optimizer skill helps locate slow points in code, databases, and APIs, then compare measurements before and after changes. Use it when a page, query, or endpoint feels slow. CX Codex +1 70installs swiftui-performance dpearson2699 swiftui-performance — a skill for Claude Code, Cursor, Codex and other agents that takes a reproducible SwiftUI symptom through to a measured fix. CX Codex +1 5,000installs

From the same set4

Project sponsors

Companies that keep this analytics open