Claude Gif Edit logo

Claude Gif Edit

Community
AgriciDaniel
claude-gif-edit

Edit and modify existing GIFs. Speed change, reverse, ping-pong, crop, resize, text overlay, frame extraction, loop control, trim. Uses gifsicle for frame-level operations and FFmpeg for filters. Use when user says "edit gif", "gif speed", "reverse gif", "crop gif", "resize gif", "add text to gif", "gif text overlay", "extract frames", "loop gif", "ping pong gif", or "trim gif".

Overview

PublisherAgriciDaniel
Repositoryclaude-gif
Skill nameclaude-gif-edit
Stars
31
Forks
8
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by AgriciDaniel on GitHub. Read the source before you install it.

Installation

Install the Claude Gif Edit AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/AgriciDaniel/claude-gif/tree/main/skills/claude-gif-edit
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/AgriciDaniel/claude-gif.git /tmp/claude-gif
mkdir -p .claude/skills
cp -r /tmp/claude-gif/skills/claude-gif-edit .claude/skills/claude-gif-edit
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Claude Gif Edit in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Claude Gif Edit on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Claude Gif Edit is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

claude-gif-edit -- GIF Editing and Modification

Modifies existing GIFs using gifsicle for frame-level operations and FFmpeg for filters and complex transformations. All edits preserve the original file (output to a new path).

Pre-Flight

Before ANY edit:

bash
bash ~/.claude/skills/claude-gif/scripts/preflight.sh INPUT.gif OUTPUT.gif

Analyze Before Editing

Always inspect the GIF first:

bash
# Quick stats
gifsicle --info INPUT.gif

# Detailed: dimensions, frame count, duration
ffprobe -v error -show_entries stream=width,height,nb_frames,r_frame_rate \
  -show_entries format=duration -of json INPUT.gif

# File size
stat -c%s INPUT.gif

Edit Operations

1. Speed Change

Speed up (shorter delay between frames):

bash
# 2x speed: halve the delay
gifsicle --delay 3 INPUT.gif -O3 -o OUTPUT.gif

# General formula: --delay is in centiseconds (1/100th of a second)
# 10fps = --delay 10, 15fps = --delay 7, 20fps = --delay 5, 30fps = --delay 3

Slow down:

bash
# 0.5x speed: double the delay
gifsicle --delay 13 INPUT.gif -O3 -o OUTPUT.gif

Precise speed change via FFmpeg (re-encodes, so also apply palette):

bash
# 2x speed
ffmpeg -n -i INPUT.gif -filter_complex \
  "[0:v] setpts=0.5*PTS,fps=15,scale=480:-1:flags=lanczos,split [a][b]; \
   [a] palettegen=stats_mode=diff [p]; \
   [b][p] paletteuse=dither=floyd_steinberg:diff_mode=rectangle" \
  -loop 0 OUTPUT.gif

# 0.5x speed
ffmpeg -n -i INPUT.gif -filter_complex \
  "[0:v] setpts=2.0*PTS,fps=15,scale=480:-1:flags=lanczos,split [a][b]; \
   [a] palettegen=stats_mode=diff [p]; \
   [b][p] paletteuse=dither=floyd_steinberg:diff_mode=rectangle" \
  -loop 0 OUTPUT.gif

Speed multiplier to PTS factor: PTS_factor = 1.0 / speed_multiplier

  • 2x speed: setpts=0.5*PTS
  • 3x speed: setpts=0.333*PTS
  • 0.5x speed: setpts=2.0*PTS

2. Reverse

bash
# Simple reverse via FFmpeg (re-encodes with palette)
ffmpeg -n -i INPUT.gif -filter_complex \
  "[0:v] reverse,fps=15,scale=480:-1:flags=lanczos,split [a][b]; \
   [a] palettegen [p]; \
   [b][p] paletteuse=dither=floyd_steinberg" \
  -loop 0 OUTPUT.gif

Frame-level reverse via gifsicle (preserves quality, no re-encode):

bash
# Get frame count
FRAMES=$(gifsicle --info INPUT.gif | grep -oP '\d+ images' | grep -oP '\d+')
# Reverse frame order
gifsicle INPUT.gif $(seq $((FRAMES-1)) -1 0 | sed 's/^/#/') -O3 -o OUTPUT.gif

3. Ping-Pong (Boomerang)

Play forward then backward for a seamless bounce effect:

