lottie · boraoztunc — Claude Code skill: Lottie and dotLottie in HyperFrames
Teaches the agent to embed Lottie and dotLottie animations in HyperFrames so the composition timeline can be seeked to any frame.
Apache-2.0 212 installs ★ 484 updated 2026-08-15
npx skills add boraoztunc/skills --skill lottie -a claude-codeWhat lottie does
The skill covers both player flavours HyperFrames can seek: lottie-web and @lottiefiles/dotlottie-web. An animation file already carries its own timeline, so the adapter only needs a player object to move around. lottie-web is driven with goToAndStop(timeMs, false); dotLottie goes through frame or percentage calls, depending on which player got created.
You get HTML snippets for each route plus a short rule set. Assets stay local, usually under assets/. Playback starts paused, loops stay off unless someone asked for a loop. Pin the container size in CSS so layout does not shift. Every player instance belongs in the window.__hfLottie array, because that registry is what HyperFrames scans — skip it and the animation will not move.
After a composition change, run npx hyperframes lint and then npx hyperframes validate. Do not start playback with play(), do not point path at a remote URL during render, and do not register a player asynchronously after validation has already inspected the page. Whether your After Effects effects survived the export is something to check in a browser.
What it helps with
- embed an After Effects export into a HyperFrames composition
- seek a Lottie animation to an exact moment
- drive several animations from one composition clock
- port a Remotion Lottie component to plain HTML
- catch a broken composition with lint and validate
Example prompts for the agent
- Wire
assets/logo-reveal.jsonin withlottie-weband register the animation onwindow.__hfLottie. - Port this Remotion Lottie component to plain HyperFrames HTML, no autoplay.
- Add two dotLottie players, seek both to the middle of the composition, then run
npx hyperframes validate.
How to install lottie
1Skills CLI (Vercel)
npx skills add boraoztunc/skills --skill lottie -a claude-code2Manually: put the files in place
~/.claude/skills/lottie/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/lottie/
1Skills CLI (Vercel)
npx skills add boraoztunc/skills --skill lottie -a codex2Manually: put the files in place
.agents/skills/lottie/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add boraoztunc/skills --skill lottie -a cursor2Manually: put the files in place
.cursor/skills/lottie/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install boraoztunc/skills lottie2Manually: put the files in place
.github/skills/lottie/SKILL.md1Skills CLI (Vercel)
npx skills add boraoztunc/skills --skill lottie -a gemini-cli2Platform CLI
gemini skills install https://github.com/boraoztunc/skills --path lottieManually: put the files in place
.devin/skills/lottie/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add boraoztunc/skills --skill lottie -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about lottie
How do I install the lottie skill in Claude Code?
Run npx skills add boraoztunc/skills --skill lottie -a claude-code. The skill file lands at ~/.claude/skills/lottie/SKILL.md.
What does the lottie skill do?
It shows the agent how to mount a lottie-web or dotLottie player inside HyperFrames, register it on window.__hfLottie, and keep the timeline seekable.
Why does the animation stay frozen?
Most likely the player never reached window.__hfLottie, or it was started with play(). HyperFrames only moves instances it finds in that array.
Source text
SKILL.md · Apache-2.0
---
name: lottie
description: Lottie and dotLottie adapter patterns for HyperFrames. Use when embedding lottie-web JSON animations, .lottie files, @lottiefiles/dotlottie-web players, registering instances on window.__hfLottie, or making After Effects exports deterministic in HyperFrames.
---
# Lottie for HyperFrames
HyperFrames can seek both `lottie-web` and dotLottie players through its `lottie` runtime adapter. Lottie is a strong fit because the animation timeline is already encoded in the asset; HyperFrames only needs a player object it can seek.
## Contract
- Load assets from local project files, usually under `assets/`.
- Set `autoplay: false`.
- Prefer `loop: false` unless the user explicitly wants a loop.
- Register every returned animation or player on `window.__hfLottie`.
- Keep the Lottie container dimensions stable with CSS.
The adapter seeks `lottie-web` with `goToAndStop(timeMs, false)` and dotLottie with frame or percentage APIs depending on player shape.
## lottie-web Pattern
```html
<div id="logo-lottie" class="lottie-layer"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.12.2/lottie.min.js"></script>
<script>
const anim = lottie.loadAnimation({
container: document.getElementById("logo-lottie"),
renderer: "svg",
loop: false,
autoplay: false,
path: "assets/logo-reveal.json",
});
window.__hfLottie = window.__hfLottie || [];
window.__hfLottie.push(anim);
</script>
```
```css
.lottie-layer {
width: 100%;
height: 100%;
}
```
## dotLottie Pattern
```html
<canvas id="product-lottie" class="lottie-canvas"></canvas>
<script src="https://unpkg.com/@lottiefiles/dotlottie-web"></script>
<script>
const player = new DotLottie({
canvas: document.getElementById("product-lottie"),
src: "assets/product-flow.lottie",
autoplay: false,
loop: false,
});
window.__hfLottie = window.__hfLottie || [];
window.__hfLottie.push(player);
</script>
```
```css
.lottie-canvas {
width: 100%;
height: 100%;
display: block;
}
```
## Multiple Animations
Push each player into the same registry:
```js
window.__hfLottie = window.__hfLottie || [];
window.__hfLottie.push(backgroundAnim);
window.__hfLottie.push(iconAnim);
window.__hfLottie.push(confettiAnim);
```
HyperFrames seeks them all to the same composition time.
## Good Uses
- After Effects exports that are already known to render correctly in lottie-web.
- Logo reveals, icon loops, decorative accents, and product UI motion.
- Translating Remotion Lottie usage into plain HyperFrames HTML.
## Avoid
- Relying on remote `path` URLs at render time.
- Starting playback with `play()`.
- Assuming unsupported After Effects effects will survive export. Test the JSON or `.lottie` file in a browser first.
- Loading a player asynchronously and registering it after HyperFrames validation has already inspected the page.
## Validation
After editing a Lottie composition:
```bash
npx hyperframes lint
npx hyperframes validate
```
## Credits And References
- HyperFrames adapter source: `packages/core/src/runtime/adapters/lottie.ts`.
- lottie-web by Airbnb: https://github.com/airbnb/lottie-web
- lottie-web `loadAnimation` options: https://github.com/airbnb/lottie-web/wiki/loadAnimation-options
- dotLottie web player methods by LottieFiles: https://developers.lottiefiles.com/docs/dotlottie-player/dotlottie-web/methods
© boraoztunc · Apache-2.0 · boraoztunc/skills
Similar skills
All skills for Frontend and UI →lottie by other authors comes first.