frontend-animation
Use when the user asks about Motion (Framer Motion), GSAP, CSS keyframes and transitions, the View Transitions API, page transitions, enter/exit or spring…
от j4flmao★ 47 звёзд на GitHub
Установить frontend-animation в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Frontend Animation
Description: Implements web animations -- page transitions, gesture animations, micro-interactions, motion design. Triggered by "animation", "motion", "Framer Motion", "GSAP", "CSS animation", "page transition", "enter animation", "exit animation", "gesture animation", "spring animation", "keyframe", "motion design".
Version: 1.2.0 Author: j4flmao License: MIT
Purpose
Deliver performant, accessible, and cohesive motion design across the frontend -- from micro-interactions to full page transitions -- while respecting user accessibility preferences and maintaining 60fps frame budget across mid-range devices.
Agent Protocol
Trigger
User request includes any of: "animation", "motion", "Framer Motion", "GSAP", "CSS animation", "page transition", "enter animation", "exit animation", "gesture animation", "spring animation", "keyframe", "motion design".
Input Context
- Existing animation libraries in use
- CSS framework / styling approach
- Component tree for targeted animations
- Accessibility requirements
- Performance budget (target 60fps)
- Device target range (mobile-only, desktop, or both)
Output Artifact
Animation strategy as text / animation code snippets.
Response Format
## Strategy
<animation-strategy>
## Implementation
<code-snippets>
## Performance Notes
<gpu-compositing, frame-budget notes>
## Accessibility
<reduced-motion handling>
--
Compression footer: frontend-animation/v1 | 4 sections | lib: <selected> | perf: <ok|warn>
No preamble. No postamble. No explanations. No filler/hedging/transitions. Compress output.
Completion Criteria
- Animations run at 60fps on mid-range devices
- prefers-reduced-motion respected globally
- Only transform/opacity animated
- Page transitions < 500ms, micro-interactions < 300ms
- No layout thrashing in performance trace
- Spring physics feel natural (no overshoot on UI elements)
Max Response Length
4096 tokens
Component Architecture / Decision Trees
Animation Library Decision Tree
Is it a React project?
|-- YES --> Is animation declarative (mount/unmount)?
| |-- YES --> Use Framer Motion (AnimatePresence, layout animations)
| |-- NO --> Is it a single gesture or hover?
| |-- YES --> CSS transitions (no JS dep needed)
| |-- NO --> Framer Motion or react-spring
|-- NO --> Is it a complex timeline sequence?
|-- YES --> GSAP (timelines, scrollTrigger, SVG morph)
|-- NO --> Is it a simple CSS animation?
|-- YES --> CSS @keyframes + transitions
|-- NO --> WAAPI (Web Animations API)
Architecture Options
Option A: CSS-only animation -- Zero JS overhead. Best for: hover states, focus rings, loading spinners, skeleton pulses. Limited to simple transitions and keyframes. No timeline sequencing. Control via CSS custom properties for theming.
.element {
transition: transform 200ms ease, opacity 200ms ease;
}
.element:hover {
transform: scale(1.05);
}
Option B: Framer Motion (React) -- Declarative spring animations, layout animations via layout prop, exit animations via AnimatePresence, gesture handling (drag, swipe, hover, tap). Best for: component-level animations in React SPAs and Next.js. Bundle size: ~35KB gzipped.
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
exit={{ opacity: 0 }}
transition={{ type: "spring", stiffness: 300, damping: 25 }}
/>
Option C: GSAP (GreenSock) -- Professional-grade timeline control, ScrollTrigger plugin, SVG morphing, cross-browser consistency. Best for: marketing pages, complex reveal sequences, scroll-driven narratives, non-React projects. Bundle size: ~45KB gzipped with ScrollTrigger.
Option D: WAAPI (Web Animations API) -- Native browser API. Framework-agnostic. Zero dependency cost. Best for: simple imperative sequences, polyfill-free modern browsers. Limited easing options (no spring), no timeline chaining without manual orchestration.
element.animate([
{ transform: 'scale(1)', opacity: 1 },
{ transform: 'scale(1.1)', opacity: 0.8 }
], { duration: 200, easing: 'ease-out', fill: 'forwards' })
Tradeoff Matrix
| Criterion | CSS | Framer Motion | GSAP | WAAPI |
|---|---|---|---|---|
| Bundle cost | 0 KB | ~35 KB | ~45 KB | 0 KB |
| Spring physics | No | Yes (configurable) | Yes (GSAP 3.6+) | No |
| Timeline sequencing | Manual | AnimatePresence | Native timeline | Manual promise chain |
| Scroll-driven | Intersection Observer | useInView | ScrollTrigger | Intersection Observer |
| SVG morphing | No | layout animation | MorphSVG plugin | No |
| Cross-browser | Native | React only | All (IE11+) | Modern browsers only |
| Learning curve | Low | Medium | Medium-High | Low |
Workflow
1. Animation Library Selection
- CSS transitions: Simple hover, focus, or state changes. Zero JS overhea
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/animation-accessibility.md
- references/animation-anatomy.md
- references/animation-libraries.md
- references/animation-performance.md
- references/animation-techniques.md
- references/animation-tools.md
- references/spring-gesture-animation.md
- references/web-animation-performance.md
FAQ
Что делает скилл frontend-animation?
Use when the user asks about Motion (Framer Motion), GSAP, CSS keyframes and transitions, the View Transitions API, page transitions, enter/exit or spring animations and prefers-reduced-motion. Produces performant, accessible web animation code. Not for motion principles and specs (use design-motion-design) or 3D scenes (use web3d-webgl).
Как установить скилл frontend-animation?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл frontend-animation запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…