Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问clear审计通过

auto-animate自动动画

Agent Skill

auto-animate 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

675

周安装

29

GitHub Stars

14

下载量

237
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:auto-animate(自动动画)
来源仓库:https://github.com/jackspace/claudeskillz
仓库路径:skills/auto-animate
安装命令:
npx skills add https://github.com/jackspace/claudeskillz --skill auto-animate
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/jackspace/claudeskillz --skill auto-animate

简介

auto-animate 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词快速定位候选结果。

  • 适用于研究、数据收集或信息聚合类任务场景。
  • 通过 npx skills add 命令从指定仓库安装,需确认权限范围和操作边界。
  • 安装前建议检查维护状态,避免触发联网或文件读写等敏感操作。
  • 可结合原始 README 和仓库内容进一步核验具体功能和使用方式。

SKILL.md

AutoAnimate

Status: Production Ready ✅ Last Updated: 2025-11-07 Dependencies: None (works with any React setup) Latest Versions: @formkit/auto-animate@0.9.0


Quick Start (2 Minutes)

1. Install AutoAnimate

pnpm add @formkit/auto-animate

Why this matters:

  • Only 3.28 KB gzipped (vs 22 KB for Motion)
  • Zero dependencies
  • Framework-agnostic (React, Vue, Svelte, vanilla JS)

2. Add to Your Component

import { useAutoAnimate } from "@formkit/auto-animate/react";

export function MyList() {
  const [parent] = useAutoAnimate(); // 1. Get ref

  return (
    <ul ref={parent}> {/* 2. Attach to parent */}
      {items.map(item => (
        <li key={item.id}>{item.text}</li> {/* 3. That's it! */}
      ))}
    </ul>
  );
}

CRITICAL:

  • ✅ Always use unique, stable keys for list items
  • ✅ Parent element must always be rendered (not conditional)
  • ✅ AutoAnimate respects prefers-reduced-motion automatically
  • ✅ Works on add, remove, AND reorder operations

3. Use in Production (SSR-Safe)

For Cloudflare Workers or Next.js:

// Use client-only import to prevent SSR errors
import { useState, useEffect } from "react";

export function useAutoAnimateSafe<T extends HTMLElement>() {
  const [parent, setParent] = useState<T | null>(null);

  useEffect(() => {
    if (typeof window !== "undefined" && parent) {
      import("@formkit/auto-animate").then(({ default: autoAnimate }) => {
        autoAnimate(parent);
      });
    }
  }, [parent]);

  return [parent, setParent] as const;
}

Known Issues Prevention

This skill prevents 10+ documented issues:

Issue #1: SSR/Next.js Import Errors

Error: "Can't import the named export 'useEffect' from non EcmaScript module" Source: https://github.com/formkit/auto-animate/issues/55 Why It Happens: AutoAnimate uses DOM APIs not available on server Prevention: Use dynamic imports (see templates/vite-ssr-safe.tsx)

Issue #2: Conditional Parent Rendering

Error: Animations don't work when parent is conditional Source: https://github.com/formkit/auto-animate/issues/8 Why It Happens: Ref can't attach to non-existent element Prevention:

// ❌ Wrong
{showList && <ul ref={parent}>...</ul>}

// ✅ Correct
<ul ref={parent}>{showList && items.map(...)}</ul>

Issue #3: Missing Unique Keys

Error: Items don't animate correctly or flash Source: Official docs Why It Happens: React can't track which items changed Prevention: Always use unique, stable keys (key={item.id})

Issue #4: Flexbox Width Issues

Error: Elements snap to width instead of animating smoothly Source: Official docs Why It Happens: flex-grow: 1 waits for surrounding content Prevention: Use explicit width instead of flex-grow for animated elements

Issue #5: Table Row Display Issues

Error: Table structure breaks when removing rows Source: https://github.com/formkit/auto-animate/issues/7 Why It Happens: Display: table-row conflicts with animations Prevention: Apply to <tbody> instead of individual rows, or use div-based layouts

