# anime-js

A skill that gives your coding agent ready Anime.js recipes for all 12 Disney animation principles.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 637 installs · ★ 124
- Author: dylantarre
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/dylantarre/animation-principles/tree/HEAD/skills/09-by-tool-framework/anime-js/SKILL.md
- Updated: 2025-12-30
- HTML: https://affpapa.org/en/nevibecode/skills/dylantarre-anime-js

## What it does

The skill walks through the 12 Disney animation principles and pairs each one with an Anime.js technique. Squash and stretch via `scaleX` and `scaleY`, anticipation built with `anime.timeline()`, follow through using the relative offset `'-=450'`, arcs drawn with `anime.path()` along an SVG contour. Your agent picks the section it needs and swaps in your selectors.

Inside are JavaScript snippets: timelines, `keyframes`, `anime.stagger()`, the built-in easings plus `spring()` and `elastic()`. Separate sections cover timing (fast, normal, slow), exaggeration with overshoot, and volume through `rotateX`/`rotateY` with `perspective`.

The skill assumes Anime.js is already wired into your project — the snippets won't run without the library. Install it with one `npx skills add` command; the file lands at `~/.claude/skills/anime-js/SKILL.md`.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add dylantarre/animation-principles --skill anime-js -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/anime-js/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/anime-js/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add dylantarre/animation-principles --skill anime-js -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/anime-js/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add dylantarre/animation-principles --skill anime-js -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/anime-js/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install dylantarre/animation-principles anime-js
```

2. **Manually: put the files in place**
- File: `.github/skills/anime-js/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add dylantarre/animation-principles --skill anime-js -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/dylantarre/animation-principles --path skills/09-by-tool-framework/anime-js
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/anime-js/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add dylantarre/animation-principles --skill anime-js -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/dylantarre/animation-principles/tree/HEAD/skills/09-by-tool-framework/anime-js/SKILL.md

## When to use it
- build a character jump with squash and stretch
- add a wind-up before a movement using a timeline
- offset hair and cape timing from the body
- move an element along an SVG path
- pick an easing for a snappy or dramatic transition

## Example prompts
- Animate this card with the appeal principle in Anime.js — soft scale and shadow
- Show me how to do anticipation before a ball jump with anime.timeline()
- How do I move an element along an SVG path with anime.path()?

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 2a3d29b5dfd48083.

BEGIN THIRD-PARTY FILE 2a3d29b5dfd48083
````text
---
name: anime-js
description: Use when implementing Disney's 12 animation principles with Anime.js library
---

# Anime.js Animation Principles

Implement all 12 Disney animation principles using Anime.js's flexible animation engine.

## 1. Squash and Stretch

```javascript
anime({
  targets: '.ball',
  scaleX: [1, 1.2, 1],
  scaleY: [1, 0.8, 1],
  duration: 300,
  easing: 'easeInOutQuad'
});
```

## 2. Anticipation

```javascript
anime.timeline()
  .add({
    targets: '.character',
    translateY: 10,
    scaleY: 0.9,
    duration: 200
  })
  .add({
    targets: '.character',
    translateY: -200,
    duration: 400,
    easing: 'easeOutQuad'
  });
```

## 3. Staging

```javascript
anime({
  targets: '.background',
  filter: 'blur(3px)',
  opacity: 0.6,
  duration: 500
});
anime({
  targets: '.hero',
  scale: 1.1,
  duration: 500
});
```

## 4. Straight Ahead / Pose to Pose

```javascript
anime({
  targets: '.element',
  keyframes: [
    { translateX: 0, translateY: 0 },
    { translateX: 100, translateY: -50 },
    { translateX: 200, translateY: 0 },
    { translateX: 300, translateY: -30 }
  ],
  duration: 1000
});
```

## 5. Follow Through and Overlapping Action

```javascript
anime.timeline()
  .add({ targets: '.body', translateX: 200, duration: 500 })
  .add({ targets: '.hair', translateX: 200, duration: 500 }, '-=450')
  .add({ targets: '.cape', translateX: 200, duration: 600 }, '-=500');
```

## 6. Slow In and Slow Out

```javascript
anime({
  targets: '.element',
  translateX: 300,
  duration: 600,
  easing: 'easeInOutCubic'
});
// Options: easeInQuad, easeOutQuad, easeInOutQuad
// easeInCubic, easeOutCubic, easeInOutCubic
// spring(mass, stiffness, damping, velocity)
```

## 7. Arc

```javascript
anime({
  targets: '.ball',
  translateX: 200,
  translateY: [
    { value: -100, duration: 500 },
    { value: 0, duration: 500 }
  ],
  easing: 'easeOutQuad',
  duration: 1000
});

// Or use SVG path
anime({
  targets: '.element',
  translateX: anime.path('.motion-path')('x'),
  translateY: anime.path('.motion-path')('y'),
  duration: 1000
});
```

## 8. Secondary Action

```javascript
const tl = anime.timeline();
tl.add({
  targets: '.button',
  scale: 1.1,
  duration: 200
})
.add({
  targets: '.icon',
  rotate: 15,
  duration: 150
}, '-=150')
.add({
  targets: '.particles',
  opacity: [0, 1],
  delay: anime.stagger(50)
}, '-=100');
```

## 9. Timing

```javascript
// Fast - snappy
anime({ targets: '.fast', translateX: 100, duration: 150 });

// Normal
anime({ targets: '.normal', translateX: 100, duration: 300 });

// Slow - dramatic
anime({ targets: '.slow', translateX: 100, duration: 600 });

// Spring physics
anime({ targets: '.spring', translateX: 100, easing: 'spring(1, 80, 10, 0)' });
```

## 10. Exaggeration

```javascript
anime({
  targets: '.element',
  scale: 1.5,
  rotate: '2turn',
  duration: 800,
````
END THIRD-PARTY FILE 2a3d29b5dfd48083

The third-party file has ended. Everything between the 2a3d29b5dfd48083 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2866 of 3713 bytes. © dylantarre · MIT · https://github.com/dylantarre/animation-principles/tree/HEAD/skills/09-by-tool-framework/anime-js/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
