skills/ui-animation/SKILL.md
Creates, reviews, and debugs UI motion and animation implementations. Covers springs, gestures, drag interactions, clip-path reveals, easing curves, timing, CSS transition recipes, and animation review. Use when designing, implementing, or reviewing motion, CSS transitions, keyframes, framer-motion, spring animations, or asking "add animations to", "make this feel smooth", "review my animations", "should this animate", "add a swipe gesture", or "add a transition". For recreating motion from a screen recording or video, use reverse-engineer-animation; for overall visual direction and styling, use ui-design; for named text-effect specs (typewriter, line reveal, kinetic builds), use animate-text.
npx skillsauth add mblode/agent-skills ui-animationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
reverse-engineer-animation), choosing overall visual direction, palettes, or typography (use ui-design), or auditing a whole page's UI quality (use ui-audit).| File | Read when | | -------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | | references/decision-framework.md | Default: deciding whether/why to animate, picking easing character | | references/spring-animations.md | Using spring physics, framer-motion useSpring, configuring spring params | | references/component-patterns.md | Building buttons, popovers, tooltips, drawers, modals, toasts with animation | | references/clip-path-techniques.md | Using clip-path for reveals, tabs, hold-to-delete, comparison sliders | | references/gesture-drag.md | Implementing drag, swipe-to-dismiss, momentum, pointer capture | | references/performance-deep-dive.md | Debugging jank, CSS vs JS, WAAPI, CSS variables trap, Framer Motion caveats | | references/review-format.md | Reviewing animation code: Before/After/Why table and issue checklist | | references/contextual-animations.md | Implementing contextual icon swaps, word-level stagger entrances, or fixed-offset exit animations | | references/transition-recipes.md | Installing a CSS transition: card resize, badge, dropdown, modal, panel, page slide, icon swap, number pop-in, text swap, success animation, avatar hover, error shake |
requestAnimationFrame). Under load, CSS stays smooth while JS drops frames.@starting-style for DOM entry animations; fall back to a data-mounted attribute where support is insufficient.filter: blur(2px) can hide rough crossfades between swapped content.transform and opacity only; they skip layout and paint.color, background-color, and opacity are acceptable.width, height, top, left); they trigger layout recalculation every frame. (Exception: a deliberate container resize tween, see the card-resize recipe.)transition: all; it animates unintended properties and silently picks up future ones. List properties explicitly.filter animation for core interactions; keep blur ≤ 20px if unavoidable, since heavy blur is expensive, especially in Safari.<g> wrapper with transform-box: fill-box; transform-origin: center; without it, transforms rotate/scale around the SVG canvas origin.[data-theme-switching] * { transition: none !important }); otherwise every themed property animates at once.| Element | Duration | Easing |
| ----------------------------- | ------------ | -------------------------------- |
| Button press feedback | 100-160ms | cubic-bezier(0.22, 1, 0.36, 1) |
| Tooltips, small popovers | 125-200ms | ease-out or enter curve |
| Dropdowns, selects | 150-250ms | cubic-bezier(0.22, 1, 0.36, 1) |
| Modals, drawers | 200-350ms | cubic-bezier(0.22, 1, 0.36, 1) |
| Move/slide on screen | 200-300ms | cubic-bezier(0.25, 1, 0.5, 1) |
| Page transitions | 250-400ms | enter or move curve |
| Simple hover (colour/opacity) | 200ms | ease |
| Illustrative/marketing | Up to 1000ms | Spring or custom |
Keep routine UI animation under 300ms; scale duration with distance traveled (a full-screen slide can exceed 300ms, a 6px tooltip shift should be under 150ms).
Named curves
cubic-bezier(0.22, 1, 0.36, 1) for entrances and transform-based hovercubic-bezier(0.25, 1, 0.5, 1) for slides, drawers, panelscubic-bezier(0.32, 0.72, 0, 1)Avoid ease-in for UI; it starts slow, so the element lags the user's action and feels sluggish. Prefer custom curves from easing.dev over built-in ease/ease-out, whose gentle acceleration reads soft rather than decisive.
Match the UI element first, then choose the recipe from references/transition-recipes.md:
| UI pattern | Recipe | |---|---| | Trigger + floating dot/count | Notification badge | | Trigger + anchored surface | Menu dropdown | | Centred surface on top of page | Modal dialog | | Panel sliding into existing container | Panel reveal | | List ↔ detail or wizard steps | Page side-by-side slides | | Element dimension changes | Card resize | | Text updating in place | Text state swap | | Two icons in same slot | Icon swap | | Number updating | Number pop-in | | Confirmation / success moment | Success celebration | | Hovering item in horizontal stack | Avatar group hover | | Form validation error | Error state shake |
Prefer lower-overhead transitions (CSS-only) unless the design requires JS orchestration.
transform-origin at the trigger point for popovers; keep center for modals (they represent app-level state, not an anchored trigger).scale(0.85-0.9). Never scale(0); nothing in the real world appears from nothing.prefers-reduced-motion: reduce path: disable transform/keyframe motion, keep instant state changes or opacity-only fades. All transition recipes include the guard.@media (hover: hover) and (pointer: fine); otherwise touch devices replay hover effects on tap. Tailwind v4 hover: utilities apply this guard automatically; skip the manual media query there.IntersectionObserver; they burn GPU even when invisible.will-change only during heavy motion and only for transform/opacity; remove it after. Each promotion costs compositor memory, and permanent promotion across many elements is worse than none.transform directly on the moving element.x/y values are the normal choice for axis movement and drag (they bypass React re-renders). Use a full transform string only when one owner must combine multiple transform functions or interop with non-Motion code.High-signal failures not already covered by the rules above:
x/y props with a handwritten transform string on the same element: both write transform, so one silently clobbers the other. Pick one transform owner.Copy and track this checklist:
Animation progress:
- [ ] Step 1: Decide whether the interaction should animate
- [ ] Step 2: Choose purpose, easing, and duration
- [ ] Step 3: Pick the implementation style
- [ ] Step 4: Load the relevant component or technique reference
- [ ] Step 5: Validate timing, interruption, and device behavior
Produce evidence for each check (DevTools observations, not "looks fine"):
width, height, top, left) and transition: all.transform-origin issues invisible at full speed.prefers-reduced-motion: reduce (DevTools Rendering panel) and confirm every animation has a reduced path.will-change is toggled around animations, not permanently set, and looping animations pause off-screen.reverse-engineer-animation: extracts an animation spec from a screen recording; hand its output here for production implementation.ui-design: visual direction, palettes, typography; settle the visual system before tuning motion.ui-audit: page/feature-level UI quality audit; its motion findings route back to this skill for fixes.animate-text: curated catalog of named text effects (typewriter, line reveal, stagger builds) with exact JSON specs.development
Designs and builds UI end to end, from visual direction (palettes, type scales, design tokens, layout systems, landing-page CRO strategy, brand kits) to Tailwind implementation with the ui.sh design guideline system, including multiple variants with an in-browser picker, semantic markup scaffolds from screenshots, retrofitting dark mode or responsive behavior, and componentizing or canonicalizing Tailwind code. Use when asked to "build a landing page", "create a dashboard", "make this look good", "make this look premium", "pick a visual style", "design the UI for", "show me 3 hero options", "improve conversions", "create a brand kit", "turn this screenshot into markup", "add dark mode", "make a dark version of this image", "make this responsive", "fix this on mobile", "componentize this page", "clean up the Tailwind", or any prompt that designs, creates, or refines UI code. For auditing existing UI use ui-audit; for motion use ui-animation; for landing page copy use copywriting.
development
Collaborative interrogation that produces an implementation plan before any code is written. Explores the codebase and relevant docs first, asks one question at a time with a concrete recommended answer, grills the rationale behind documented decisions, flags fuzzy terminology, and walks a decision tree until shared understanding is reached, then writes a plan file. First step of the shipping pipeline; it creates plans, plan-reviewer stress-tests them, pr-creator opens the PR. Use when asked to "create a plan", "help me think through this", "plan this feature", "I want to build X", "grill me", "grill with docs", "understand the docs", "unpack the decisions", "brainstorm a spec", "what should the plan be", "think this through with me", or before starting any non-trivial implementation.
development
--- name: pr-reviewer description: Reviews the current local diff or branch and returns a read-only, severity-tiered findings report. It never edits files. Four modes: standard bug and compliance review, structural quality, AI slop detection, and whole-codebase security audit. Use when asked to run /pr-reviewer, "review my changes", or "code review" before commit, push, or handoff. "Thermo-nuclear review", "structural review", "deep code quality audit", "harsh maintainability review", and "code
development
--- name: ux-audit description: Feature-level UX audit for React/Next.js code, diff-aware by default. Catches what Lighthouse, axe, ESLint, and Storybook miss: state-coverage gaps (missing loading/empty/error), form data loss on validation, double-submit, broken focus management, optimistic UI without rollback, stale async responses, skeleton-induced layout shift, and vague microcopy. 33 modern failure-mode rules plus 30 Laws of UX rules across 12 feature playbooks. Produces a 3-tier ship-readin