Skip to main content
rule CX Codex

gifs — Claude Code rule: what it does, how to install

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

no license ★ 849 updated 2026-01-24

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/rules/gifs.md
Open on GitHub

What gifs 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.

What it helps with

  • 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 for the agent

  • 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

How to install gifs

Manually: put the files in place

.claude/rules/gifs.md

The paths frontmatter field limits the files

Step by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use

Questions about gifs

How to install gifs in Claude Code?

Add the rule configuration file to your project directory at .claude/rules/gifs.md.

What animated formats work with this rule?

The <AnimatedImage> component handles GIF, APNG, AVIF, and WebP files. The alternative <Gif> component supports only GIF assets.

Why does AnimatedImage fail in some browsers?

<AnimatedImage> is supported only in Chrome and Firefox. Projects targeting other rendering environments require the <Gif> component from @remotion/gif.

Similar IDE rules

All IDE rules for Frontend and UI →

From the same set33

The whole set →

Project sponsors

Companies that keep this analytics open