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.
73
90%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
Measure one reproducible interaction, connect browser work to React renders, and report only conclusions supported by the trace.
Before recording:
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.
Run the scan in an interactive terminal:
npx react-doctor@latest scan http://localhost:3000 --format jsonReact 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):
npx react-doctor@latest scan https://app.example.com \
--cdp http://127.0.0.1:9222 \
--format jsonUse 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.
Evaluate the report in this order:
Follow these interpretation rules:
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.
Use this structure:
## 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_caveatsDo not pad the report with static lint findings. Include source findings only when runtime evidence connects them to the tested flow.
Do not edit code unless code changes are requested. After a fix:
Reject improvements that only move work outside the recorded window or disable useful behavior.
83466a8
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.