agentleFS
matheus-rib1108matheus-rib1108/meu-kit-claude-code/skills/outras/fixing-motion-performance/SKILL.md

fixing-motion-performance

Skill0 starsChanged 26 days agoMITView on GitHub

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.

12 other projects use a version of this, 5 of them edited; 1 new project in the last 4 weeks, against 1 the 4 before.

Adopted by

Steady: 1 new project took it in the last 4 weeks, 1× the 4 weeks before.thin data

Week of Sep 13: 0 new projectsWeek of Sep 20: 0 new projectsWeek of Sep 27: 1 new projectWeek of Oct 4: 0 new projectsWeek of Oct 11: 0 new projectsWeek of Oct 18: 0 new projectsWeek of Oct 25: 0 new projectsWeek of Nov 1: 1 new project
Sep 2026Oct 2026Nov 2026
New projects taking a version of this file each week, over the 8 weeks our latest run read: only 2 in all, so this is a hint, not a trend.

Most recently taken up by

Used with

Projects with it also use ui-skills-root and improve-ui.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Discriminative-shoji607Skill

    ui-skills-root

    Use before UI-related work to select the smallest useful UI Skills context through the ui-skills CLI.

    Also in 3 projects that use this

  • Discriminative-shoji607Skill

    improve-ui

    Audit an existing product surface against its own design evidence, identify verified UI problems, and write self-contained implementation plans for another agent. Strictly read-only on product source. Use when asked to review, refine, improve, or clean up an interface without replacing its identity; investigate design-system drift; or prepare a design handoff.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

32 rules. 18 are common, 14 are distinctive, and 0 are very specific to this project.

  • 18

    Common

    Most of the 7 edited versions we read keep these.

  • 14

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Common:

    Do not migrate animation libraries unless explicitly requested.

    line 21
  2. Common:

    do not interleave layout reads and writes in the same frame

    line 56
  3. Common:

    do not animate layout continuously on large or meaningful surfaces

    line 57
  4. Common:

    do not drive animation from scrollTop, scrollY, or scroll events

    line 58
  5. Distinctive:

    no requestAnimationFrame loops without a stop condition

    line 59
  6. Common:

    do not mix multiple animation systems that each measure or mutate layout

    line 60
  7. Distinctive:

    default to transform and opacity for motion

    line 64
  8. Common:

    use JS-driven animation only when interaction requires it

    line 65
  9. Common:

    prefer downgrading technique over removing motion entirely

    line 68
  10. Common:

    do not read layout repeatedly during an animation

    line 74
  11. Common:

    prefer FLIP-style transitions for layout-like effects

    line 75
  12. Distinctive:

    prefer approaches that batch measurement and writes

    line 76
  13. Distinctive:

    prefer Scroll or View Timelines for scroll-linked motion when available

    line 80
  14. Distinctive:

    use IntersectionObserver for visibility and pausing

    line 81
  15. Distinctive:

    do not poll scroll position for animation

    line 82
  16. Common:

    do not animate paint-heavy properties on large containers

    line 89
  17. Distinctive:

    do not animate CSS variables for transform, opacity, or position

    line 90
  18. Distinctive:

    do not animate inherited CSS variables

    line 91
  19. Distinctive:

    use will-change temporarily and surgically

    line 97
  20. Common:

    avoid many or large promoted layers

    line 98
  21. Distinctive:

    keep blur animation small (<=8px)

    line 103
  22. Distinctive:

    use blur only for short, one-time effects

    line 104
  23. Distinctive:

    never animate blur continuously

    line 105
  24. Common:

    never animate blur on large surfaces

    line 106
  25. Distinctive:

    prefer opacity and translate before blur

    line 107
  26. Common:

    use view transitions only for navigation-level changes

    line 111
  27. Common:

    avoid view transitions for interaction-heavy UI

    line 112
  28. Common:

    avoid view transitions when interruption or cancellation is required

    line 113
  29. Common:

    treat size changes as potentially layout-triggering

    line 114
  30. Common:

    do not migrate or rewrite animation libraries unless explicitly requested

    line 118
  31. Distinctive:

    never partially migrate APIs or mix styles within the same component

    line 120
  32. Common:

    when reviewing, prefer actionable notes and concrete alternatives over theory

    line 151

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

fixing-motion-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

prioritycategoryimpact
1never patternscritical
2choose the mechanismcritical
3measurementhigh
4scrollhigh
5paintmedium-high
6layersmedium
7blur and filtersmedium
8view transitionslow
9tool boundariescritical

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; }
/* after */  .panel { transition: transform 0.3s; }

/* scroll-linked: use scroll-timeline instead of JS */
/* before */ window.addEventListener('scroll', () => el.style.opacity = scrollY / 500)
/* after */  .reveal { animation: fade-in linear; animation-timeline: view(); }
// measurement: batch reads before writes (FLIP)
// before — layout thrash
el.style.left = el.getBoundingClientRect().left + 10 + 'px';
// after — measure once, animate via transform
const first = el.getBoundingClientRect();
el.classList.add('moved');
const last = el.getBoundingClientRect();
el.style.transform = `translateX(${first.left - last.left}px)`;
requestAnimationFrame(() => { el.style.transition = 'transform 0.3s'; el.style.transform = ''; });

review guidance

  • enforce critical rules first (never patterns, tool boundaries)
  • choose the least expensive rendering work that matches the intent
  • for any non-default choice, state the constraint that justifies it (surface size, duration, or interaction requirement)
  • when reviewing, prefer actionable notes and concrete alternatives over theory

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.