React scan

From remotion-dev/remotion · View interactive version

React scan is an AI agent skill from the GitHub repository remotion-dev/remotion. Capture and analyze Remotion Studio React render profiles through development-only WebMCP tools. Use when diagnosing unnecessary re-renders, slow commits, frame-reactive component trees, or when comparing render performance before and after a change.

How to use this skill

Skill file

React Scan

Use targeted captures to optimize measured Studio interactions. Do not infer a

performance problem from source alone when the workflow can be reproduced.

Record a capture

Start from the repository root:

bun run react-scan:capture

For the Brand Studio, run:

bun run react-scan:capture:brand

Wait for Studio to finish building, open the printed Studio URL with the browser,

and let the page settle. The React Scan WebMCP tools are only registered in this

development capture mode.

Call start_react_scan_recording, then use browser-use to perform one named

interaction three times. Call stop_react_scan_recording immediately

afterwards. Keep the recording short so startup, HMR, and unrelated interactions

do not dominate the data. Call get_react_scan_recording with

{"includeEvents": false} to return recording status and an agent-oriented

summary with events: null. This avoids serializing the raw fiber trees, which

can make even a short recording too large for a native WebMCP response.

The default includeEvents: true preserves raw-event retrieval. Request raw

events only when individual trees are needed, using a small focused recording.

Summary-only reads keep the raw events in memory for later retrieval.

After retrieving the recording, stop Studio with Ctrl+C. Recordings live in page

memory until the next recording or page reload; React Scan does not send them

to a separate HTTP collector.

React Scan replaces the React DevTools profiling-hook channel while active. Do

not record with the React DevTools Timeline Profiler at the same time.

Analyze the evidence

Read the summary returned by get_react_scan_recording first. Confirm the

capture contains commit events and inspect profilingHooksStatuses; do not

interpret a missing profiling channel as an idle application.

Prioritize components with high total self duration, repeated expensive

renders, or a clear user-visible slow commit. Inclusive duration contains child

work and can double-count a subtree, so use it to locate an expensive boundary,

then use self duration and the raw tree to identify the actual work.

Use render causes as evidence, not automatic prescriptions:

suggests a stable memoization boundary.

location before adding memoization.

the component in memo() will not block them.

before editing.

For timeline-position findings, also read ../studio-perf/SKILL.md before

changing subscriptions or memoization boundaries.

Verify an optimization

Preserve the baseline capture. After changing code, record the same interaction

the same number of times with the same viewport and compare a new capture.

Require an improvement in the relevant commit/component metrics without a

regression in behavior. Do not optimize every re-render: cheap necessary renders

are often preferable to added memoization complexity.

Report the measured before/after change and the checks performed to verify

behavior.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.