millionco/react-doctor

performance

Diagnose React runtime performance with React Doctor traces, live render outlines, Long Animation Frames, interaction timing, and component render evidence.

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/millionco/react-doctor --skill performance

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

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.

관련 작업

같은 저장소의 Skills

더 많은 Skills

모든 Skills
millionco
커뮤니티

react-doctor

Use when finishing a feature, fixing a bug, before committing React code, or when the user types /doctor, asks to scan, triage, or clean up React diagnostics. Covers lint, accessibility, bundle size, architecture. Includes a regression check and a full local-triage workflow that fetches the canonical playbook.

설치 수
27
GitHub Stars
1.5만
업데이트
10월 16일
millionco
커뮤니티

run-parity

Compare React Doctor diagnostics for a GitHub pull request (PR) with Vercel Sandbox. Use when asked to run parity, check a PR for diagnostic regressions, compare a PR with its base, or report added and removed diagnostics.

설치 수
1
GitHub Stars
1.5만
업데이트
10월 14일
millionco
커뮤니티

improve-react

Survey a whole React codebase as a senior React engineer, using React Doctor's scan as evidence, then produce a prioritized audit and self-contained implementation plans for other agents (or cheaper models) to execute. Read-only on source code — it plans improvements, it does not apply them. Use when the user asks to "improve the React code", "audit this codebase", "make this app faster / more robust", or wants a roadmap of fixes rather than a review of a single diff. For a regression check or a

설치 수
1
GitHub Stars
1.5만
업데이트
10월 1일
millionco
커뮤니티

benchmark-fp-fn-audit

Audit React Doctor against ReactBench or similar diagnostic benchmark corpora for confirmed false positives, false negatives, taxonomy gaps, and verifier artifacts. Use when analyzing rd.log, rd-before.json, rd-after.json, model.patch, result.json, reward/test logs, rule distributions, or when asked to perform a second adversarial pass over React Doctor benchmark findings.

설치 수
2
GitHub Stars
1.5만
업데이트
9월 2일