Issue #6: Jest Testing Errors

Error: "Cannot find module '@formkit/auto-animate/react'" Source: https://github.com/formkit/auto-animate/issues/29 Why It Happens: Jest doesn't resolve ESM exports correctly Prevention: Configure moduleNameMapper in jest.config.js

Issue #7: esbuild Compatibility

Error: "Path '.' not exported by package" Source: https://github.com/formkit/auto-animate/issues/36 Why It Happens: ESM/CommonJS condition mismatch Prevention: Configure esbuild to handle ESM modules properly

Issue #8: CSS Position Side Effects

Error: Layout breaks after adding AutoAnimate Source: Official docs Why It Happens: Parent automatically gets position: relative Prevention: Account for position change in CSS or set explicitly

Issue #9: Vue/Nuxt Registration Errors

Error: "Failed to resolve directive: auto-animate" Source: https://github.com/formkit/auto-animate/issues/43 Why It Happens: Plugin not registered correctly Prevention: Proper plugin setup in Vue/Nuxt config (see references/)

Issue #10: Angular ESM Issues

Error: Build fails with "ESM-only package" Source: https://github.com/formkit/auto-animate/issues/72 Why It Happens: CommonJS build environment Prevention: Configure ng-packagr for Angular Package Format


When to Use AutoAnimate vs Motion

Use AutoAnimate When:

  • ✅ Simple list transitions (add/remove/sort)
  • ✅ Accordion expand/collapse
  • ✅ Toast notifications fade in/out
  • ✅ Form validation messages appear/disappear
  • ✅ Zero configuration preferred
  • ✅ Small bundle size critical (3.28 KB)
  • ✅ Applying to existing/3rd-party code
  • ✅ "Good enough" animations acceptable

Use Motion When:

  • ✅ Complex choreographed animations
  • ✅ Gesture controls (drag, swipe, hover)
  • ✅ Scroll-based animations
  • ✅ Spring physics animations
  • ✅ SVG path animations
  • ✅ Keyframe control needed
  • ✅ Animation variants/orchestration
  • ✅ Custom easing curves

Rule of Thumb: Use AutoAnimate for 90% of cases, Motion for hero/interactive animations.


Critical Rules

Always Do

Use unique, stable keys - key={item.id} not key={index}Keep parent in DOM - Parent ref element always rendered ✅ Client-only for SSR - Dynamic import for server environments ✅ Respect accessibility - Keep disrespectUserMotionPreference: falseTest with motion disabled - Verify UI works without animations ✅ Use explicit width - Avoid flex-grow on animated elements ✅ Apply to tbody for tables - Not individual rows

Never Do

Conditional parent - {show && <ul ref={parent}>}Index as key - key={index} breaks animations ❌ Ignore SSR - Will break in Cloudflare Workers/Next.js ❌ Force animations - disrespectUserMotionPreference: true breaks accessibility ❌ Animate tables directly - Use tbody or div-based layout ❌ Skip unique keys - Required for proper animation ❌ Complex animations - Use Motion instead


Configuration

AutoAnimate is zero-config by default. Optional customization:

import { useAutoAnimate } from "@formkit/auto-animate/react";

const [parent] = useAutoAnimate({
  duration: 250, // milliseconds (default: 250)
  easing: "ease-in-out", // CSS easing (default: "ease-in-out")
  // disrespectUserMotionPreference: false, // Keep false!
});

Recommendation: Use defaults unless you have specific design requirements.


Using Bundled Resources

Templates (templates/)

Copy-paste ready examples:

  • react-basic.tsx - Simple list with add/remove/shuffle
  • react-typescript.tsx - Typed setup with custom config
  • filter-sort-list.tsx - Animated filtering and sorting
  • accordion.tsx - Expandable sections
  • toast-notifications.tsx - Fade in/out messages
  • form-validation.tsx - Error messages animation
  • vite-ssr-safe.tsx - Cloudflare Workers/SSR pattern

