---
name: gif-maker
description: Make optimized GIFs (or animated WebP / looping MP4) from Kenerate video clips or a sequence of images. Trims, sets fps and width, uses a two-pass palette for clean colours, adds an optional meme-style caption, a boomerang loop and an automatic size cap for Slack, Discord, email or GitHub. Use when the user wants a GIF, reaction GIF, animated sticker, looping preview, product GIF for email, or to convert a video into a GIF.
compatibility: Needs Python 3.9+ with Pillow and ffmpeg; uses the Kenerate MCP to make the source clip.
metadata:
  author: kenerate
  version: "1.0"
  kenerate-tools: "generate_video generate_image estimate_cost wait_for_generation"
---

# GIF maker

Rules: [references/KENERATE.md](references/KENERATE.md) (models and voices: [references/MODELS.md](references/MODELS.md), or the free `pick_model` / `pick_voice` tools).

## Ask the user
Source (an earlier Kenerate clip, their link, or "make one"), which seconds, caption text, size limit (Slack ~10 MB,
Discord 10 MB, email ≤ 1-2 MB) and loop style.

## 1. Source clip (Kenerate, if needed)
`generate_video(prompt="<short looping action>, seamless loop, static camera", duration=3-5, model="kenerate/wan-3.0", resolution="480p", aspect_ratio="1:1", audio=false)`.
Run `estimate_cost` first. 480p is plenty for a GIF. For the cheapest drafts use `kenerate/wan-2.2-fast` (silent). Wait with kind `"video"`.

## 2. Convert (local)
```
python <skill-dir>/scripts/gif.py --input "<clip url>" --start 0.5 --end 3.5 \
  --width 480 --fps 15 --max-mb 8 --text "when the coffee hits" --boomerang \
  --out kenerate-out/gif-maker/<project>.gif
python <skill-dir>/scripts/gif.py --images "<img1>" "<img2>" "<img3>" --frame-seconds 0.5 --format webp
```
- Over `--max-mb`, it retries automatically at lower fps and width (up to 6 tries) and says so.
- `--format webp` is smaller with better colour; `mp4` is a silent H.264 loop, the smallest.
- `--text-pos top|bottom`, `--font` / `--font-family "Anton"` (free font, downloaded once).

## Output
The GIF / WebP / MP4 path, its size in MB, and the final width and fps.

## Limits
GIFs over ~10 s get big; suggest MP4 or WebP. Captions are burned into every frame.
