К основному содержанию
скилл CX Codex

performance · millionco — скилл для Claude Code: что делает и как установить

Скилл performance измеряет производительность React во время конкретного взаимодействия и связывает задержки браузера с рендерами компонентов.

MIT 314 установок ★ 15 176 обновлён 2026-10-25

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add millionco/react-doctor --skill performance -a claude-code
Открыть на GitHub

Что делает performance

Скилл помогает разобрать одну воспроизводимую проблему в React: медленное действие, неожиданные повторные рендеры или результат после исправления. Он запускает npx react-doctor@latest scan с явным URL, открывает изолированный профиль Chrome и записывает трассу с подсветкой рендерящихся компонентов. Для авторизованной сессии используется подключение через CDP.

Отчёт связывает длительность взаимодействия, блокирующие задачи, Long Animation Frames, LCP и CLS с работой JavaScript, стилями, layout, paint и React-компонентами. Скилл предлагает искать измеренные display name и обработчики в репозитории, а причинность подтверждать по DevTools trace, а не по соседним временным меткам.

Без явного URL автоматический запуск может ждать ввода. Для проверки исправления нужно повторить тот же сценарий и viewport; при заметном разбросе измерений сравниваются медианы трёх замеров до и после.

Какие задачи решает

  • найти причину медленного взаимодействия в React
  • связать долгий кадр с рендерами компонентов
  • выявить повторные рендеры с измеренным влиянием
  • сравнить производительность до и после исправления
  • проверить влияние сборки и предупреждений трассы

Примеры запросов агенту

  • Запусти /performance для медленного клика на странице http://localhost:3000.
  • Через /performance проверь неожиданные повторные рендеры в этом сценарии и найди подтверждение в трассе.
  • Запусти /performance и сравни один и тот же поток до и после исправления.

Как установить performance

1Через Skills CLI (Vercel)

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

2Вручную: положить файлы

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

Папка скилла целиком; для одного проекта — .claude/skills/performance/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о performance

Как установить performance в Claude Code?

Выполните npx skills add millionco/react-doctor --skill performance -a claude-code. Файл скилла появится по пути ~/.claude/skills/performance/SKILL.md.

Что делает performance?

Он записывает воспроизводимое взаимодействие в React Doctor, сопоставляет работу браузера с рендерами компонентов и формирует отчёт только по данным трассы.

Как проверить авторизованную страницу через performance?

Нужно подключить Chrome через CDP с параметром --cdp, войти в приложение и передать явный URL. Для трассировки используется отдельный debug-профиль, поскольку Chrome tracing действует на весь браузер.

Исходный текст

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

Похожие скиллы

Все скиллы по теме «Фронтенд и UI» →

Сначала — performance от других авторов.

performance daveebbelaar Скилл performance для Claude Code, который измеряет нагрузку на CPU, память и энергию в macOS-приложениях. Помогает находить причины зависаний и переносить вычисления с основного потока на GPU. CX Codex +1 1 000установок performance plugin87 Скилл performance для Claude Code разбирает скорость интерфейса по метрикам Core Web Vitals. Подключается к задачам по устранению задержек, рывков анимации и скачков макета. CX Codex +1 562установок performance rshankras Скилл performance диагностирует медленные приложения, зависания и утечки памяти через Instruments, а также находит лишние перерисовки и проблемы идентификации представлений в SwiftUI. CX Codex +1 212установок performance OrchestKit Скилл performance помогает находить узкие места во фронтенде, бэкенде и LLM-инференсе: от медленных React-рендеров до задержек API. CX Codex +1 233установок performance cognitedata Скилл performance для Claude Code ищет и исправляет проблемы быстродействия приложения Flows. Он включается при запросах об оптимизации, медленной работе, повторных рендерах и запросах CDF. CX Codex +1 1 900установок remotion-performance-optimizer ncklrs Скилл remotion-performance-optimizer находит узкие места в Remotion-композициях: лишние перерисовки, тяжёлые расчёты, неоптимальные ассеты. Выдаёт отчёт с конкретными правками и оценкой ускорения. CX Codex +1 171установок react-component-performance Dimillian Скилл react-component-performance находит причины медленного рендера в React, изолирует часто обновляемый стейт и убирает лишние вычисления. Помогает при лагах списков и анимаций. CX Codex +1 1 100установок react-performance oakoss Скилл react-performance для Claude Code собирает паттерны оптимизации React и включается автоматически в задачах о скорости приложения. CX Codex +1 163установок performance-profiling curiositech Скилл performance-profiling находит узкие места в стеке Node.js и React: строит флейм-графики, ищет утечки памяти по снапшотам кучи и замеряет нагрузку на event loop. CX Codex +1 148установок performance-optimizer davila7 Скилл performance-optimizer для Claude Code ищет узкие места в коде, базе данных и API, предлагает исправления и сравнивает показатели до и после. CX Codex +1 70установок swiftui-performance dpearson2699 Скилл swiftui-performance для Claude Code, Cursor, Codex и других агентов, который ведёт от воспроизводимого симптома торможения SwiftUI к измеренному результату. CX Codex +1 5 000установок

Из того же набора4

Спонсоры проекта

Компании, которые помогают держать аналитику открытой