References (references/)

  • auto-animate-vs-motion.md - Decision guide for which to use
  • css-conflicts.md - Flexbox, table, and position gotchas
  • ssr-patterns.md - Next.js, Nuxt, Workers workarounds

Scripts (scripts/)

  • init-auto-animate.sh - Automated setup script

Cloudflare Workers Compatibility

AutoAnimate works perfectly with Cloudflare Workers Static Assets:

Client-side only - Runs in browser, not Worker runtime ✅ No Node.js deps - Pure browser code ✅ Edge-friendly - 3.28 KB gzipped ✅ SSR-safe - Use dynamic imports (see templates/)

Vite Config:

export default defineConfig({
  plugins: [react(), cloudflare()],
  ssr: {
    external: ["@formkit/auto-animate"],
  },
});

Accessibility

AutoAnimate respects prefers-reduced-motion automatically:

/* User's system preference */
@media (prefers-reduced-motion: reduce) {
  /* AutoAnimate disables animations automatically */
}

Critical: Never set disrespectUserMotionPreference: true - this breaks accessibility.


Official Documentation


Package Versions (Verified 2025-11-07)

{
  "dependencies": {
    "@formkit/auto-animate": "^0.9.0"
  },
  "devDependencies": {
    "react": "^19.2.0",
    "vite": "^6.0.0"
  }
}

Production Example

This skill is based on production testing:

  • Bundle Size: 3.28 KB gzipped
  • Setup Time: 2 minutes (vs 15 min with Motion)
  • Errors: 0 (all 10 known issues prevented)
  • Validation: ✅ Works with Vite, Tailwind v4, Cloudflare Workers, React 19

Tested Scenarios:

  • ✅ Filter/sort lists
  • ✅ Accordion components
  • ✅ Toast notifications
  • ✅ Form validation messages
  • ✅ SSR/Cloudflare Workers
  • ✅ Accessibility (prefers-reduced-motion)

Troubleshooting

Problem: Animations not working

Solution: Check these common issues:

  1. Is parent element always in DOM? (not conditional)
  2. Do items have unique, stable keys?
  3. Is ref attached to immediate parent of animated children?

Problem: SSR/Next.js errors

Solution: Use dynamic import:

useEffect(() => {
  if (typeof window !== "undefined") {
    import("@formkit/auto-animate").then(({ default: autoAnimate }) => {
      autoAnimate(parent);
    });
  }
}, [parent]);

Problem: Items flash instead of animating

Solution: Add unique keys: key={item.id} not key={index}

Problem: Flexbox width issues

Solution: Use explicit width instead of flex-grow: 1

Problem: Table rows don't animate

Solution: Apply ref to <tbody>, not individual <tr> elements


Complete Setup Checklist

  • Installed @formkit/auto-animate@0.9.0
  • Using React 19+ (or Vue/Svelte)
  • Added ref to parent element
  • Parent element always rendered (not conditional)
  • List items have unique, stable keys
  • Tested with prefers-reduced-motion
  • SSR-safe if using Cloudflare Workers/Next.js
  • No flexbox width issues
  • Dev server runs without errors
  • Production build succeeds

Questions? Issues?

  1. Check templates/ for working examples
  2. Check references/auto-animate-vs-motion.md for library comparison
  3. Check references/ssr-patterns.md for SSR workarounds
  4. Check official docs: https://auto-animate.formkit.com
  5. Check GitHub issues: https://github.com/formkit/auto-animate/issues

Production Ready? ✅ Yes - 13.6k stars, actively maintained, zero dependencies.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

26.15%
按下载量换算62

windsurf

23.58%
按下载量换算56

OpenCode

18.44%
按下载量换算44

Codex

11.89%
按下载量换算28

Antigravity

7.61%
按下载量换算18

Gemini CLI

3.18%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills