playful-design/router

frames

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.

소스 보기

사용 방법

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

시작 전 확인

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

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

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 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.

RuleBrokenReplacement
frames-throttle-the-cpuTraced on an unthrottled laptopTraced 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-budget14 dropped frames while the sheet opens0 dropped, no animation frame over 50ms
frames-answer-in-200msA keystroke painting after 340ms, 280ms of it processing90ms, with the filter moved off the keystroke
frames-compositor-propertiesanimate={{ width: 320 }} on the full-page sidebaranimate={{ x: 0 }} with the width fixed
frames-no-forced-layoutel.style.height = el.scrollHeight + "px" in a loop over rowsAll heights read first, then all written
frames-animate-outside-rendersetProgress(p) on every frameprogress.set(p) on a motion value
frames-small-paintbackdrop-filter: blur(20px) on a moving full-screen layerBlur 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.

같은 저장소의 Skills

더 많은 Skills

모든 Skills
playful-design
커뮤니티

alignment

Measures a running page for edges, gaps, centring and radii that miss by a pixel or two, then judges visual weight and returns a numbered report with proof.

1시간 설치 수
2
GitHub Stars
13
업데이트
11월 5일
playful-design
커뮤니티

animate

Build an animation from scratch, making the decisions in the order that determines whether it feels right — should it animate at all, what purpose, which tool, which properties, which curve and duration, how it interrupts, how it exits. Writes the implementation. Use when asked to animate something, add motion, make a component feel alive, or build a transition. For critiquing existing motion use review-animations; for auditing a whole codebase use improve-animations.

1시간 설치 수
2
GitHub Stars
13
업데이트
11월 5일
playful-design
커뮤니티

animate-expo

Build animations in React Native and Expo, making the decisions in the order that determines whether they feel right — should it animate, which thread it runs on, which properties, spring or timing, how the gesture hands off, how it degrades. Writes the implementation with Reanimated, Gesture Handler, Expo Router and expo-haptics. Use when animating anything in an Expo app, adding gestures, sheets, screen transitions, press feedback or haptics, or fixing motion that stutters on device. For web a

1시간 설치 수
2
GitHub Stars
13
업데이트
11월 5일
playful-design
커뮤니티

animation-performance

Keep web animations inside the frame budget — animate composite-only properties, keep motion off the main thread when the page is busy, and find the cause when an animation drops frames. Covers the layout/paint/composite pipeline, cheaper property swaps, CSS vs WAAPI vs requestAnimationFrame, Motion's hardware-accelerated path, React re-rendering per frame, inherited CSS variable recalculation, blur cost, and when will-change actually helps. Use when an animation is janky, choppy, stutters, or d

1시간 설치 수
2
GitHub Stars
13
업데이트
11월 5일