npx skills add ...
npx skills add callstackincubator/agent-react-devtools --skill react-devtools
React DevTools CLI for AI agents. Use when the user asks you to debug a React or React Native app at runtime, inspect component props/state/hooks, diagnose render performance, profile re-renders, find slow components, or understand why something re-renders. Triggers include "why does this re-render", "inspect the component", "what props does X have", "profile the app", "find slow components", "debug the UI", "check component state", "the app feels slow", or any React runtime debugging task.
npx skills add callstackincubator/agent-react-devtools --skill react-devtools
CLI that connects to a running React or React Native app via the React DevTools protocol and exposes the component tree, props, state, hooks, and profiling data in a token-efficient format.
agent-react-devtools status. If the daemon is not running, start it with agent-react-devtools start. Use agent-react-devtools wait --connected to block until a React app connects.Every component gets a stable label like @c1, @c2. Use these to reference components in follow-up commands:
Type abbreviations: fn = function, cls = class, host = DOM element, memo = React.memo, fRef = forwardRef, susp = Suspense, ctx = context.
Components with errors or warnings show annotations: ⚠2 = 2 warnings, ✗1 = 1 error. Use agent-react-devtools errors to list only affected components.
ƒ = function value. Values over 60 chars are truncated.
Render causes: props-changed, state-changed, hooks-changed, parent-rendered, force-update, first-mount.
When specific changed keys are available, a changed: suffix shows exactly which props, state keys, or hooks triggered the render (e.g. changed: props: onClick, className state: count hooks: #0).
Use this after triggering a page reload or HMR update to avoid querying empty state.
Then inspect the worst offenders with get component @cN and profile report @cN.
Use profile commit <N> to drill into a specific commit once you spot a spike.
When using agent-browser to drive the app while profiling or debugging, you must use headed mode (--headed). Headless Chromium does not execute ES module scripts the same way as a real browser, which prevents the devtools connect script from running properly.
wait --connected then re-check with get tree or find.status first — if status shows 0 connected apps, the React app is not connected. Web users may need to run npx agent-react-devtools init; React Native users need both manual steps in setup.md. Tree observation commands exit 1 with No React app is attached in that state; treat that as "nothing was observed", not as a clean result.get tree or find before reusing earlier @cN labels.agent-browser, always use --headed mode. Headless Chromium does not properly load the devtools connect script.profile start and profile stop. Make sure the relevant interaction happens during that window.--depth on large trees — a deep tree can produce a lot of output. Start with --depth 3 or --depth 4 and go deeper only on the subtree you care about.| File | When to read |
|---|---|
| commands.md | Full command reference with all flags and edge cases |
| profiling-guide.md | Step-by-step profiling workflows and interpreting results |
| setup.md | How to connect different frameworks (Vite, Next.js, Expo, CRA) |