60fps-animation

Converts janky CSS animations to compositor-only transform and opacity techniques.

3|Updated Apr 20, 2026
One-click install
npx skills add https://github.com/langgenius/due-date-hq-jwl --skill 60fps-animation-langgenius
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: 60fps-animation
Source: https://github.com/langgenius/due-date-hq-jwl/tree/main/.claude/skills/60fps-animation
Command: npx skills add https://github.com/langgenius/due-date-hq-jwl --skill 60fps-animation-langgenius

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Web animations that animate layout properties like width, height, top, left, or box-shadow force the browser to recalculate layout and repaint every frame, causing stutter and dropped frames. This Skill diagnoses those expensive animations and rewrites them to run on the compositor using only transform and opacity, so motion holds 60fps. ## Core Features & Use Cases - Property mapping: Replaces expensive animations (width/height, top/left, box-shadow, filter) with cheap equivalents like transform: translate/scale and opacity cross-fades on pseudo-elements. - FLIP animations: Implements First-Last-Invert-Play with the Web Animations API to animate layout changes such as reordering lists or moving elements between containers without distortion. - Height auto and thrashing fixes: Animates height: auto via grid 0fr→1fr or interpolate-size, and eliminates layout thrashing by batching DOM reads before writes. - Verification workflow: Ships a standalone HTML deliverable with a ?t=N freeze harness, screenshot checks at start/mid/end, and DevTools profiling steps to confirm no per-frame Layout or Paint. - Use Case: A hover effect that animates box-shadow feels choppy; the Skill moves the shadow to a ::after pseudo-element and animates only its opacity, then verifies compositor-only frames in DevTools. ## Quick Start Ask the AI to fix a choppy hover or scroll animation by converting it to transform and opacity, then verify it holds 60fps with no per-frame layout or paint.

Frequently Asked Questions about 60fps-animation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make a CSS animation run at 60fps?

Animate only transform and opacity, which run on the compositor and skip layout and paint. Replace width/height with scaleX/scaleY or FLIP, top/left with translate, and box-shadow with an opacity fade on a pseudo-element holding the shadow.

How to animate height auto in CSS without JavaScript?

Use the grid technique: set the wrapper to display: grid with grid-template-rows transitioning from 0fr to 1fr, and give the content overflow: hidden and min-height: 0. In supporting browsers, interpolate-size: allow-keywords or calc-size(auto, size) also works.

What is FLIP animation and when should I use it?

FLIP (First, Last, Invert, Play) animates real layout changes like reordering or moving elements between containers using only transform. Measure positions before and after the DOM change, apply an inverting transform, then animate to identity with the Web Animations API.

Why does animating box-shadow cause jank?

Animating box-shadow repaints a large blurred region every frame, blocking the main thread. Instead, paint the shadow once on a ::after pseudo-element and animate only its opacity, which is compositor-only.

Does will-change improve animation performance?

will-change: transform promotes an element to its own compositor layer, avoiding a hitch at animation start. Apply it just before the animation, remove it when idle, and never blanket-apply it, since excess layers consume GPU memory and hurt performance.

How do I verify an animation is compositor-only?

Record the animation in Chrome DevTools Performance and check that frames show only Composite Layers work, with no purple Layout or green Paint bars. Paint flashing and the FPS meter in the Rendering tab confirm no repaints and a stable 60fps.