Agent skill Web motion
Fixing Motion Performance
Fix stuttering transitions by checking expensive animation properties, layout work, blur and scroll-linked effects.
Install the skill
Run the command from your project root with Node.js and npm.
npx skills@latest add ibelick/skills --skill fixing-motion-performance --agent claude-code --yesCheck this file in your project.claude/skills/fixing-motion-performance/SKILL.md
Other ways to install
Choose an assistant interactively
npx skills@latest add ibelick/skills --skill fixing-motion-performanceSelect your assistant and choose the project installation scope.
Official instructions
The tested Skills CLI 1.10.0 requires Node.js 22.20 or later. Open the project in a coding assistant that loads the Skill. Have a reproducible local route and browser performance tools available for measurements.
View operation manualWhat this skill helps with
- Spot animations that repeatedly force layout or repaint.
- Use compositor-friendly properties where the effect allows.
- Review scroll-driven effects and costly blur or filter changes.
Good for
- Stuttering hero effects
- Slow dropdown and modal transitions
- Publisher
- ibelick, in the current ibelick/skills repository.
- Input
- The route, source files if known, exact interaction, and a device or viewport where it stutters.
- Review format
- Show the source line or snippet, its rendering cost, and a concrete fix in the existing stack.
- Evidence
- Comparable before and after recordings, plus a check that the interaction still works.
- Skill name
fixing-motion-performance- Repository
ibelick/skills
Record the slowdown before changing code
A blanket request
Make the page smoother. Add will-change wherever it moves.
A layer hint can add memory pressure, and the underlying cost may be repeated layout or a large repaint.
An interaction you can replay
- Capture the same scroll or click on the same device and viewport.
- Tie the dominant layout, paint, or script work to a source line.
- Apply one focused fix and re-record under matching conditions.
Fixing Motion Performance operation manual
Find out why a scrolling hero stutters or a drawer opening blocks a frame. Use the existing animation stack and verify each change with the same interaction.
Replay one scroll through the first section at phone width and follow the cost back to the responsible handler or CSS.
Record a repeatable scroll
Collect a baseline with the same viewport, browser and throttling you will use to verify the fix.
Prompt · Step 1Use ibelick’s fixing-motion-performance Skill on my stuttering hero. Locate the local route and scripts or styles that respond to scrolling. Use the actual device where the problem occurs if available. Otherwise use a phone-width browser viewport and record that setup, including any CPU throttle. In Chrome DevTools Performance record one scroll down past the hero and back up after the page settles. Name the timestamps with dropped frames or repeated Layout, Paint, or scripting and save the trace. If profiling is unavailable, give source findings with the actual cost marked unverified. Keep this pass read-only.Change the operation that dominates the trace
Use the evidence to tackle the highest-cost path, then keep the visible effect modest and scoped.
Prompt · Step 2Use fixing-motion-performance to fix the dominant cost identified in the hero recording. Name the source line, explain the mechanism, and preserve the current animation library. If the trace shows repeated layout reads and writes, group the needed reads before writes and remeasure only after relevant size changes. Replace continuous scroll polling with a supported scroll timeline for continuous progress or IntersectionObserver for a threshold reveal if it fits the behavior. If the main cost is a changing large blur, try a small translate and fade or a static blurred layer. Keep the hero content and links usable with reduced motion. Report the specific change and the browser path for rechecking it.Repeat the recording and check the page
Replay the same interaction, compare the costly event or frame, and test the reduced-motion state.
- The comparison uses the same interaction and environment.
- Each measured change points to an event or interval in the traces.
- The content and primary action work in both motion modes.
Prompt · Step 3Use fixing-motion-performance to re-record my hero using the saved viewport, browser, throttle, scroll path, and asset state. Compare equivalent segments and cite a concrete change such as fewer repeated Layout events or a shorter Paint interval. Run several comparable passes if the result varies. Check the hero’s normal and reduced-motion variants, navigation, and layout while scrolling back upward. Report differences and trace paths. Mark performance or actual-device results unverified if you could only inspect code or emulate the device.
Find the rule behind the stutter
Pair the affected source line with the interaction and the trace interval if you have one.
Layout work repeats within each scroll frameLayout
- Command or reference
Measurement and scroll- Examples
- Find geometry reads after style writes. Group reads before writes and inspect forced reflow in the trace.
A blur covers most of the viewportPaint
- Command or reference
Blur and filters- Examples
- Compare a fixed blurred layer with an opacity or translation transition over the same region.
Layers stay allocated after a brief interactionLayers
- Command or reference
Layers and will-change- Examples
- Check the Layers or rendering tools and remove unused persistent will-change hints.
Motion performance troubleshooting
Does transform guarantee the animation is cheap?
Transform and opacity are good first choices. Check the actual layer, area, filters, and frame costs in a recording because the rest of the scene still contributes work.
Can the Skill measure frame performance by itself?
It supplies rules and reporting guidance. Record the interaction in a performance tool and use the captured frames and rendering events as evidence.
What if my target browser lacks CSS scroll timelines?
Check feature support in the browser. Provide a static readable state or an entry-based enhancement using IntersectionObserver when the product only needs a threshold reveal.