fixing-motion-performance

Fix UI animation stutter by enforcing frame-safety constraints in CSS/JS code.

2|Updated Apr 26, 2026
One-click install
npx skills add https://github.com/iadr-dev/colab --skill fixing-motion-performance-iadr-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fixing-motion-performance
Source: https://github.com/iadr-dev/colab/tree/main/skills/coding/ui-skills/skills/fixing-motion-performance
Command: npx skills add https://github.com/iadr-dev/colab --skill fixing-motion-performance-iadr-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It reduces janky, stuttering UI animations by preventing common performance traps like layout thrashing, scroll-driven repaint loops, and expensive visual effects.

Core Features & Use Cases

  • Animation performance audit: Identifies violations across frame-critical rules (layout reads/writes, scroll polling, missing stop conditions).
  • Mechanism selection guidance: Recommends transform/opacity-first approaches, limits paint/layout animation to small surfaces, and suggests FLIP-style measurement batching.
  • Scroll-linked motion fixes: Replaces scrollTop/scrollY event driving with scroll timelines or IntersectionObserver-style pausing for off-screen elements.
  • Blur and layer safety: Keeps blur minimal (<=8px), avoids continuous blur, and uses will-change only temporarily and surgically.

Quick Start

Use /fixing-motion-performance <file> to have an AI review the specified UI animation code and return any rule violations, why they matter, and concrete code-level fixes.

Frequently Asked Questions about fixing-motion-performance

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

FAQPage Schema
How do I fix CSS animation jank and stuttering in my UI?

Fix UI animation jank by auditing code for layout thrashing and scroll-driven repaint loops, batching layout measurements before writes, and replacing scroll event polling with proper scroll timelines.

What causes layout thrashing and how does it affect rendering performance?

Layout thrashing occurs when JavaScript interleaves layout property reads with write operations, forcing the browser into a synchronous rendering pipeline recalculation that causes severe animation stutter. Batching measurements before writes prevents this.

When should I use will-change for CSS performance optimization?

Use will-change surgically and temporarily for CSS performance optimization, applying it only to elements undergoing imminent transform or opacity changes to promote them efficiently without causing excessive memory overhead.

Does this approach work with GSAP, WAAPI, and rAF-driven animations?

Yes, this approach works with WAAPI, GSAP, and rAF-driven animations by enforcing frame-safety constraints across all JavaScript and CSS effects, ensuring proper stop conditions and minimal rendering work.

How do I optimize blur effects to prevent UI animation stutter?

Optimize blur effects to prevent UI animation stutter by keeping blur values minimal (<=8px), avoiding continuous blur animations, and restricting paint-heavy visual effects to small surface areas to reduce rendering work.

What is the best way to handle scroll-linked motion without dropping frames?

The best way to handle scroll-linked motion is replacing scrollTop and scrollY event-driven animation with native scroll timelines or IntersectionObserver pausing for off-screen elements to maintain frame safety.