agentleFS
MurphiyiiMurphiyii/murphiyii-skills/skills/animejs/SKILL.md

animejs

Skill0 starsChanged 28 days agoApache-2.0View on GitHub

Anime.js V4 expert reference. Use whenever code imports or mentions anime.js / animejs (any version), or the user asks to write, debug, review, refactor, or migrate JavaScript animations with anime.js, including V3 to V4 migration, timelines, stagger, scroll-triggered or scroll-synced animation (onScroll), SVG line drawing, morphing and motion paths, draggable elements, text splitting and scramble effects, layout/FLIP transitions, animatables (cursor follow), springs and easings, WAAPI, Three.js animation through anime adapters, and React/Vue cleanup with createScope. Prevents V3 syntax such as anime({ targets }), easing 'easeOutQuad', anime.timeline, and direction 'alternate'.

20 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use waapi, lottie and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • anton-abyzovSkill

    waapi

    Web Animations API adapter patterns for HyperFrames. Use when authoring element.animate() motion, Animation currentTime seeking, document.getAnimations(), KeyframeEffect timing, fill modes, or native browser animations that must render deterministically in HyperFrames.

    Also in 5 projects that use this

  • soilmassSkill

    lottie

    Lottie animation format specification and usage. Use when exporting animations as Lottie JSON, working with dotLottie packages, or understanding Lottie capabilities and limitations. References LAC Lottie Spec v1.0 and dotLottie v2.0.

    Also in 6 projects that use this

  • anton-abyzovSkill

    three

    Three.js and WebGL adapter patterns for HyperFrames. Use when creating deterministic Three.js scenes, WebGL canvas layers, AnimationMixer timelines, camera motion, shader-driven visuals, or canvas renders that respond to HyperFrames hf-seek events.

    Also in 5 projects that use this

  • FldicoahkiinSkill

    contribute-catalog

    Author a new HyperFrames registry block (caption style, VFX block, transition, lower third) or component (text effect, overlay, snippet) and ship it as an upstream PR to the hyperframes repo. Use ONLY when the user wants to CONTRIBUTE to the public catalog — for in-project caption/transition authoring use the `hyperframes` skill, for installing existing registry items use the `hyperframes-registry` skill.

    Also in 3 projects that use this

  • software-mansion-labsSkill

    typegpu

    TypeGPU is type-safe WebGPU in TypeScript. Use whenever the user writes, debugs, or designs TypeGPU code: 'use gpu' shader functions, tgpu.fn, buffers, textures, bind groups, compute and render pipelines, command encoders, render passes, render bundles, vertex layouts, slots, accessors, @typegpu/react hooks (useRoot, useFrame, useUniform), React Native worklet rendering, and any TypeGPU API. Shader logic and CPU-side resources are tightly coupled - handle both sides here even if the user only mentions one (e.g. "how do I write a shader", "how do I create a buffer"). Trigger on any mention of typegpu, tgpu, "use gpu", TypedGPU, or WebGPU code written using TypeGPU's schema API (d.*, tgpu.*, std.*). Do NOT trigger for raw WebGPU (using GPUDevice/GPURenderPipeline directly without tgpu), WGSL-only questions, Three.js, Babylon.js, or WebGL.

    Also in 3 projects that use this

  • LangChainSkill

    remotion-to-hyperframes

    Port an existing Remotion (React) composition''s source to HyperFrames HTML. Use ONLY on an explicit ask to port/convert/migrate/translate a Remotion source — one-way, Remotion-only. A passing Remotion mention, reference-only code, or "make something like my Remotion video" is a fresh build (/general-video). Unclear → /hyperframes.

    Also in 5 projects that use this

  • +2 more from anton-abyzov

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 20 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Always write the URL with the @4.5.0 pin.

    line 14
  2. Very specific:

    Never write import ... from 'animejs' or subpaths like 'animejs/text': there is no module to import.

    line 31
  3. Very specific:

    Do not guess: if a param or method is not in the matching reference file, grep assets/anime.umd.js for it before using it.

    line 58
  4. Distinctive:

    Read only the file(s) the task needs.

    line 62
  5. Very specific:

    Write V4 code that destructures from the anime global.

    line 110

“Common” is measured: kept by at least 6 in 10 of the 20 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

anime.js V4

Target version: anime.js 4.5.0. Projects load the UMD bundle from the CDN:

<script src="https://cdn.jsdelivr.net/npm/animejs@4.5.0/dist/bundles/anime.umd.min.js"></script>

