| name | description | args |
|---|---|---|
gif-edit |
Edit GIF files with gifsicle for PR demos. Replicate frames, delete frames, adjust timing, set looping, and more. Use when asked to "edit a gif", "slow down a gif", "hold on a frame", "fix gif timing", or optimize recorded demo GIFs. |
(optional) path to GIF file and/or editing instructions |
Edit GIF files using gifsicle for polishing PR demo recordings.
- If a path is provided in args, use it
- Otherwise check
~/Downloads/for recent GIFs - If ambiguous, ask the user which file
Always start by running:
gifsicle -I <path>This shows frame count, dimensions, and per-frame delays. Share a summary with the user:
GIF: <filename>
Frames: <count> (#0 through #N)
Dimensions: <W>x<H>
Total duration: ~<sum of delays>s
Frame delays: <list or pattern>
Parse the user's instructions and translate to gifsicle commands. Common operations:
Use frame selection to repeat a frame N times:
gifsicle input.gif "#0" "#1" "#1" "#1" "#1" "#1" "#2" "#3" -o output.gifThis repeats frame #1 five times. When replicating, the frame keeps its original delay.
Omit unwanted frames from the selection:
# Delete frame #0 (skip it in the sequence)
gifsicle input.gif "#1" "#2" "#3" "#4" -o output.gif
# Delete a range
gifsicle input.gif "#0" "#5-9" -o output.gif# Set all frames to 100ms (10 = 1/100s units)
gifsicle input.gif -d10 -o output.gif
# Set specific frame delays
gifsicle input.gif -d80 "#0" -d30 "#1" -d80 "#2" -o output.gifDelay units: gifsicle uses 1/100s. So -d100 = 1 second, -d30 = 0.3s, -d200 = 2s.
# Loop forever
gifsicle input.gif --loop -o output.gif
# Loop N times
gifsicle input.gif --loop=3 -o output.gif
# No loop (play once)
gifsicle input.gif --no-loop -o output.gif# Optimize (lossless)
gifsicle -O3 input.gif -o output.gif
# Reduce colors
gifsicle --colors 128 input.gif -o output.gif
# Lossy compression (higher = more compression)
gifsicle --lossy=80 -O3 input.gif -o output.gifgifsicle --crop x0,y0-x1,y1 input.gif -o output.gifgifsicle --resize WxH input.gif -o output.gif
gifsicle --resize-width 800 input.gif -o output.gifAfter editing, always run gifsicle -I again and report the result so the user can confirm.
- Frame numbering: gifsicle uses 0-indexed frames (#0 is the first frame). If the user uses 1-indexed numbering, convert accordingly and confirm.
- In-place editing: Use
-o <same-file>to overwrite. gifsicle handles this safely. - Color warnings:
too many colors, using local colormapsis harmless — gifsicle handles it automatically. - Combining operations: Chain multiple edits in one command when possible. Frame selection, delays, and options can be combined.
- Order of operations: When replicating AND deleting frames, work from the original frame indices. Build the complete desired frame sequence in one command.
- Hold on results: Replicate the final frame 3-5x so viewers can see the end state
- Hold on before-state: Replicate the first meaningful frame so viewers orient themselves
- Remove setup frames: Delete early frames that show navigation/setup not relevant to the demo
- Consistent pacing: Use
-dto normalize frame delays if recording was inconsistent - Always loop: PR GIFs should loop forever (
--loop) so reviewers can rewatch - Target size: Keep under 10MB for GitHub/Graphite PR descriptions; use
--lossy=80 -O3if too large