agentleFS
qyndexqyndex/claude-init/.claude/skills/animation-discipline/SKILL.md

animation-discipline

Skill2 starsChanged 5 months agoMITView on GitHub

Use when adding transitions, hover states, scroll triggers, motion. Enforces easing/duration discipline, prefers-reduced-motion, GPU-friendly properties only, View Transitions API for routes. Round 9 C.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    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. Distinctive:

    GSAP / ScrollTrigger: only when scroll-driven storytelling justified

    line 73
  2. Distinctive:

    All durations within table

    line 95
  3. Distinctive:

    All animated properties GPU-friendly

    line 96

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

Animation Discipline

Mandate

Motion should clarify, not distract. Discipline beats vibes.

Decisions encoded

Easing

ContextEasing
Element entranceeaseOut (decelerate; feels arriving)
Element exiteaseIn (accelerate; feels leaving)
State transitioneaseInOut
Spring (interactive)useSpring with stiff/damp values
Neverlinear for UI motion

Duration

TypeDuration
Hover, focus, tooltip100-200ms
Modal open, dropdown200-300ms
Page/route transition400-600ms
Hero or showcase animation800ms-1.5s
Never>2s for non-decorative

GPU-friendly only

Animate ONLY:

  • transform (translate, scale, rotate)
  • opacity
  • filter (sparingly — blur is expensive on mobile)

NEVER animate:

  • width / height / top / left / padding / margin (layout thrash)
  • box-shadow directly (use a pseudo-element with opacity)
  • background-color on large surfaces (paint cost)

Reduced motion

Wrap or short-circuit every animation:

import { useReducedMotion } from 'framer-motion';

const prefersReduced = useReducedMotion();
<motion.div animate={prefersReduced ? {} : { opacity: 1, y: 0 }} />

CSS equivalent:

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

Library choice

  • Framer Motion for stateful component motion (modals, layouts, gestures)
  • CSS transitions for hover/focus (no JS overhead)
  • View Transitions API for cross-route transitions (when browser supports)
  • GSAP / ScrollTrigger only when scroll-driven storytelling justified
  • three.js / r3f for 3D — separate skill (creative-web)

Hard rules

  • Respect prefers-reduced-motion
  • GPU-only properties
  • Easing per the table; never linear for entrance/exit
  • Duration per the table; never >2s for non-decorative
  • One library per animation domain (don't mix framer-motion + react-spring)

Common pitfalls

  1. Animating height: auto — physically impossible without measurement; use max-height trick or framer-motion's layout prop
  2. Forgetting will-change for transform-heavy elements (rare, but useful for paint promotion)
  3. Animations triggered before mount — wrap in useEffect or use initial prop properly
  4. Easing chosen by name only — easeIn for entrance feels WRONG; verify direction matters
  5. Not testing on slow mobile — what looks smooth on M1 Mac may jank on $200 Android

Done means

  • prefers-reduced-motion respected
  • All durations within table
  • All animated properties GPU-friendly
  • Mobile tested at 4x CPU throttle (Chrome DevTools)

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.