agentleFS
bo-516bo-516/NiceDesign/skills/web/web-animation/SKILL.md

web-animation

Skill1 starsChanged 23 days agoMITView on GitHub

Use when adding web animation, scroll effects, timelines, pinning, parallax, or GSAP/ScrollTrigger/React animation. Distilled from official greensock/gsap-skills plus ui-craft and taste-skill motion budgets.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. omspradippatil/Claude-Skills★ 3same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository7 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Prefer aliases: x y scale rotation xPercent yPercent.

    line 33
  2. Very specific:

    Don't animate width/height/top/left if transform works.

    line 34
  3. Distinctive:

    Put ScrollTrigger on timeline / top-level tween, never nested child tweens.

    line 73
  4. Very specific:

    Create triggers top→bottom or set refreshPriority.

    line 74
  5. Very specific:

    After DOM/fonts/images change: ScrollTrigger.refresh().

    line 75
  6. Very specific:

    Prefer useGSAP + scope; else gsap.context + ctx.revert().

    line 89
  7. Distinctive:

    No GSAP during SSR.

    line 91

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Web Animation (GSAP-first)

Distilled from greensock/gsap-skills + ui-craft/taste motion rules. Prefer GSAP for timelines, scroll, SVG, sequencing. CSS/motion OK for trivial hover.

Decision

  1. Justify: hierarchy / state / space / story — else cut.
  2. Frequency: 100+/day → none; occasional → 200–300ms; once → may delight.
  3. One authored moment > fade-slide every section.
  4. Claimed motion intensity must actually ship; else lower the dial.
  5. Marquee ≤1 per page. No scroll-jacking / window.onscroll polling.

Library choice

NeedUse
Timeline, scrub, pin, SVG morph, interruptible sequenceGSAP
Trivial opacity/transform hoverCSS transition
React layout shared-element onlyMotion OK; don't mix GSAP+Motion in same tree

Install: gsap (+ @gsap/react in React). Always gsap.registerPlugin(...) before use.

GSAP core

  • Tweens: to / from / fromTo / set. camelCase props.
  • Prefer aliases: x y scale rotation xPercent yPercent; autoAlpha over opacity when hiding.
  • Don't animate width/height/top/left if transform works.
  • Ease: power2.out default; none for scrub-linked; no bounce on chrome.
  • Stagger: 0.1 or { each, from }. Prefer stagger over many delayed tweens.
  • Sequence with timeline, not chained delay.
  • Relative: "+=20". overwrite: "auto" when fighting.
  • Stacked from/fromTo on same prop → later ones immediateRender: false.
  • Defaults: gsap.defaults({ duration: 0.6, ease: "power2.out" }).
  • Hot mouse follow: gsap.quickTo().

Accessibility / responsive

const mm = gsap.matchMedia();
mm.add({
  isDesktop: "(min-width: 800px)",
  reduceMotion: "(prefers-reduced-motion: reduce)"
}, (ctx) => {
  const { reduceMotion } = ctx.conditions;
  gsap.to(".el", { y: reduceMotion ? 0 : 40, duration: reduceMotion ? 0 : 0.8 });
});
// unmount: mm.revert()

ScrollTrigger

gsap.registerPlugin(ScrollTrigger);
gsap.timeline({
  scrollTrigger: {
    trigger: ".section",
    start: "top top",
    end: "+=1000",
    scrub: 1,      // OR toggleActions — not both
    pin: true,     // animate children, not the pinned el
    // markers: true // dev only
  }
}).to(".a", { x: 100 }).to(".b", { autoAlpha: 0 });
  • Put ScrollTrigger on timeline / top-level tween, never nested child tweens.
  • Create triggers top→bottom or set refreshPriority.
  • After DOM/fonts/images change: ScrollTrigger.refresh().
  • Fake horizontal: pin wrapper; animate inner x/xPercent with ease: "none"; nested triggers use containerAnimation.
  • Cleanup SPA: ScrollTrigger.getAll().forEach(t => t.kill()) or context revert.

React

import { useGSAP } from "@gsap/react";
gsap.registerPlugin(useGSAP, ScrollTrigger);
useGSAP(() => {
  gsap.from(".item", { autoAlpha: 0, y: 24, stagger: 0.08 });
}, { scope: containerRef });
  • Prefer useGSAP + scope; else gsap.context + ctx.revert().
  • Event-created tweens → wrap with contextSafe.
  • No GSAP during SSR.

Performance

  • Compositor only: transform + opacity (+ autoAlpha).
  • will-change: transform only while animating.
  • Kill off-screen / route-leave animations.
  • Batch lists: ScrollTrigger.batch for enter staggers.

Patterns (minimal)

Sticky stack: pin each card start: "top top", pinSpacing: false; scale/fade driven by next card scrub.

Reveal: from autoAlpha+y once in view (toggleActions or batch) — not every dashboard widget.

Ban

  • ScrollTrigger on timeline children
  • scrub + toggleActions together
  • ease ≠ none on horizontal scrub track
  • markers in production
  • elastic/bounce on buttons
  • Entrance animations on every page load / every metric card
  • Mixing GSAP and Motion on the same nodes

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.