agentleFS
ohnoshivmohnoshivm/creative-engineering-os/skills/ceos-motion-direction/SKILL.md

ceos-motion-direction

Skill0 starsChanged 12 days agoMITView on GitHub

Designs and engineers motion as a coordinated system — motion tokens, easing and timing, choreography and sequencing, scroll choreography with GSAP ScrollTrigger, kinetic typography, SVG animation, cinematic and route transitions, gesture- and physics-driven motion, interruption and cleanup, reduced-motion alternatives, and frame scheduling/profiling. Use when animating anything on a website, writing a motion spec, choosing GSAP vs CSS vs WAAPI vs Motion, fixing janky or "cheap-feeling" animation, or adding smooth scroll.

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 2 are distinctive, and 3 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.

  • 3

    Very specific

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

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

    Lenis: only when smooth scroll is part of the concept.

    line 52
  2. Distinctive:

    Tempus: only when several systems (Lenis, GSAP, a WebGL loop) must share one RAF and you've measured drift.

    line 54
  3. Very specific:

    Read layout once, write many (avoid forced reflow).

    line 60
  4. Very specific:

    Never hide content with JS-set initial states that fail open: set from states in JS *after* the script runs (or with a .js class), so no-JS …

    line 65
  5. Distinctive:

    keep fades/colour changes ≤ 200 ms.

    line 71

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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

Motion direction and animation engineering

Purpose

Motion that means something (hierarchy, causality, continuity, feedback) and feels authored — and engineering that keeps it at frame rate, interruptible and accessible. For API details load gsap-core, gsap-timeline, gsap-scrolltrigger, gsap-performance or motion; this skill decides what and how well.

What separates good motion from merely working motion

  1. Purpose — every move answers: what changed, where did it come from, what should I look at next?
  2. One signature — a single memorable move per page; everything else supports it quietly.
  3. Consistent physics — a small set of easings and durations reused everywhere (tokens), not per-element taste.
  4. Spatial continuity — elements travel from where they were to where they go; no teleports, no unrelated fades.
  5. Choreography — overlap and stagger create hierarchy (lead element first, supporting 60–120 ms later); nothing all-at-once, nothing one-by-one forever.
  6. Responsiveness — input-driven motion starts within one frame and can be interrupted/reversed from any state.
  7. Restraint at rest — idle motion is slow and small; the page is calm when the user is reading.

Motion tokens (start here, tune per brand)

TokenValueUse
--dur-micro120–180 mspress, hover, toggles
--dur-ui240–360 msmenus, panels, small reveals
--dur-move500–800 mselement travel, section entrances
--dur-scene900–1600 mspage/scene transitions (never block input this long)
--ease-outcubic-bezier(.16,1,.3,1) (expo-ish out)arrivals
--ease-in-outcubic-bezier(.65,0,.35,1)travel between two rest states
--ease-incubic-bezier(.7,0,.84,0)exits (shorter than entrances)
stagger40–90 mslists, words, lines
scroll scrub smoothingscrub: 0.4–1scroll-linked scenes

Exits ≈ 70 % of entrance duration. Distances scale duration (√distance), not linear.

Choosing the tool

  • CSS transitions / @keyframes: state changes, hovers, simple reveals (compositor-friendly, zero JS).
  • CSS scroll-driven animations (animation-timeline: view()/scroll()): simple scroll-linked effects where supported; feature-detect, fall back to static.
  • WAAPI: programmatic one-offs without a library.
  • GSAP + ScrollTrigger: timelines, sequencing, scrubbed scroll scenes, pinning, SVG/morph plugins, complex choreography. One gsap.context()/useGSAP per component for cleanup.
  • Motion (motion.dev): React gesture/layout/spring animations.
  • Springs / second-order dynamics: pointer-following, drag release, physical UI. A critically damped spring or second-order system (frequency f, damping ζ, response r) gives natural follow without overshoot when ζ≥1.
  • Lenis: only when smooth scroll is part of the concept; then make it the only scroll engine, drive ScrollTrigger from it (lenis.on('scroll', ScrollTrigger.update) + gsap.ticker), keep keyboard and anchors working.
  • Tempus: only when several systems (Lenis, GSAP, a WebGL loop) must share one RAF and you've measured drift.

Engineering rules

  • Animate transform and opacity (and filter/clip-path sparingly). Never animate layout properties per frame.
  • One RAF owner per page (GSAP ticker or your loop); WebGL reads scroll/pointer state, doesn't own extra RAFs.
  • Read layout once, write many (avoid forced reflow); will-change only during the animation.
  • Scroll scenes: scrub with ease: "none" inside the scrubbed timeline; pin the wrapper, animate children; create triggers top-to-bottom; ScrollTrigger.refresh() after fonts/images load.
  • Interruption: every timeline can reverse or be killed mid-flight; use overwrite: "auto"; guard double triggers.
  • Cleanup: kill timelines/ScrollTriggers/listeners on unmount or route change.
  • Never hide content with JS-set initial states that fail open: set from states in JS after the script runs (or with a .js class), so no-JS shows content.

Reduced motion (designed, not deleted)

@media (prefers-reduced-motion: reduce) and gsap.matchMedia():

  • keep fades/colour changes ≤ 200 ms; remove travel, parallax, zoom, scrubbed camera moves, auto-advance, smoothing;
  • replace scroll scenes with their key frames as static compositions;
  • 3D: render a still frame or idle without camera motion.

Motion spec format (per scene)

ID · trigger (load/scroll range/hover/click/drag) · elements · from → to · duration/easing or scroll mapping · stagger/overlap · interruption behaviour · reduced-motion alternative · perf notes.

Verification

  • Record the interaction (CDP screencast / Playwright video) and inspect frames; sample transforms per frame to check the easing curve and duration against the spec.
  • Performance panel: no long tasks > 50 ms during the move; no layout/paint storms; 60 fps on a mid laptop, stable on 4× CPU throttle.
  • Reduced-motion run screenshots show complete content.

Failure criteria

Fade-up on every section; different easing per element; scroll hijack; content invisible without JS; animations that can't be interrupted; motion during reading; multiple RAF loops; jank on scroll start.

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.