fixing-motion-performance

Audit and fix CSS and JS animation performance issues in UI projects.

Updated Jan 16, 2026
One-click install
npx skills add https://github.com/knckknck/skills --skill fixing-motion-performance-knckknck
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fixing-motion-performance
Source: https://github.com/knckknck/skills/tree/main/skills/fixing-motion-performance
Command: npx skills add https://github.com/knckknck/skills --skill fixing-motion-performance-knckknck

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Audit and fix animation performance issues in UI projects. This skill helps identify and remediate stutter, jank, and inefficient motion across CSS and JavaScript-driven animations.

Core Features & Use Cases

  • Performance analysis: identify layout thrashing, unnecessary paints, and expensive compositing layers.
  • Guided fixes: steps to apply transform/opacity-based motion, avoid scroll-triggered reads, and optimize paints and layers.
  • Use Case: when animations feel jerky during scrolling or transitions, apply these rules to improve frame-rate stability and battery efficiency.

Quick Start

Apply the motion-performance guidelines to an animation task and start optimizing with a single example in your codebase.

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 animation jank and improve motion performance in a web UI?

Fix animation jank by auditing CSS and JavaScript animations to reduce layout thrashing and unnecessary paints. Apply rules that favor transform and opacity properties to enforce frame-rate stability and efficient compositing layers.

Why does scroll-linked motion stutter and how can I optimize it?

Scroll-linked motion stutters due to improper scroll reads triggering expensive paints. Optimize scroll animations by avoiding scroll-triggered reads and enforcing measurement rules that prevent layout thrashing during scrolling events.

What causes layout thrashing in JavaScript animations and how do I prevent it?

Layout thrashing in JavaScript animations is caused by interleaving DOM read and write operations, forcing synchronous recalculations. Prevent it by batching DOM measurements separately from mutations to avoid expensive paints and UI jank.

What is the best way to optimize CSS transitions for frame-rate stability?

Optimize CSS transitions by favoring transform and opacity properties to avoid expensive paints and large paint areas. Enforce measurement to identify compositing bottlenecks and ensure motion stays on the GPU compositor thread.

Can I apply these motion performance rules to both CSS and JavaScript animations?

Yes, you can apply motion performance rules to both CSS and JavaScript-driven animations. The auditing process identifies inefficient motion across transitions and scroll-linked motion, reducing layout thrashing and jank universally.

When should I not use transform and opacity for UI animations?

Transform and opacity should not be used when animating layout properties is strictly required by the visual design. However, avoiding them reintroduces expensive paints and layout thrashing, causing UI jank and reducing battery efficiency.