bash
~/.video-skill/bin/python3 ~/.claude/skills/claude-gif/scripts/gif_loop.py \
  --input INPUT.gif \
  --method pingpong \
  --output OUTPUT.gif

Manual via gifsicle:

bash
FRAMES=$(gifsicle --info INPUT.gif | grep -oP '\d+ images' | grep -oP '\d+')
FORWARD=$(seq 0 $((FRAMES-1)) | sed 's/^/#/')
REVERSE=$(seq $((FRAMES-2)) -1 1 | sed 's/^/#/')
gifsicle INPUT.gif $FORWARD $REVERSE -O3 --loop -o OUTPUT.gif

4. Crop

bash
# Crop to region: --crop X,Y+WxH (from top-left corner)
gifsicle --crop 50,20+300x200 INPUT.gif -O3 -o OUTPUT.gif

# Center crop to square
W=$(gifsicle --info INPUT.gif | grep -oP 'logical screen \K\d+')
H=$(gifsicle --info INPUT.gif | grep -oP 'logical screen \d+x\K\d+')
SIZE=$((W < H ? W : H))
X=$(( (W - SIZE) / 2 ))
Y=$(( (H - SIZE) / 2 ))
gifsicle --crop ${X},${Y}+${SIZE}x${SIZE} INPUT.gif -O3 -o OUTPUT.gif

FFmpeg crop (with re-palette):

bash
ffmpeg -n -i INPUT.gif -filter_complex \
  "[0:v] crop=300:200:50:20,split [a][b]; \
   [a] palettegen [p]; \
   [b][p] paletteuse" \
  -loop 0 OUTPUT.gif

5. Resize

bash
# Resize with gifsicle (fast, no re-palette)
gifsicle --resize-width 320 INPUT.gif -O3 -o OUTPUT.gif
gifsicle --resize-height 240 INPUT.gif -O3 -o OUTPUT.gif
gifsicle --resize 320x240 INPUT.gif -O3 -o OUTPUT.gif  # Exact (may distort)
gifsicle --resize-fit 320x240 INPUT.gif -O3 -o OUTPUT.gif  # Fit within (aspect preserved)

# Resize with FFmpeg (re-palettes for better quality)
bash ~/.claude/skills/claude-gif/scripts/gif_convert.sh \
  --input INPUT.gif \
  --width 320 \
  --output OUTPUT.gif

6. Text Overlay

Add text to a GIF using FFmpeg drawtext filter:

bash
ffmpeg -n -i INPUT.gif -filter_complex \
  "[0:v] fps=15,scale=480:-1:flags=lanczos, \
   drawtext=text='Hello World':fontsize=36:fontcolor=white:borderw=2:bordercolor=black: \
   x=(w-text_w)/2:y=h-text_h-20,split [a][b]; \
   [a] palettegen [p]; \
   [b][p] paletteuse=dither=floyd_steinberg" \
  -loop 0 OUTPUT.gif

Meme-style top and bottom text:

bash
ffmpeg -n -i INPUT.gif -filter_complex \
  "[0:v] fps=15,scale=480:-1:flags=lanczos, \
   drawtext=text='TOP TEXT':fontsize=40:fontcolor=white:borderw=3:bordercolor=black: \
   x=(w-text_w)/2:y=20:font='Impact', \
   drawtext=text='BOTTOM TEXT':fontsize=40:fontcolor=white:borderw=3:bordercolor=black: \
   x=(w-text_w)/2:y=h-text_h-20:font='Impact',split [a][b]; \
   [a] palettegen [p]; \
   [b][p] paletteuse=dither=floyd_steinberg" \
  -loop 0 OUTPUT.gif

Animated text (fade in):

bash
# Text fades in over first 30 frames
ffmpeg -n -i INPUT.gif -filter_complex \
  "[0:v] fps=15,scale=480:-1:flags=lanczos, \
   drawtext=text='Appearing Text':fontsize=36:fontcolor=white@%{eif\\:min(1\\,n/30)\\:d}: \
   borderw=2:bordercolor=black:x=(w-text_w)/2:y=(h-text_h)/2,split [a][b]; \
   [a] palettegen [p]; \
   [b][p] paletteuse" \
  -loop 0 OUTPUT.gif

7. Frame Extraction

Extract all frames:

bash
mkdir -p /tmp/claude-gif/extracted_frames
gifsicle --explode INPUT.gif -o /tmp/claude-gif/extracted_frames/frame

# Or via FFmpeg (as PNG with transparency):
ffmpeg -i INPUT.gif /tmp/claude-gif/extracted_frames/frame_%04d.png

