Skip to content
Skillpedia
Websites & UI (frontend)48k · #3017

fixing-motion-performance

Helps your agent fix animation problems. Makes animations and transitions smoother. Useful when things are stuttering.

What it does

This tool helps fix animations that stutter or run slowly on websites and apps. It checks if the code follows best practices to ensure everything runs smoothly.

When to use it

  • ✓When animations on a website stutter.
  • ✓When noticing that transitions are janky.
  • ✓When reviewing animation code to ensure good performance.

Example of what to ask your AI

“Analyze this code and tell me if there are animation performance issues and how to fix them: [code here]”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/fixing-motion-performance/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/fixing-motion-performance/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

It analyzes your animation code, looking for patterns that cause slowdowns, like animations requiring too many calculations or not using the right computer parts to run. Then, it suggests specific fixes.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add sickn33/agentic-awesome-skills --skill fixing-motion-performance

Or download just the file:

curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/fixing-motion-performance/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

fixing-motion-performance

When to Use

Use this skill when you need audit and fix animation performance issues including layout thrashing, compositor properties, scroll-linked motion, and blur effects. Use when animations stutter, transitions jank, or reviewing CSS/JS animation performance.

Fix animation performance issues.

how to use

  • /fixing-motion-performance Apply these constraints to any UI animation work in this conversation.

  • /fixing-motion-performance <file> Review the file against all rules below and report:

    • violations (quote the exact line or snippet)
    • why it matters (one short sentence)
    • a concrete fix (code-level suggestion)

Do not migrate animation libraries unless explicitly requested. Apply rules within the existing stack.

when to apply

Reference these guidelines when:

  • adding or changing UI animations (CSS, WAAPI, Motion, rAF, GSAP)
  • refactoring janky interactions or transitions
  • implementing scroll-linked motion or reveal-on-scroll
  • animating layout, filters, masks, gradients, or CSS variables
  • reviewing components that use will-change, transforms, or measurement

rendering steps glossary

  • composite: transform, opacity
  • paint: color, borders, gradients, masks, images, filters
  • layout: size, position, flow, grid, flex

rule categories by priority

priority category impact
1 never patterns critical
2 choose the mechanism critical
3 measurement high
4 scroll high
5 paint medium-high
6 layers medium
7 blur and filters medium
8 view transitions low
9 tool boundaries critical

quick reference

1. never patterns (critical)

  • do not interleave layout reads and writes in the same frame
  • do not animate layout continuously on large or meaningful surfaces
  • do not drive animation from scrollTop, scrollY, or scroll events
  • no requestAnimationFrame loops without a stop condition
  • do not mix multiple animation systems that each measure or mutate layout

2. choose the mechanism (critical)

  • default to transform and opacity for motion
  • use JS-driven animation only when interaction requires it
  • paint or layout animation is acceptable only on small, isolated surfaces
  • one-shot effects are acceptable more often than continuous motion
  • prefer downgrading technique over removing motion entirely

3. measurement (high)

  • measure once, then animate via transform or opacity
  • batch all DOM reads before writes
  • do not read layout repeatedly during an animation
  • prefer FLIP-style transitions for layout-like effects
  • prefer approaches that batch measurement and writes

4. scroll (high)

  • prefer Scroll or View Timelines for scroll-linked motion when available
  • use IntersectionObserver for visibility and pausing
  • do not poll scroll position for animation
  • pause or stop animations when off-screen
  • scroll-linked motion must not trigger continuous layout or paint on large surfaces

5. paint (medium-high)

  • paint-triggering animation is allowed only on small, isolated elements
  • do not animate paint-heavy properties on large containers
  • do not animate CSS variables for transform, opacity, or position
  • do not animate inherited CSS variables
  • scope animated CSS variables locally and avoid inheritance

6. layers (medium)

  • compositor motion requires layer promotion, never assume it
  • use will-change temporarily and surgically
  • avoid many or large promoted layers
  • validate layer behavior with tooling when performance matters

7. blur and filters (medium)

  • keep blur animation small (<=8px)
  • use blur only for short, one-time effects
  • never animate blur continuously
  • never animate blur on large surfaces
  • prefer opacity and translate before blur

8. view transitions (low)

  • use view transitions only for navigation-level changes
  • avoid view transitions for interaction-heavy UI
  • avoid view transitions when interruption or cancellation is required
  • treat size changes as potentially layout-triggering

9. tool boundaries (critical)

  • do not migrate or rewrite animation libraries unless explicitly requested
  • apply these rules within the existing animation system
  • never partially migrate APIs or mix styles within the same component

common fixes

/* layout thrashing: animate transform instead of width */
/* before */ .panel { transition: width 0.3s; }

…
FAQ

What is 'layout thrashing'?

It's when code repeatedly asks for information about element sizes and positions during an animation, which makes everything slow.

Which animations are most recommended?

Animations using 'transform' and 'opacity' (shape and transparency changes) are generally faster.

Can I animate anything?

It's best to only animate small, isolated elements if the animation affects 'paint' or 'layout'.

Details

Original description by the author

Audit and fix animation performance issues including layout thrashing, compositor properties, scroll-linked motion, and blur effects. Use when animations stutter, transitions jank, or reviewing CSS/JS animation performance.

repo: sickn33/agentic-awesome-skills

Popularity

GitHub stars
48k
Ranking position
#3017
License
MIT
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills