gsap-performance

Optimizes GSAP animations for smooth 60fps rendering using transforms, batching, and layer promotion.

Updated May 23, 2026
One-click install
npx skills add https://github.com/Oatse/CWE-Automation --skill gsap-performance-oatse
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gsap-performance
Source: https://github.com/Oatse/CWE-Automation/tree/main/.agents/skills/gsap-performance
Command: npx skills add https://github.com/Oatse/CWE-Automation --skill gsap-performance-oatse

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? GSAP animations can cause jank, dropped frames, and layout thrashing when they animate layout-heavy properties or create excessive tweens. This Skill provides concrete rules and patterns to keep animations on the compositor thread and maintain smooth 60fps rendering. ## Core Features & Use Cases - Compositor-Friendly Properties: Guides you to animate transform and opacity (x, y, scale, rotation) instead of layout-triggering properties like width, height, top, and left. - Efficient Update Patterns: Covers gsap.quickTo() for frequently updated values like mouse followers, stagger for animating many elements, and will-change usage for layer promotion. - ScrollTrigger Tuning: Advises on pin usage, scrub values, and debounced ScrollTrigger.refresh() calls to reduce scroll-related work. - Use Case: When a user reports a stuttering scroll-driven animation or a laggy mouse-follower effect, apply these rules to replace left/top animations with x/y transforms and swap per-event tween creation for quickTo. ## Quick Start Review my GSAP animation code and optimize it for smooth 60fps performance by fixing layout thrashing and inefficient tween patterns.

Frequently Asked Questions about gsap-performance

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

FAQPage Schema
How do I make GSAP animations run at 60fps?

Animate only transform and opacity properties (x, y, scale, rotation) so work stays on the compositor thread. Avoid animating width, height, top, left, margin, or padding, which trigger layout and cause jank.

How to optimize GSAP mouse follower animations?

Use gsap.quickTo() for frequently updated properties like mouse-follower x and y positions. It reuses a single tween instead of creating a new tween on every mousemove event, reducing overhead.

Should I use will-change on all animated elements?

No, apply will-change: transform only to elements that will actually animate. Setting it on every element wastes memory and compositor resources without benefit.

When should I call ScrollTrigger.refresh()?

Call ScrollTrigger.refresh() only when the layout actually changes, such as after content loads. Avoid calling it on every resize, and debounce it when possible to reduce recalculation work.

Why does my GSAP animation stutter with many elements?

Stuttering with many elements usually comes from hundreds of simultaneous tweens or animating layout properties. Use stagger instead of separate tweens, animate only visible items, and consider virtualization for long lists.