Stop animations stuttering
Point Claude at animations that stutter and it finds the cause, like layout work every frame, and fixes it.
See it work
You give it
Use fixing-motion-performance. The home page of our phulkari embroidery shop in Amritsar stutters on mid-range Android phones, mostly while scrolling. Here's all the motion code:
.hero-bg { filter: blur(20px); animation: drift 12s infinite alternate; }
@keyframes drift { to { filter: blur(30px); transform: scale(1.1); } }
.card:hover { width: 110%; box-shadow: 0 20px 40px #0003; transition: all .4s; }
window.addEventListener('scroll', () => {
header.style.height = Math.max(56, 96 - scrollY) + 'px';
hero.style.top = scrollY * 0.4 + 'px';
});
function tick() { ticker.style.left = (ticker.offsetLeft - 1) + 'px'; requestAnimationFrame(tick); }
tick();
You get back
Violations
1. header.style.height = Math.max(56, 96 - scrollY) + 'px'; inside the scroll listener
Why: changing height from a scroll event makes the browser redo layout on every scroll event, which is exactly when your phones stutter.
Fix: keep the header's real height fixed at 96px and shrink what you see with a transform on a scroll timeline. Over the first 40px of scroll it slides up 40px, leaving 56px showing, the same as your code, and the inside slides back down 20px so the logo stays centred. Wrap the header's contents in a <div class="inner"> if they aren't already:
header { position: fixed; top: 0; left: 0; right: 0; height: 96px; }
@supports (animation-timeline: scroll()) {
header {
animation: header-shrink linear both;
animation-timeline: scroll();
animation-range: 0px 40px;
}
header .inner {
animation: header-recentre linear both;
animation-timeline: scroll();
animation-range: 0px 40px;
}
}
@keyframes header-shrink { to { transform: translateY(-40px); } }
@keyframes header-recentre { to { transform: translateY(20px); } }
animation-timeline has to come after the animation shorthand, because the shorthand resets it. The @supports wrapper matters: in a browser without scroll timelines, the same animation would play instantly on load and leave the header stuck at 56px.
Part of a run in Claude (Opus 5.5), Nov 2026
What it does
- Moves animation to properties that are cheap to draw.
- Fixes scroll effects that stutter.
- Keeps blur and filters under control.
What's inside
fixing-motion-performance/CREDITS.mdfixing-motion-performance/LICENSEfixing-motion-performance/SKILL.md
How you use it
- Get the skill: one zip file. It comes with every paid plan.
- Add it to Claude. In Claude, open Customize (Plugins on newer screens), then Skills. Press +, then Create skill, then Upload a skill. In Claude Code, unzip it into ~/.claude/skills/ instead.
- Start a new chat and tell Claude what you need, the way the example above does. The skill takes it from there.
- Then ask for the work. Claude reaches for the skill when it fits, or name it: "use fixing-motion-performance".
Get this skill with a paid plan
The download comes with every paid plan, along with all 204 Claude skills and the rest of the AI toolkit. “Sites that don't look templated” in this folder is free, so you can try one first.