claude-gif -- The Ultimate GIF Creator
Orchestrates five sub-skills to create, generate, convert, optimize, and edit GIFs.
Every path from concept to final optimized GIF runs through this skill.
Quick Reference
| Command |
Description |
Sub-Skill |
/gif create <idea> |
Programmatic animation via Remotion (text, spinners, memes, motion graphics) |
claude-gif-create |
/gif generate <prompt> |
AI video generation via Veo 3.1, then convert to GIF |
claude-gif-generate |
/gif convert <path> |
Convert video, image sequence, or animated SVG to GIF |
claude-gif-convert |
/gif optimize <path> |
Reduce GIF file size for a target platform |
claude-gif-optimize |
/gif edit <path> |
Modify an existing GIF (speed, reverse, crop, text, trim) |
claude-gif-edit |
/gif setup |
Install/verify all dependencies |
(setup.sh) |
/gif <idea> |
Auto-detect best approach from description |
(orchestrator routes) |
Orchestration Logic
When the user invokes /gif, determine intent and route to the correct sub-skill.
Intent Detection
- Has a file path to a video/image/SVG? -->
/gif convert
- Has a file path to an existing GIF?
- Mentions size, compress, platform fit -->
/gif optimize
- Mentions speed, reverse, crop, text, trim -->
/gif edit
- Describes a text animation, spinner, counter, meme, logo animation, progress bar? -->
/gif create
- Describes realistic/cinematic motion, product demo, abstract art, nature scene? -->
/gif generate
- Ambiguous description of something to animate?
- If it involves text, geometric shapes, UI elements -->
/gif create (Remotion)
- If it involves photorealistic subjects, complex motion -->
/gif generate (Veo)
- Mentions "optimize", "compress", "reduce", "fit", platform name? -->
/gif optimize
- Mentions "edit", "speed", "reverse", "crop", "text overlay"? -->
/gif edit
- Says "setup" or "install"? --> Run
bash ~/.claude/skills/claude-gif/scripts/setup.sh
Routing Commands
/gif create "bouncing hello world text" --> claude-gif-create
/gif generate "campfire flickering at night" --> claude-gif-generate
/gif convert ~/Videos/clip.mp4 --> claude-gif-convert
/gif convert ~/Design/logo.svg --> claude-gif-convert (Mode D: SVG)
/gif optimize ~/Documents/gif_output/big.gif --> claude-gif-optimize
/gif edit ~/Documents/gif_output/clip.gif --> claude-gif-edit
/gif setup --> scripts/setup.sh
Bare /gif <description> Routing
When no explicit sub-command is given, analyze the description:
- Keywords "text", "spinner", "loading", "counter", "meme", "typewriter", "logo reveal", "progress" --> create
- Keywords "realistic", "cinematic", "product", "nature", "abstract", "person", "animal" --> generate
- A file path to .mp4/.webm/.mov/.avi/.mkv/.svg --> convert
- A file path to .gif + size/platform keywords --> optimize
- A file path to .gif + edit keywords --> edit
Quality Presets
| Preset |
Width |
FPS |
Colors |
Dither |
Max Size |
Best For |
discord |
320px |
10 |
128 |
bayer:3 |
256 KB |
Discord inline embeds |
slack |
400px |
12 |
192 |
floyd_steinberg |
500 KB |
Slack messages |
twitter |
480px |
15 |
256 |
floyd_steinberg |
15 MB |
Twitter/X posts |
web |
480px |
15 |
256 |
floyd_steinberg |
2 MB |
General web usage |
hq |
640px |
20 |
256 |
sierra2 |
10 MB |
High-quality display |
Safety Rules
- No-overwrite: Always pass
-n to FFmpeg (skip if output exists). Only pass -y when user explicitly says overwrite.
- Source protection: NEVER write output to the same path as input. Preflight catches this.
- Cost confirmation: Veo generation costs money. Always confirm with user before calling generate.py.
- Temp isolation: All intermediate files go in
/tmp/claude-gif/. Clean up on completion.
- Output directory: Final GIFs go to
~/Documents/gif_output/ unless user specifies a different path.
- Preflight check: Run
bash ~/.claude/skills/claude-gif/scripts/preflight.sh <input> <output> before any file write.
Multi-Step Pipelines
Complex requests may chain sub-skills:
generate --> convert --> optimize
(Veo) (to GIF) (for Discord)
create --> optimize
(Remotion) (shrink)
convert --> edit --> optimize
(video) (trim) (platform)
convert (SVG) --> optimize
(Playwright) (for web)
Always plan the full pipeline before starting. Tell the user the steps.
Pre-Flight
Before ANY write operation:
bash ~/.claude/skills/claude-gif/scripts/preflight.sh <input_file> <output_file>
On /gif setup or first use:
bash ~/.claude/skills/claude-gif/scripts/check_deps.sh
If dependencies are missing:
bash ~/.claude/skills/claude-gif/scripts/setup.sh
Reference Files
Load on demand -- only read the reference relevant to the current task:
| Reference |
Path |
When to Load |
| GIF Optimization |
~/.claude/skills/claude-gif/references/gif-optimization.md |
Before optimize, or choosing palette/dither settings |
| Platform Specs |
~/.claude/skills/claude-gif/references/platform-specs.md |
When targeting a specific platform |
| Remotion Patterns |
~/.claude/skills/claude-gif/references/remotion-gif.md |
Before writing Remotion components |
| Prompt Engineering |
~/.claude/skills/claude-gif/references/prompt-engineering.md |
Before constructing Veo prompts |
| Perfect Loops |
~/.claude/skills/claude-gif/references/perfect-loops.md |
When making seamless loops |
Scripts
| Script |
Path |
Purpose |
setup.sh |
scripts/setup.sh |
Install and verify all dependencies |
check_deps.sh |
scripts/check_deps.sh |
Check dependency status (JSON, no installs) |
preflight.sh |
scripts/preflight.sh |
Safety check before writes (input/output validation) |
gif_convert.sh |
scripts/gif_convert.sh |
FFmpeg two-pass palette video-to-GIF conversion |
gif_optimize.py |
scripts/gif_optimize.py |
Multi-strategy GIF size optimizer (Python) |
gif_loop.py |
scripts/gif_loop.py |
Perfect loop creator: crossfade, ping-pong, freeze blend (Python) |
gif_frames.py |
scripts/gif_frames.py |
Assemble PNG/JPEG frames into optimized GIF (Python) |
All scripts are in ~/.claude/skills/claude-gif/scripts/.
Python scripts use ~/.video-skill/bin/python3 (venv with Pillow, numpy).
Sub-Skills
| Sub-Skill |
When to Use |
claude-gif-create |
Programmatic animations: text, spinners, counters, memes, logos, progress bars, motion graphics. Uses Remotion (React + Node.js). |
claude-gif-generate |
AI-generated motion: cinematic loops, product demos, abstract art, realistic subjects. Uses Veo 3.1 (costs money). |
claude-gif-convert |
File conversion: video to GIF, image sequence to GIF, AI image sequence to GIF, animated SVG to transparent GIF. |
claude-gif-optimize |
Size reduction: platform auto-fit, lossy compression, color/dimension/frame reduction, dither tuning. |
claude-gif-edit |
Modify existing GIFs: speed change, reverse, ping-pong, crop, resize, text overlay, frame extraction, loop control, trim. |
Workflow Example
User: "Make me a Discord-sized GIF of a cozy campfire loop"
- Route to
claude-gif-generate (realistic motion = Veo)
- Read
references/prompt-engineering.md for loop-friendly prompt patterns
- Confirm cost with user (~$0.60 for 4s Veo Fast)
- Generate 4s campfire video via Veo
- Convert to GIF:
gif_convert.sh --input campfire.mp4 --preset discord
- Perfect loop:
gif_loop.py --input campfire.gif --method crossfade --frames 5
- Verify size < 256KB. If over, route through
claude-gif-optimize
- Deliver to
~/Documents/gif_output/campfire_discord.gif
1---2name: claude-gif3description: Ultimate GIF creator: AI video-to-GIF (Veo 3.1), programmatic animations (Remotion), AI image sequence assembly (Gemini/FLUX.2), animated SVG-to-transparent-GIF (Playwright), video conversion, and GIF editing/optimization. Palette optimization, perfect loops, platform-specific sizing, dithering control. Use when user says "gif", "create gif", "make gif", "animated gif", "convert to gif", "optimize gif", "gif from video", "meme gif", "reaction gif", "loading spinner gif", "logo animation gif", "transparent gif", "svg to gif", or "/gif".4---56# claude-gif -- The Ultimate GIF Creator78Orchestrates five sub-skills to create, generate, convert, optimize, and edit GIFs.9Every path from concept to final optimized GIF runs through this skill.1011## Quick Reference1213| Command | Description | Sub-Skill |14|---------|-------------|-----------|15| `/gif create <idea>` | Programmatic animation via Remotion (text, spinners, memes, motion graphics) | claude-gif-create |16| `/gif generate <prompt>` | AI video generation via Veo 3.1, then convert to GIF | claude-gif-generate |17| `/gif convert <path>` | Convert video, image sequence, or animated SVG to GIF | claude-gif-convert |18| `/gif optimize <path>` | Reduce GIF file size for a target platform | claude-gif-optimize |19| `/gif edit <path>` | Modify an existing GIF (speed, reverse, crop, text, trim) | claude-gif-edit |20| `/gif setup` | Install/verify all dependencies | (setup.sh) |21| `/gif <idea>` | Auto-detect best approach from description | (orchestrator routes) |2223## Orchestration Logic2425When the user invokes `/gif`, determine intent and route to the correct sub-skill.2627### Intent Detection28291. **Has a file path to a video/image/SVG?** --> `/gif convert`302. **Has a file path to an existing GIF?**31 - Mentions size, compress, platform fit --> `/gif optimize`32 - Mentions speed, reverse, crop, text, trim --> `/gif edit`333. **Describes a text animation, spinner, counter, meme, logo animation, progress bar?** --> `/gif create`344. **Describes realistic/cinematic motion, product demo, abstract art, nature scene?** --> `/gif generate`355. **Ambiguous description of something to animate?**36 - If it involves text, geometric shapes, UI elements --> `/gif create` (Remotion)37 - If it involves photorealistic subjects, complex motion --> `/gif generate` (Veo)386. **Mentions "optimize", "compress", "reduce", "fit", platform name?** --> `/gif optimize`397. **Mentions "edit", "speed", "reverse", "crop", "text overlay"?** --> `/gif edit`408. **Says "setup" or "install"?** --> Run `bash ~/.claude/skills/claude-gif/scripts/setup.sh`4142### Routing Commands4344```45/gif create "bouncing hello world text" --> claude-gif-create46/gif generate "campfire flickering at night" --> claude-gif-generate47/gif convert ~/Videos/clip.mp4 --> claude-gif-convert48/gif convert ~/Design/logo.svg --> claude-gif-convert (Mode D: SVG)49/gif optimize ~/Documents/gif_output/big.gif --> claude-gif-optimize50/gif edit ~/Documents/gif_output/clip.gif --> claude-gif-edit51/gif setup --> scripts/setup.sh52```5354### Bare `/gif <description>` Routing5556When no explicit sub-command is given, analyze the description:57- Keywords "text", "spinner", "loading", "counter", "meme", "typewriter", "logo reveal", "progress" --> create58- Keywords "realistic", "cinematic", "product", "nature", "abstract", "person", "animal" --> generate59- A file path to .mp4/.webm/.mov/.avi/.mkv/.svg --> convert60- A file path to .gif + size/platform keywords --> optimize61- A file path to .gif + edit keywords --> edit6263## Quality Presets6465| Preset | Width | FPS | Colors | Dither | Max Size | Best For |66|--------|-------|-----|--------|--------|----------|----------|67| `discord` | 320px | 10 | 128 | bayer:3 | 256 KB | Discord inline embeds |68| `slack` | 400px | 12 | 192 | floyd_steinberg | 500 KB | Slack messages |69| `twitter` | 480px | 15 | 256 | floyd_steinberg | 15 MB | Twitter/X posts |70| `web` | 480px | 15 | 256 | floyd_steinberg | 2 MB | General web usage |71| `hq` | 640px | 20 | 256 | sierra2 | 10 MB | High-quality display |7273## Safety Rules74751. **No-overwrite**: Always pass `-n` to FFmpeg (skip if output exists). Only pass `-y` when user explicitly says overwrite.762. **Source protection**: NEVER write output to the same path as input. Preflight catches this.773. **Cost confirmation**: Veo generation costs money. Always confirm with user before calling generate.py.784. **Temp isolation**: All intermediate files go in `/tmp/claude-gif/`. Clean up on completion.795. **Output directory**: Final GIFs go to `~/Documents/gif_output/` unless user specifies a different path.806. **Preflight check**: Run `bash ~/.claude/skills/claude-gif/scripts/preflight.sh <input> <output>` before any file write.8182## Multi-Step Pipelines8384Complex requests may chain sub-skills:8586```87generate --> convert --> optimize88 (Veo) (to GIF) (for Discord)8990create --> optimize91(Remotion) (shrink)9293convert --> edit --> optimize94(video) (trim) (platform)9596convert (SVG) --> optimize97 (Playwright) (for web)98```99100Always plan the full pipeline before starting. Tell the user the steps.101102## Pre-Flight103104Before ANY write operation:105```bash106bash ~/.claude/skills/claude-gif/scripts/preflight.sh <input_file> <output_file>107```108109On `/gif setup` or first use:110```bash111bash ~/.claude/skills/claude-gif/scripts/check_deps.sh112```113114If dependencies are missing:115```bash116bash ~/.claude/skills/claude-gif/scripts/setup.sh117```118119## Reference Files120121Load on demand -- only read the reference relevant to the current task:122123| Reference | Path | When to Load |124|-----------|------|-------------|125| GIF Optimization | `~/.claude/skills/claude-gif/references/gif-optimization.md` | Before optimize, or choosing palette/dither settings |126| Platform Specs | `~/.claude/skills/claude-gif/references/platform-specs.md` | When targeting a specific platform |127| Remotion Patterns | `~/.claude/skills/claude-gif/references/remotion-gif.md` | Before writing Remotion components |128| Prompt Engineering | `~/.claude/skills/claude-gif/references/prompt-engineering.md` | Before constructing Veo prompts |129| Perfect Loops | `~/.claude/skills/claude-gif/references/perfect-loops.md` | When making seamless loops |130131## Scripts132133| Script | Path | Purpose |134|--------|------|---------|135| `setup.sh` | `scripts/setup.sh` | Install and verify all dependencies |136| `check_deps.sh` | `scripts/check_deps.sh` | Check dependency status (JSON, no installs) |137| `preflight.sh` | `scripts/preflight.sh` | Safety check before writes (input/output validation) |138| `gif_convert.sh` | `scripts/gif_convert.sh` | FFmpeg two-pass palette video-to-GIF conversion |139| `gif_optimize.py` | `scripts/gif_optimize.py` | Multi-strategy GIF size optimizer (Python) |140| `gif_loop.py` | `scripts/gif_loop.py` | Perfect loop creator: crossfade, ping-pong, freeze blend (Python) |141| `gif_frames.py` | `scripts/gif_frames.py` | Assemble PNG/JPEG frames into optimized GIF (Python) |142143All scripts are in `~/.claude/skills/claude-gif/scripts/`.144Python scripts use `~/.video-skill/bin/python3` (venv with Pillow, numpy).145146## Sub-Skills147148| Sub-Skill | When to Use |149|-----------|-------------|150| `claude-gif-create` | Programmatic animations: text, spinners, counters, memes, logos, progress bars, motion graphics. Uses Remotion (React + Node.js). |151| `claude-gif-generate` | AI-generated motion: cinematic loops, product demos, abstract art, realistic subjects. Uses Veo 3.1 (costs money). |152| `claude-gif-convert` | File conversion: video to GIF, image sequence to GIF, AI image sequence to GIF, animated SVG to transparent GIF. |153| `claude-gif-optimize` | Size reduction: platform auto-fit, lossy compression, color/dimension/frame reduction, dither tuning. |154| `claude-gif-edit` | Modify existing GIFs: speed change, reverse, ping-pong, crop, resize, text overlay, frame extraction, loop control, trim. |155156## Workflow Example157158User: "Make me a Discord-sized GIF of a cozy campfire loop"1591601. Route to `claude-gif-generate` (realistic motion = Veo)1612. Read `references/prompt-engineering.md` for loop-friendly prompt patterns1623. Confirm cost with user (~$0.60 for 4s Veo Fast)1634. Generate 4s campfire video via Veo1645. Convert to GIF: `gif_convert.sh --input campfire.mp4 --preset discord`1656. Perfect loop: `gif_loop.py --input campfire.gif --method crossfade --frames 5`1667. Verify size < 256KB. If over, route through `claude-gif-optimize`1678. Deliver to `~/Documents/gif_output/campfire_discord.gif`