Skip to main content
skill CX Codex

animejs · boraoztunc — Claude Code skill: timeline-synced animation rendering

Guides Anime.js animation setup inside HyperFrames compositions for deterministic, seek-driven rendering.

Apache-2.0 220 installs ★ 484 updated 2026-08-15

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add boraoztunc/skills --skill animejs -a claude-code
Open on GitHub

What animejs does

This skill provides integration rules for the HyperFrames Anime.js runtime adapter. The core contract requires HyperFrames to control playback timing via instance.seek(timeMs). You must initialize animations synchronously, apply autoplay: false, and append each instance to window.__hfAnime.

The guide covers basic tweens, timelines, and ES module setups. Every animation target must expose seek() and pause(). It disallows unseeded random transforms, infinite looping, and creating tweens inside timers or async callbacks.

Leaving autoplay enabled breaks frame-by-frame rendering because the library runs ahead of the host clock. Inspect edits using npx hyperframes lint and npx hyperframes validate.

What it helps with

  • make Anime.js instances seek-driven under the HyperFrames clock
  • register timelines on window.__hfAnime synchronously
  • convert web animation snippets into render-safe HyperFrames templates
  • audit compositions with official hyperframes CLI checks

Example prompts for the agent

  • Write an Anime.js timeline for a HyperFrames scene with autoplay disabled
  • Convert this standalone Anime.js snippet into render-safe HyperFrames HTML
  • Check this Anime.js component against HyperFrames deterministic animation rules

How to install animejs

1Skills CLI (Vercel)

npx skills add boraoztunc/skills --skill animejs -a claude-code

2Manually: put the files in place

~/.claude/skills/animejs/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/animejs/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about animejs

How to install animejs in Claude Code?

Run npx skills add boraoztunc/skills --skill animejs -a claude-code. The skill file lands in ~/.claude/skills/animejs/SKILL.md.

What does the animejs skill do?

It shows AI agents how to build deterministic Anime.js tweens that hook into HyperFrames frame stepping.

When should GSAP be used instead of Anime.js?

GSAP remains the default choice in HyperFrames for intricate sequencing, while Anime.js suits small SVG details and compact DOM accents.

Source text

SKILL.md · Apache-2.0
---
name: animejs
description: Anime.js adapter patterns for HyperFrames. Use when writing Anime.js animations or timelines inside HyperFrames compositions, registering animations on window.__hfAnime, making Anime.js seek-driven and deterministic, or translating Anime.js examples into render-safe HyperFrames HTML.
---

# Anime.js for HyperFrames

HyperFrames can seek Anime.js instances through its `animejs` runtime adapter. The composition owns the animation objects; HyperFrames owns the clock.

## Contract

- Create animations or timelines synchronously during composition initialization.
- Set `autoplay: false` so Anime.js does not advance on its own clock.
- Register every returned animation or timeline on `window.__hfAnime`.
- Use finite durations and loop counts.
- Avoid callbacks that mutate DOM based on wall-clock time, network state, or unseeded randomness.

The adapter seeks every registered instance with `instance.seek(timeMs)`, where `timeMs` is HyperFrames time in milliseconds.

## Basic Pattern

```html
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/anime.iife.min.js"></script>
<script>
  const anim = anime({
    targets: ".mark",
    translateX: 280,
    rotate: "1turn",
    opacity: [0, 1],
    duration: 1200,
    easing: "easeOutExpo",
    autoplay: false,
  });

  window.__hfAnime = window.__hfAnime || [];
  window.__hfAnime.push(anim);
</script>
```

## Timeline Pattern

```html
<script>
  const tl = anime.timeline({
    autoplay: false,
    easing: "easeOutCubic",
  });

  tl.add({
    targets: ".title",
    translateY: [40, 0],
    opacity: [0, 1],
    duration: 650,
  }).add(
    {
      targets: ".accent",
      scaleX: [0, 1],
      duration: 450,
    },
    250,
  );

  window.__hfAnime = window.__hfAnime || [];
  window.__hfAnime.push(tl);
</script>
```

## Module Builds

If you use an ES module build, the adapter does not care how the instance was created. It only needs the returned object to expose `seek()`, `pause()`, and preferably `play()`:

```html
<script type="module">
  import { animate } from "https://cdn.jsdelivr.net/npm/animejs/+esm";

  const anim = animate(".chip", {
    x: "18rem",
    duration: 900,
    autoplay: false,
  });

  window.__hfAnime = window.__hfAnime || [];
  window.__hfAnime.push(anim);
</script>
```

## Good Uses

- Small SVG and DOM flourishes where Anime.js syntax is compact.
- Imported Anime.js examples that can be made seek-driven.
- Multiple independent micro-animations pushed into the same registry.

Use GSAP for complex scene sequencing unless the user specifically asks for Anime.js. GSAP is still the primary HyperFrames authoring path.

## Avoid

- Leaving `autoplay` at the Anime.js default.
- Depending on `anime.running` auto-discovery instead of explicit `window.__hfAnime.push(...)`.
- Infinite loops. Compute a finite repeat count from the composition duration.
- Building animations in timers, promises, event handlers, or after async asset loads.

## Validation

After editing a composition that uses Anime.js:

```bash
npx hyperframes lint
npx hyperframes validate
```

## Credits And References

- HyperFrames adapter source: `packages/core/src/runtime/adapters/animejs.ts`.
- Anime.js documentation for `autoplay`, `pause()`, and `seek()`: https://animejs.com/documentation/

© boraoztunc · Apache-2.0 · boraoztunc/skills

Similar skills

All skills for Frontend and UI →

animejs by other authors comes first.

animejs freshtechbro Feeds your coding agent Anime.js syntax: timelines, stagger, SVG morphing and keyframe sequences. CX Codex +1 3,100installs animejs BowTiedSwan Provides Claude Code with an API reference for Anime.js v4. Useful when creating web animations, SVG morphing, and staggered timelines. CX Codex +1 1,400installs animejs-choreographer Claude Design Skillstack animejs-choreographer — a Claude subagent that plans Anime.js motion: timing, easing and timelines for scroll-driven or multi-element sequences. CX Codex ★ 1,428repo stars anime-js Mindrally Gives your agent rules for writing Anime.js animations: timelines, stagger, SVG morphing and performance. Useful when AI writes the motion code. CX Codex +1 779installs hyperframes-keyframes coco-research hyperframes-keyframes keeps HyperFrames motion seekable: builds keyframes for GSAP, CSS, Anime.js and WAAPI, then verifies frames before a render. CX Codex +1 ★ 328repo stars css-marker-patterns calesthio The css-marker-patterns rule shows five ways to mark text with plain CSS and GSAP timelines: a marker sweep, wobbly circle, radiating lines, wavy underline, and cross-out. CX Codex +1 ★ 78,316repo stars whiteboard-animation iart-ai whiteboard-animation guides agents in generating VideoScribe-style whiteboard explainers with animated SVG strokes and a marker hand following the pen tip. CX Codex +1 2,900installs gsap Mindrally Tells your agent how to write GSAP animations: transforms over left/top, stagger, timelines, ScrollTrigger. Useful when the UI stutters on weaker hardware. CX Codex +1 815installs

From the same set22

The whole set →

Project sponsors

Companies that keep this analytics open