AugmentClaude

Anime.js

Animate DOM elements, SVG, and numbers with choreographed timelines and staggered effects.

Installation

  1. Make sure Claude is on your device and in your terminal.

    Skills load from ~/.claude/skills/ when Claude Code starts up — so you need it on your machine first. If you don't have it yet, install it once with the command below, then run claude in any terminal to verify.

    One-time setup
    npm i -g @anthropic-ai/claude-code

    Already have it? Skip ahead.

  2. Paste into Claude Code or into your terminal.

    This copies the whole skill folder into ~/.claude/skills/animejs-jeffreycayao/ — the SKILL.md plus any scripts, reference docs, or templates the skill ships with. Works for every skill.

    What this command does
    1. Makes a new, empty temporary folder.
    2. Downloads the skill's folder, resources/skills/animejs, from github.com/jeffreycayao/Dev-Labs (branch main), the GitHub repository it's listed from. You get the version that is there now, not a copy we keep.
    3. Copies that folder to ~/.claude/skills/animejs-jeffreycayao/.
    4. Deletes the temporary folder.

    Installing runs none of the skill's files; it only downloads and copies them. When you later use the skill, Claude follows its SKILL.md and may run scripts that come with it. Read them first.

    How we check skills, and what we don't · Report this skill

    Faster alternative (instruction-only skills)

    Skips the clone and grabs only the SKILL.md file. Don't use this if the skill ships Python scripts, reference markdowns, or asset templates — they won't be downloaded and the skill will fail when it tries to load them.

    Quick install (SKILL.md only)
    Sign up to copy
  3. Restart Claude Code.

    Quit and reopen Claude Code (or any other agent that loads from ~/.claude/skills/). New skills are picked up on startup.

  4. Just ask Claude.

    Skills auto-activate when your request matches the skill's description — no slash command needed. Trigger phrases live in the skill's own frontmatter; you can read them in the “What this skill does” section above.

Prefer to read the source first? Open on GitHub.

When Claude uses it

Anime.js v4 (animejs 4.x, MIT) reference — the modular API (animate, createTimeline, createTimer, stagger, svg, utils, engine), how it differs from v3, and when to use it instead of CSS or a render loop. Use for DOM/SVG/UI animation, number tweens, staggered lists, timelines, or "animate this" in a web or Electron UI.

What this skill does

Anime.js v4

Written for DevLabs by its maintainers. Anime.js is by Julian Garnier and contributors, MIT licensed (https://github.com/juliangarnier/anime). The official docs at https://animejs.com/documentation/ are the source of truth.

Is anime.js the right tool?

NeedUse
Hover/focus/enter transitions, simple fadesCSS transitions/animations (no JS)
Choreographed UI: staggered lists, counters, SVG draw, timelines, scroll-linkedanime.js v4
Per-frame simulation, game loop, Three.js objectsThe render loop (useFrame), lerp/damp; see the threejs / game-dev-3d skills
React component enter/exit with layoutFramer Motion / Motion One (if already a dependency)

Never add anime.js for one fade. If it is not in package.json, ask before adding a dependency; if it is, check the installed major: npm ls animejs.

v4 at a glance (4.x, current line)

v4 is a rewrite: named ES exports, no default anime() function.

import { animate, createTimeline, createTimer, stagger, svg, utils, engine, eases } from 'animejs';

// Tween any element(s) or object
animate('.card', {
  translateY: [40, 0],
  opacity: { from: 0, to: 1 },
  duration: 600,
  delay: stagger(60),
  ease: 'outExpo',          // v4 uses `ease`, not `easing`
  loop: false,
});

// Timeline
const tl = createTimeline({ defaults: { duration: 400, ease: 'inOutQuad' } });
tl.add('.title', { opacity: [0, 1] })
  .add('.sub', { translateX: [-20, 0] }, '-=200')   // relative position
  .add(() => console.log('done'), '+=100');          // callback as a step

// Plain object (counters)
const state = { n: 0 };
animate(state, { n: 100, duration: 1000, modifier: utils.round(0), onUpdate: () => el.textContent = String(state.n) });

// SVG line drawing / morphing
animate(svg.createDrawable('path'), { draw: ['0 0', '0 1'], duration: 1200 });

Full API table and v3 → v4 renames: references/v4-api.md.

Rules

  1. Animate transform and opacity for DOM; avoid width/height/top/left (layout thrash). anime.js sets inline styles; keep CSS classes for state.
  2. One timeline per screen, not one animate() per element in a loop.
  3. Respect prefers-reduced-motion: read matchMedia('(prefers-reduced-motion: reduce)') and set duration: 0 (or skip) when it matches. DevLabs already does this in its help showcase; follow the pattern.
  4. Clean up: keep the returned animation/timeline and call .pause() / .revert() on unmount (React useEffect cleanup). Leaked animations keep nodes alive and keep the engine ticking.
  5. In Electron with a hidden window, animations still tick; pause them when the view is covered (the office already pauses its render loop the same way).
  6. Numbers in, numbers out: for values the app owns (progress, counters), animate a plain object and write to the DOM in onUpdate; the app state stays the source of truth.

Related skills