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

frames — скилл для Claude Code: замеры производительности

Скилл frames для Claude Code записывает трассу взаимодействия при ограничении CPU и находит причину потерянных кадров или задержки ввода. После исправления он сравнивает новую запись с исходной.

MIT 176 установок ★ 69 обновлён 2026-11-14

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

Что делает frames

Скилл измеряет плавность конкретного взаимодействия в браузере: например, открытия панели и ввода текста. CPU ограничивается в 4 раза, затем скрипт observe.js записывает три повторения действия через вызовы браузера evaluate и window.__frames.start() / window.__frames.stop().

Трасса показывает длительность кадров, задержку ввода, обработку и отрисовку. Скилл ищет причину в скриптах и принудительной раскладке, а после исправления записывает те же шаги при том же ограничении CPU. Нужен браузер с эмуляцией CPU; без поддержки Long Animation Frames атрибуция скриптов получает отметку Not verified.

Отчёт содержит измеренные показатели и по одному пункту на корневую причину, затем сводку по правилам и серьёзности. Оставшиеся проблемы уровня HIGH блокируют одобрение; без них результат — Approve.

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

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

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

  • Измерь плавность открытия боковой панели при ограничении CPU в 4 раза и укажи причину потерянных кадров.
  • Запиши трассу ввода в поле поиска, найди задержку ответа и проверь исправление повторной записью.
  • Проверь анимацию на принудительную раскладку и сравни показатели до и после правки.

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

1Через Skills CLI (Vercel)

npx skills add raphaelsalaja/skills --skill frames -a claude-code

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

~/.claude/skills/frames/SKILL.md

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

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

Вопросы о frames

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

Выполни npx skills add raphaelsalaja/skills --skill frames -a claude-code. Файл скилла находится по пути ~/.claude/skills/frames/SKILL.md.

Что делает frames?

Скилл записывает трассу взаимодействия при ограничении CPU, выявляет причины потерянных кадров и задержки ввода, а затем сравнивает запись после исправления.

Какие показатели проверяет frames?

Он анализирует длительность кадров, задержку ввода, время обработки и отрисовки. Проверяет, укладывается ли ответ на взаимодействие в 200ms и не превышает ли кадр 50ms во время движения.

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

SKILL.md · MIT
---
name: frames
description: Records a performance trace of one interaction on a throttled CPU, names what drops frames or delays input, then proves the fix with a second trace.
disable-model-invocation: true
---

# Frames

This skill measures whether an interaction stays smooth. It records the interaction on a throttled CPU, traces each slow frame to its cause and proves the fix with a second recording.

## A trace, never a feeling

The budgets are exact. Every frame lands within one refresh interval, 16.7ms at 60Hz, and no animation frame runs past 50ms while something moves. Every interaction paints its response within 200ms. "Feels smooth" with no numbers is a finding.

What a motion's values should be belongs to `motion`. Taking a motion apart frame by frame belongs to `deconstruct`. Opening the running result belongs to `verify`.

## 1. Name the interaction

Write the route, the steps and the moment that matters, such as "open the command palette and type three letters". Throttle the CPU 4× through the browser's emulation call, which stands in for a mid-range phone. A trace on an unthrottled laptop is `frames-throttle-the-cpu`.

## 2. Record it

Run [observe.js](observe.js) through the browser's evaluate call. Call `window.__frames.start()`, perform the interaction three times, then call `window.__frames.stop()`. When a long frame has no named script, record a full performance profile too. Reporting smoothness without a recording is `frames-trace-not-feel`.

## 3. Read the budget

Compare the recording against the budgets. Dropped frames or a long animation frame while something moves is `frames-hold-the-budget`. An interaction whose `duration` passes 200ms is `frames-answer-in-200ms`. Name whether the time went to input delay, processing or presentation.

## 4. Find the cause

Read each long frame's scripts and their forced layout time, then the code they point to.

A layout property animated across a large subtree reflows every frame. `top` or `width` animated on a full-page panel is `frames-compositor-properties`. Move it to `transform` and `opacity`.

Reading layout after writing a style forces the browser to lay out mid-frame. `offsetHeight` read inside a loop that sets `style.height` is `frames-no-forced-layout`. Read every value first, then write.

A state update on every frame re-renders the component tree each frame. `setState` inside a `requestAnimationFrame` loop or a scroll handler is `frames-animate-outside-render`. Drive the value through a motion value, a CSS variable or a ref.

A large surface repainted each frame costs more than the motion is worth. `backdrop-filter` on a full-screen layer that moves is `frames-small-paint`. Shrink the painted area or fade a static copy.

## 5. Trace the fix

Record again with the same steps and the same throttle. Report both recordings side by side. "Should be faster now" is `frames-before-and-after`. Clear the CPU throttle when done.

## The pair

Every check is a pair. The broken line sits beside the line that replaces it.

| Rule | Broken | Replacement |
| --- | --- | --- |
| `frames-throttle-the-cpu` | Traced on an unthrottled laptop | Traced at 4× CPU throttle |
| `frames-trace-not-feel` | "The drawer feels smooth" | "Drawer open: 0 dropped frames, worst gap 17ms at 4×" |
| `frames-hold-the-budget` | 14 dropped frames while the sheet opens | 0 dropped, no animation frame over 50ms |
| `frames-answer-in-200ms` | A keystroke painting after 340ms, 280ms of it processing | 90ms, with the filter moved off the keystroke |
| `frames-compositor-properties` | `animate={{ width: 320 }}` on the full-page sidebar | `animate={{ x: 0 }}` with the width fixed |
| `frames-no-forced-layout` | `el.style.height = el.scrollHeight + "px"` in a loop over rows | All heights read first, then all written |
| `frames-animate-outside-render` | `setProgress(p)` on every frame | `progress.set(p)` on a motion value |
| `frames-small-paint` | `backdrop-filter: blur(20px)` on a moving full-screen layer | Blur on the static backdrop, the panel moving above it |
| `frames-before-and-after` | "Should be faster now" | Before 14 dropped, after 0, same steps at 4× |

## Reporting

**Severity.** `HIGH` is an interaction over 200ms at the throttle, or a report of smoothness with no recording. `MEDIUM` is dropped frames during motion, a layout property animated on a large subtree, forced layout or a state update per frame. It is also a trace taken without a throttle. `LOW` is a large repaint that still holds the budget, or a fix reported without a second recording.

**Format.** One finding per root cause, with the measured numbers:

```
1. file:line - [rule-id] what is wrong (dropped, worst gap, duration)
```

Then a `Rule | Count | Severity` summary. `Block` when any `HIGH` remains, `Approve` otherwise. Mark a browser without long animation frame support as `Not verified` for script attribution.

© raphaelsalaja · MIT · raphaelsalaja/skills

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

Все скиллы по теме «Тесты и QA» →
logfire-ui pydantic Скилл logfire-ui открывает экраны Logfire, трейсы и живой просмотр в браузере без предварительных запросов к телеметрии. CX Codex +1 1 800установок browser-record ruvnet Скилл browser-record открывает именованную браузерную сессию и записывает действия в траекторию ruvector. Сессия подходит для последующего анализа и повторного использования. CX Codex +1 719установок performance millionco Скилл performance измеряет производительность React во время конкретного взаимодействия и связывает задержки браузера с рендерами компонентов. CX Codex +1 314установок w-perf blockmatic-icebox Скилл w-perf для Claude Code измеряет производительность проекта и ищет узкие места. Запускается по запросу на разбор медленного кода или оптимизацию. CX Codex +1 647установок lynx-trace-analysis lynx-community Скилл lynx-trace-analysis для Claude Code, Cursor, Codex и других агентов, специализированный на анализе трейс-данных Lynx. Диагностирует метрики загрузки (FCP, FMP, TTI), просадки кадров, утечки памяти и узкие места рендер-пайплайна. CX Codex +1 400установок chrome-devtools ChromeDevTools Скилл подключает Chrome DevTools через MCP для отладки страниц, браузерной автоматизации, анализа производительности и сетевых запросов. CX Codex +1 9 400установок

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

Весь набор →
deconstruct Скилл deconstruct для Claude Code деконструирует анимации и интерфейсные взаимодействия в машину состояний и покадровый таймлайн. CX Codex +1 182установок viewports Скилл viewports для Claude Code проверяет страницу на переполнение и проблемы с элементами интерфейса. Запускается после изменений вёрстки или по запросу проверить конкретный телефон или ширину. CX Codex +1 180установок color Скилл color для Claude Code проверяет экранный контраст текста и элементов интерфейса, привязывает цвета к ролевым токенам и валидирует тёмную тему. Запускается при вёрстке экранов и дизайн-ревью. CX Codex +1 178установок audit Скилл audit для Claude Code, запускающий сводный аудит изменений по набору правил и формирующий интерактивный отчёт. Оценивает диффы, ветки, сессии или весь репозиторий. CX Codex +1 176установок match Скилл match для Claude Code воссоздаёт названную часть интерфейса по реальному образцу и сравнивает обе версии. Запускается, когда в запросе есть приложение, URL, скриншот или дизайн-референс. CX Codex +1 175установок reuse Скилл reuse для Claude Code задаёт строгий порядок переиспользования: сначала компоненты проекта, затем внешние библиотеки, а самописный код — в последнюю очередь. Помогает пресекать дубли при ревью UI. CX Codex +1 175установок restraint Скилл restraint для Claude Code сокращает изменения до того, о чём попросили. Он проверяет интерфейс и код на лишние элементы, настройки и ветки. CX Codex +1 175установок defaults Скилл defaults для Claude Code задаёт базовые правила интерфейса: отступы скролла, тени, фокус, формы и поведение модальных окон. Проверяет вёрстку на типовые дефекты взаимодействия. CX Codex +1 174установок

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

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