animate
npx skills add https://github.com/olino3/forge --skill animate
Agent 安装分布
Skill 文档
skill:animate – Zero-Config UI Animations
Version: 1.0.0
Purpose
Add smooth, automatic animations to web applications using @formkit/auto-animate and complementary animation libraries. This skill handles list reordering, element insertion/removal, layout shifts, and page transitions across React, Vue, Solid, Svelte, and Preact with minimal configuration. Use when adding motion to UI components, animating list changes, or implementing page transitions.
File Structure
skills/animate/
âââ SKILL.md (this file)
âââ examples.md
Interface References
- Context: Loaded via ContextProvider Interface
- Memory: Accessed via MemoryStore Interface
- Shared Patterns: Shared Loading Patterns
- Schemas: Validated against context_metadata.schema.json and memory_entry.schema.json
Animation Focus Areas
- Auto-Animate Integration: @formkit/auto-animate setup per framework â one line to animate any parent element
- List Animations: Smooth add, remove, and reorder for dynamic lists (todo apps, kanban boards, data tables)
- Layout Transitions: Animate height/width changes, accordion expand/collapse, tab switching
- Page Transitions: Route-level transitions for SPAs (View Transitions API, framework-specific)
- Micro-Interactions: Hover effects, button feedback, loading state transitions
- Performance: GPU-accelerated transforms,
will-changehints, reduced motion preferences - Accessibility:
prefers-reduced-motionmedia query respect, no seizure-inducing flashes
Common Errors Prevented
- Missing
keyprops on animated list items - Animating
height: autodirectly (use max-height or grid technique) - Triggering layout thrashing with width/height animations (use
transforminstead) - Forgetting
prefers-reduced-motionmedia query - Using
display: nonetransitions (not animatable â use opacity + visibility) - Auto-animate on wrong parent element (must be direct parent of animated children)
- Conflicting CSS transitions with auto-animate
- Memory leaks from unregistered animation observers
- Animating during SSR hydration mismatch
- Z-index stacking issues during animations
- Missing
position: relativeon animated containers - Overriding auto-animate’s inline styles accidentally
- Using
setTimeoutinstead ofonAnimationEndfor sequencing - Animating non-composited properties causing jank (margin, padding, top/left)
- Not disabling animations during automated testing
MANDATORY WORKFLOW (MUST FOLLOW EXACTLY)
Step 1: Initial Analysis
YOU MUST:
- Detect the frontend framework (React, Vue, Solid, Svelte, Preact, or vanilla JS)
- Identify the animation scope:
- List/collection animations
- Layout transitions
- Page/route transitions
- Micro-interactions
- Check existing animation libraries in the project (Framer Motion, GSAP, CSS transitions)
- Determine if @formkit/auto-animate is appropriate vs. a more specific library
- Ask clarifying questions if needed:
- What elements need animation?
- Performance constraints (mobile, low-end devices)?
- Existing design system motion guidelines?
Step 2: Load Memory
Follow Standard Memory Loading with
skill="animate"anddomain="engineering".
YOU MUST:
- Use
memoryStore.getSkillMemory("animate", "{project-name}")to load project-specific animation patterns - Use
memoryStore.getByProject("{project-name}")for cross-skill context (design tokens, component library) - Review previously established animation conventions and duration standards
Step 3: Load Context
Follow Standard Context Loading for the
engineeringdomain. Stay within the file budget declared in frontmatter.
Step 4: Implement Animations
YOU MUST:
Framework Detection & Setup:
- React:
useAutoAnimatehook from@formkit/auto-animate/react - Vue:
v-auto-animatedirective from@formkit/auto-animate/vue - Solid:
createAutoAnimatefrom@formkit/auto-animate/solid - Svelte: Action-based integration
- Preact:
useAutoAnimatefrom@formkit/auto-animate/preact
Implementation Rules:
- Apply auto-animate to the direct parent of elements that will be added/removed/reordered
- Ensure all list items have stable, unique
keyprops - Use
transformandopacityfor custom animations (GPU-composited properties) - Always include
prefers-reduced-motionhandling:@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } } - Set consistent animation durations following design system (default: 200-300ms for UI, 400-600ms for page)
- Never animate
height,width,top,leftdirectly â use transforms or the grid technique
DO NOT introduce animations without reduced-motion handling
Step 5: Generate Output
- Save implementation to
/claudedocs/animate_{project}_{YYYY-MM-DD}.md - Follow naming conventions in
../OUTPUT_CONVENTIONS.md - Include installation commands, code changes, and testing instructions
Step 6: Update Memory
Follow Standard Memory Update for
skill="animate".
Store animation conventions, duration scales, library choices, and component-specific patterns.
Compliance Checklist
Before completing, verify:
- Step 1: Framework detected and animation scope identified
- Step 2: Standard Memory Loading pattern followed
- Step 3: Standard Context Loading pattern followed
- Step 4: Animations implemented with reduced-motion support
- Step 5: Output saved with standard naming convention
- Step 6: Standard Memory Update pattern followed
Further Reading
- @formkit/auto-animate: https://auto-animate.formkit.com/
- View Transitions API: https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API
- prefers-reduced-motion: https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion
- Web Animations API: https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API
Version History
| Version | Date | Changes |
|---|---|---|
| 1.0.0 | 2026-02-12 | Initial release with interface-based architecture |