make-gif
Original:🇺🇸 English
Translated
This skill should be used when the user asks to "make a GIF", "convert to GIF", "create a GIF from this video", "export as GIF", "turn this clip into a GIF", "make an animated GIF", or "gif this".
14installs
Sourcegupsammy/claudest
Added on
NPX Install
npx skill4agent add gupsammy/claudest make-gifTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Video GIF
Convert a video clip to a high-quality GIF using the mandatory 2-pass palette workflow.
Single-pass GIF always produces banding and color artifacts. The palettegen → paletteuse pipeline analyzes the actual clip to build an optimal 256-color palette, then renders with it. Never skip this.
Process
1. Gather parameters
Ask for any not already provided in the request:
- Start time — default
0 - Duration or end time — required; warn if >30s (file size grows rapidly)
- Width — default px; height auto-calculated to preserve aspect ratio
480 - FPS — default ; higher = smoother + larger file
15
If the user asks about aspect ratio or the source has unusual dimensions, probe first:
bash
ffprobe -v quiet -print_format json -show_streams "$INPUT" | \
python3 -c "import json,sys; s=[s for s in json.load(sys.stdin)['streams'] if s['codec_type']=='video'][0]; print(s['width'], 'x', s['height'])"2. Build the 2-pass command
Pass 1 — generate optimized palette:
bash
ffmpeg -ss $START -t $DURATION -i "$INPUT" \
-vf "fps=$FPS,scale=$WIDTH:-1:flags=lanczos,palettegen=stats_mode=full" \
/tmp/palette_$$.png -yPass 2 — render GIF using palette:
bash
ffmpeg -ss $START -t $DURATION -i "$INPUT" -i /tmp/palette_$$.png \
-lavfi "fps=$FPS,scale=$WIDTH:-1:flags=lanczos [x]; [x][1:v] paletteuse=dither=bayer:bayer_scale=5" \
"$OUTPUT" -yUse (shell PID) in the palette temp path to avoid collisions with concurrent runs.
$$3. Confirm before running
Show the full 2-pass command and estimated output path. Add a size warning if is large (rough heuristic: >20s at 15fps at 480px → likely >10MB).
duration × fps4. Run both passes, then clean up
bash
rm -f /tmp/palette_$$.pngReport output path and file size.
Key Decisions
- on palettegen analyzes the entire clip — not just the first frame — for better palette coverage across motion.
stats_mode=full - is the sweet spot for photographic content. Use
dither=bayer:bayer_scale=5for flat-color content (illustrations, slides, screen recordings with solid backgrounds).dither=none - placed before
-ssuses container-level fast seek. Apply to both passes for consistent start points and dramatically faster seeks on long source files.-i - on scale gives sharper downsampling than the default
flags=lanczos.bilinear - To control loop count, add to pass 2:
-loop $N= infinite,0= play once,1= play twice.2