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.
In this repository60 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- analyzeSkill
- api-versioningSkill
- autopilotSkill
- browser-e2eSkill
- characterizeSkill
- clarifySkill
- codemodSkill
- constitution-compactSkill
- constitutionSkill
- context-budgetSkill
- creative-webSkill
- db-migrationSkill
- debugSkill
- detect-stackSkill
- dispatch-criteriaSkill
- dreamSkill
- experimentSkill
- fastapiSkill
- flag-cleanupSkill
- flag-rolloutSkill
- flask-realtimeSkill
- framework-detectorSkill
- front-end-designSkill
- grill-meSkill
- handoffSkill
- image-generationSkill
- implementSkill
- initiativeSkill
- instinctSkill
- loopSkill
- nextjsSkill
- observabilitySkill
- okr-alignSkill
- parallel-swarmSkill
- pivotSkill
- planSkill
- pr-bodySkill
- prime-disciplineSkill
- prod-observabilitySkill
- react-nodeSkill
- react-viteSkill
- release-trainSkill
- researchSkill
- reviewSkill
- security-guardSkill
- self-healSkill
- shipSkill
- skill-creatorSkill
- specifySkill
- tailwind-disciplineSkill
- tasksSkill
- tdd-loopSkill
- token-budgetSkill
- typographySkill
- verify-loopSkill
- verifySkill
- wip-checkpointSkill
- <kebab-case-skill-name>Skill
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
- Distinctive: line 73
GSAP / ScrollTrigger: only when scroll-driven storytelling justified
- Distinctive: line 95
All durations within table
- Distinctive: line 96
All animated properties GPU-friendly
≈ “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.
Files
Animation Discipline
Mandate
Motion should clarify, not distract. Discipline beats vibes.
Decisions encoded
Easing
| Context | Easing |
| Element entrance | easeOut (decelerate; feels arriving) |
| Element exit | easeIn (accelerate; feels leaving) |
| State transition | easeInOut |
| Spring (interactive) | useSpring with stiff/damp values |
| Never | linear for UI motion |
Duration
| Type | Duration |
| Hover, focus, tooltip | 100-200ms |
| Modal open, dropdown | 200-300ms |
| Page/route transition | 400-600ms |
| Hero or showcase animation | 800ms-1.5s |
| Never | >2s for non-decorative |
GPU-friendly only
Animate ONLY:
transform(translate, scale, rotate)opacityfilter(sparingly — blur is expensive on mobile)
NEVER animate:
width/height/top/left/padding/margin(layout thrash)box-shadowdirectly (use a pseudo-element with opacity)background-coloron 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
linearfor 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
- Animating
height: auto— physically impossible without measurement; usemax-heighttrick or framer-motion'slayoutprop - Forgetting
will-changefor transform-heavy elements (rare, but useful for paint promotion) - Animations triggered before mount — wrap in
useEffector useinitialprop properly - Easing chosen by name only —
easeInfor entrance feels WRONG; verify direction matters - Not testing on slow mobile — what looks smooth on M1 Mac may jank on $200 Android
Done means
prefers-reduced-motionrespected- All durations within table
- All animated properties GPU-friendly
- Mobile tested at 4x CPU throttle (Chrome DevTools)
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
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.

