# gifs

gifs is a Claude Code rule for synchronizing GIF, APNG, AVIF, and WebP animations with Remotion composition timelines.

- rule · `type=rule` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline · ★ 849 repo stars
- Author: coleam00
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/coleam00/second-brain-skills/tree/HEAD/.claude/skills/remotion/rules/gifs.md
- Updated: 2026-01-24
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/rules/gifs

## What it does

This rule teaches Claude Code how to integrate animated files into Remotion using `<AnimatedImage>`. It details layout fitting options, playback speed controls, and end-of-animation behavior such as freezing on the last frame or clearing canvas elements.

Dynamic duration calculation relies on `getGifDurationInSeconds` from `@remotion/gif` to fit timeline composition length. Because `<AnimatedImage>` works exclusively in Chrome and Firefox, the rule defines a fallback path with the `<Gif>` component. Any remote image link must have CORS headers enabled to avoid runtime browser blocking.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/rules/gifs.md` — The paths frontmatter field limits the files

### Codex

**AGENTS.md**
- Codex reads AGENTS.md: paste the rule text there

### Cursor

**Manually: put the files in place**
- File: `.cursor/rules/gifs.mdc` — Frontmatter: description, globs, alwaysApply

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/instructions/gifs.instructions.md` — The applyTo field sets which files it applies to

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/rules/gifs.md`

### Cline

**Manually: put the files in place**
- File: `.clinerules/gifs.md`

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/coleam00/second-brain-skills/tree/HEAD/.claude/skills/remotion/rules/gifs.md

## When to use it
- synchronize GIF or WebP playback with the Remotion timeline
- adjust composition length automatically based on animation duration
- configure loop behavior, playback rates, and container fitting
- set up a fallback for browsers where AnimatedImage is unsupported

## Example prompts
- Insert animation.gif into my Remotion composition at double speed
- Calculate video timeline length from animation.gif duration
- Add a WebP asset that stops on its final frame instead of looping

## Similar
- [remotion-markup](https://affpapa.org/en/nevibecode/skills/remotion-dev-remotion-markup.md) — skill · 367400 installs
- [countdown-video](https://affpapa.org/en/nevibecode/skills/countdown-video.md) — skill · 3600 installs
- [wrapped-video](https://affpapa.org/en/nevibecode/skills/wrapped-video.md) — skill · 2700 installs
- [remotion-best-practices](https://affpapa.org/en/nevibecode/skills/vercel-labs-remotion-best-practices.md) — skill · 1600 installs
- [remotion-3d-ticker](https://affpapa.org/en/nevibecode/skills/remotion-3d-ticker.md) — skill · 1100 installs
- [disney-animation-rule-skill](https://affpapa.org/en/nevibecode/skills/disney-animation-rule-skill.md) — skill · 999 installs

From the same set: [coleam00/second-brain-skills](https://affpapa.org/en/nevibecode/by/coleam00/second-brain-skills.md) — 33 cards

---
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