Extract specific frame (e.g., frame 0 as thumbnail):

bash
gifsicle INPUT.gif '#0' -o thumbnail.gif
# Or as PNG:
ffmpeg -i INPUT.gif -vf "select=eq(n\,0)" -vframes 1 thumbnail.png

Extract frame range:

bash
gifsicle INPUT.gif '#10-#20' -O3 -o segment.gif

8. Loop Control

bash
# Infinite loop (default for most GIFs)
gifsicle --loop INPUT.gif -o OUTPUT.gif

# Play exactly 3 times then stop
gifsicle --loop-count=3 INPUT.gif -o OUTPUT.gif

# Play once (no loop)
gifsicle --loop-count=1 INPUT.gif -o OUTPUT.gif

# Remove loop (play once, different from loop-count=1 in some viewers)
gifsicle --no-loop INPUT.gif -o OUTPUT.gif

9. Trim

Trim by frame numbers:

bash
# Keep frames 10 through 40
gifsicle INPUT.gif '#10-#40' -O3 -o OUTPUT.gif

# Remove first 5 frames
FRAMES=$(gifsicle --info INPUT.gif | grep -oP '\d+ images' | grep -oP '\d+')
gifsicle INPUT.gif "#5-#$((FRAMES-1))" -O3 -o OUTPUT.gif

# Remove last 5 frames
gifsicle INPUT.gif "#0-#$((FRAMES-6))" -O3 -o OUTPUT.gif

Trim by time (via FFmpeg):

bash
# Keep from 1.0s to 3.5s
bash ~/.claude/skills/claude-gif/scripts/gif_convert.sh \
  --input INPUT.gif \
  --start 1.0 \
  --duration 2.5 \
  --output OUTPUT.gif

10. Merge / Concatenate

Append GIFs (play one after another):

bash
gifsicle INPUT1.gif INPUT2.gif -O3 -o MERGED.gif

Side-by-side (via FFmpeg):

bash
ffmpeg -n -i LEFT.gif -i RIGHT.gif -filter_complex \
  "[0:v][1:v] hstack=inputs=2,split [a][b]; \
   [a] palettegen [p]; \
   [b][p] paletteuse" \
  -loop 0 OUTPUT.gif

Chaining Edits

Multiple edits can be chained. Use intermediate temp files:

bash
# Trim, then speed up, then add text
gifsicle INPUT.gif '#10-#50' -O3 -o /tmp/claude-gif/step1.gif
gifsicle --delay 3 /tmp/claude-gif/step1.gif -O3 -o /tmp/claude-gif/step2.gif
# Then text overlay via FFmpeg on step2.gif
rm /tmp/claude-gif/step1.gif /tmp/claude-gif/step2.gif

Safety Rules

  1. Never overwrite input: Output MUST be a different path than input.
  2. Preflight first: Run preflight.sh before writing.
  3. Preserve original: Do not delete or modify the source GIF.
  4. Temp files: Use /tmp/claude-gif/ for intermediates, clean up after.

Error Handling

ErrorCauseFix
gifsicle: no frame #NFrame index out of rangeCheck frame count first with --info
Text not visibleFont color matches backgroundUse contrasting color with border
Quality degradedMultiple FFmpeg re-encodesMinimize re-encode passes, use gifsicle when possible
File size increasedRe-encoding overheadApply gifsicle -O3 after FFmpeg operations
Aspect ratio brokenUsed --resize not --resize-fitUse --resize-fit or --resize-width

Frequently asked questions

What does the Claude Gif Edit AI skill do?

Edit and modify existing GIFs. Speed change, reverse, ping-pong, crop, resize, text overlay, frame extraction, loop control, trim. Uses gifsicle for frame-level operations and FFmpeg for filters. Use when user says "edit gif", "gif speed", "reverse gif", "crop gif", "resize gif", "add text to gif", "gif text overlay", "extract frames", "loop gif", "ping pong gif", or "trim gif".

Why use Claude Gif Edit on TypingMind?

Because you install it once and use it with any model. Claude Gif Edit is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Claude Gif Edit in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/AgriciDaniel/claude-gif/tree/main/skills/claude-gif-edit. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Claude Gif Edit?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Claude Gif Edit?

As many as you like. As long as a model supports skills, you can use Claude Gif Edit with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Claude Gif Edit AI skill free?

Yes. It is published on GitHub by AgriciDaniel under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