Always write the URL with the @4.5.0 pin. Without it jsDelivr serves the npm latest tag, which moves to a new major version silently. If a page loads another version, treat anything below as possibly stale.

Source of truth, in order: assets/anime.umd.js in this skill folder (the unminified build of that same 4.5.0 bundle: JSDoc typedefs for every params type, defaults, and the implementation), then the docs site. The file is about 430 KB: Grep it for the bare name of a typedef, function, or parameter (AnimationParams, createTimeline =, loopDelay), never Read it whole. The references/ files condense it. Their "Checked against" lines and src/... citations name the 4.5.0 .d.ts and source files they were verified against; those files are not shipped here, so grep the symbol name in the bundle instead (line numbers will not match).

When to use

  • Writing any animation with anime.js, or choosing between its APIs.
  • Debugging anime.js code (nothing moves, wrong easing, callbacks not firing, leaks after unmount).
  • Reviewing or migrating code: anything containing anime(, targets:, easing:, anime.timeline is V3 and must be converted. Read references/v3-to-v4-pitfalls.md first.

Imports

The bundle defines one global, anime, a plain object (not a function). Destructure what you need, in a classic <script> that runs after the bundle tag:

const { animate, createTimeline, stagger, utils } = anime;

Never write import ... from 'animejs' or subpaths like 'animejs/text': there is no module to import. The examples in references/ are already written with const { ... } = anime; (except references/adapters.md, which only works with ESM).

The global holds all 67 root exports: animate, createTimer, createTimeline, createAnimatable, createDraggable, createScope, onScroll, scrollContainers, engine, createLayout, stagger, the utils helpers also at top level ($, get, set, remove, random, randomPick, shuffle, createSeededRandom, clamp, round, snap, wrap, lerp, damp, mapRange, sync, keepTime, cleanInlineStyles, ...), easings (eases, spring, createSpring (deprecated), cubicBezier, steps, linear, irregular), SVG (createDrawable, morphTo, createMotionPath), text (splitText, scrambleText, split (deprecated)), waapi, the classes (JSAnimation, Timer, Timeline, Animatable, Draggable, Scope, ScrollObserver, AutoLayout, TextSplitter, Spring, WAAPIAnimation), the namespaces utils, easings, svg, text, plus globals.

Not in the bundle: the adapters (registerAdapter, threeAdapter, getInstances, commitChanges). They exist only as ESM subpaths (animejs/adapters, animejs/adapters/three), so Three.js targets and custom adapters cannot be used with this setup.

Core rules and gotchas (V3 traps first)

  1. Targets are the first argument: animate('.el', { x: 100 }). Never anime({ targets: '.el', ... }), never a targets key.
  2. ease, not easing, with no ease prefix: ease: 'outQuad', 'inOutSine', 'out(3)', 'outElastic(1, .5)'. Default is 'out(2)'.
  3. Easing generators are functions, not strings: ease: steps(5), cubicBezier(.7,.1,.5,.9), linear(0, '0.5 50%', 1), irregular(10). In 4.5.0 the string forms warn and fall back to no easing.
  4. Springs: spring({ bounce, duration }) or spring({ stiffness, damping, mass, velocity }). createSpring is deprecated (warns). A spring replaces the animation duration with its settling duration.
  5. Direction: alternate: true and/or reversed: true. There is no direction param.
  6. loop counts repeats: loop: 1 plays twice; loop: true is infinite. endDelay is gone, loopDelay only waits between loops.
  7. Callbacks use on*: onBegin (after delay), onUpdate, onRender, onLoop, onComplete, onPause, onBeforeUpdate. Promise: await animation or animation.then(cb), not .finished.
  8. Timelines: createTimeline({ defaults: { ease, duration } }) then .add(targets, params, position). Child defaults go in defaults. Positions: '-=200', '+=100', '<', '<<', '<<+=100', labels, or stagger().
  9. Object syntax uses to/from: opacity: { from: 0, to: 1, duration: 300 }. [0, 1] is from/to; 3+ plain values are keyframes.
  10. Function values get (target, index, targets): the third argument is the targets array (targets.length), not a count.
  11. Helpers live in utils and at the top level of the anime global: utils.set, utils.get, utils.remove, utils.random, utils.$; modifier: utils.round(2) replaces round: 100. On the anime global, anime.set(...), anime.random(...) and anime.stagger(100) are also valid V4 (the same functions); only anime.<name> where the name is not one of the 67 exports (anime.timeline, anime.running, anime.path, anime.setDashoffset, anime.penner, anime.speed) is V3. stagger(100, { from: 'center', reversed: true, ease: 'out(2)' }).
  12. Playback semantics changed: play() always goes forward, reverse() always backward, resume() continues the current direction, alternate() flips it. progress is 0..1.
  13. Transforms are individual properties: x, y, z, rotate, scale, skewX... and compose across separate animations. Overlapping animations on the same property replace each other (composition: 'replace'); use 'blend' for additive or 'none' to overlap.
  14. Always clean up in components: build inside createScope({ root }).add(() => { ... }) and call scope.revert() on unmount. revert() (not pause()) restores styles and removes listeners on every instance type.
  15. Scroll: autoplay: onScroll({ ... }). Threshold strings are '<container> <target>' (default enter 'end start', leave 'start end'). sync: true scrubs; use ease: 'linear' on scrubbed animations.
  16. SVG drawing: animate(createDrawable('path'), { draw: ['0 0', '0 1'] }). createDrawable hides the stroke immediately (default '0 0'). Morph with d: morphTo('#other') (points for polygons). Motion path: spread ...createMotionPath('#path').
  17. Text: splitText(el, { chars: true }) (words split by default; only the first matching element is split, so loop for several). For lines: true, animate inside splitter.addEffect(self => animate(self.lines, ...)) because lines re-split after font load and resize. text.split() is deprecated.
  18. Timers default to infinite duration (createTimer({ onUpdate }) runs forever); animations default to 1000ms.
  19. WAAPI: waapi.animate(targets, params) for hardware-accelerated CSS-only animations; only onComplete exists. Use lowercase alternate/reversed (the typedefs capitalize them by mistake).
  20. Do not guess: if a param or method is not in the matching reference file, grep assets/anime.umd.js for it before using it.

Task to reference map

Read only the file(s) the task needs.

TaskRead
Migrating V3 code, reviewing for V3 leaksreferences/v3-to-v4-pitfalls.md
Basic tweens, values, units, keyframes, colors, CSS vars, JS objects, controls, promisesreferences/animation.md
Sequencing, overlaps, labels, positions, syncing animationsreferences/timeline.md
Callback-only clocks, game loops, counters, throttled updatesreferences/timer.md
Cursor follow, pointer parallax, high-frequency value updatesreferences/animatable.md
Drag, sliders, carousels, snapping, throw/release physicsreferences/draggable.md
Layout/FLIP transitions, reorder, grid/list switch, enter/leave, shared elementreferences/layout.md
React/Vue/Svelte/Angular cleanup, scoped selectors, media queries, reduced motionreferences/scope.md
Scroll-triggered, scroll-synced (scrub), parallax, sticky sectionsreferences/events.md
SVG line drawing, path morphing, motion along a pathreferences/svg.md
Text splitting (chars/words/lines), reveal effects, scramble/decode textreferences/text.md
Stagger (grids, from center, ranges, jitter), utils.* helpers, modifiersreferences/utilities.md
Easing names, custom curves, springs, stepsreferences/easings.md
WAAPI, off-main-thread CSS animation, convertEasereferences/waapi.md
Global defaults, seconds time unit, global speed, external render loopreferences/engine.md
Three.js meshes, cameras, lights, materials, instanced meshes, custom target adapters (not available with the UMD bundle: say so first)references/adapters.md
Copy-ready verified patternsreferences/recipes.md

Canonical example

const { animate, createTimeline, createScope, onScroll, stagger, spring } = anime;

const scope = createScope({ root: '#app', defaults: { duration: 600 } }).add(() => {
  animate('.card', {
    y: [40, 0],
    opacity: [0, 1],
    delay: stagger(80, { from: 'center' }),
    ease: spring({ bounce: .3 }),
    autoplay: onScroll({ enter: 'bottom-=80 top' }), // one observer: all cards start when the FIRST .card enters (see events.md)
  });

  createTimeline({ loop: true, alternate: true, defaults: { ease: 'inOutQuad' } })
    .add('.dot', { x: '12rem' })
    .add('.dot', { scale: 1.5 }, '<<')
    .call(() => console.log('cycle'));
});

// later, e.g. on unmount
scope.revert();

Working method

  1. Identify the module(s) from the map above and read those reference files.
  2. Write V4 code that destructures from the anime global. Re-check every param name against the reference (or grep assets/anime.umd.js).
  3. Scan your output with the review grep at the bottom of references/v3-to-v4-pitfalls.md.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.