From compress-gif
Compress an animated GIF to under 200 KB (or a custom target) using BOTH gifsicle and gifski in parallel and present both outputs for comparison. Preserves FPS, dimensions, frame count, and color fidelity. Use when the user asks to "compress this GIF", "shrink this gif", "reduce gif file size", "gif too big", "optimize a .gif", or mentions a specific size target like "under 200 KB" for a GIF.
How this skill is triggered — by the user, by Claude, or both
Slash command
/compress-gif:compress <path-to-input.gif> [target-kb]<path-to-input.gif> [target-kb]This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Compress the GIF at the path in `$ARGUMENTS` to under a target size
Compress the GIF at the path in $ARGUMENTS to under a target size
(default 200 KB) using two independent encoders in parallel so the user
can pick the better-looking result:
Both encoders are bound by the same hard constraints: no resizing, no FPS
change, no frame dropping, no format conversion. Always use the bundled
script — do not call gifsicle, gifski, or ffmpeg directly.
The script at
${CLAUDE_PLUGIN_ROOT}/skills/compress/scripts/compress_gif.py ships with
a built-in preflight (--check) that detects both missing and
broken tools (e.g. dyld load failures from ABI mismatches). It tells
the user exactly what to install and exits before doing any work, so the
user never sees a raw codec error.
Run the script's self-check first:
python3 "${CLAUDE_PLUGIN_ROOT}/skills/compress/scripts/compress_gif.py" --check
Read the output. It lists every tool as one of:
✓ tool [required|optional] — fine, nothing to do✗ tool [required|optional] — not installed! tool [required|optional] — installed but broken (probe failed)The script prints the exact brew install … or apt-get install …
command for each issue under the To fix: section.
If preflight reports anything other than all ✓:
gifsicle is the problem, neither backend
can run. If gifski or ffmpeg is the problem, only the second
backend is unavailable — gifsicle will still produce one output.brew install gifski ffmpeg? (y/n)" is ideal.--check
afterward to confirm green.$ARGUMENTS is the input path.$ARGUMENTS is empty, ask the user which GIF to compress.~ and resolve relative paths against the user's CWD.python3 "${CLAUDE_PLUGIN_ROOT}/skills/compress/scripts/compress_gif.py" \
"<input-path>" --target-kb <target>
Pass --output-dir <dir> if the user asked for a specific location. Pass
--only gifsicle or --only gifski only if the user explicitly asks for
one backend — otherwise always run both.
The script prints a side-by-side table ending with a recommendation:
line. Relay to the user:
Add: "open both and pick whichever looks better — the encoders trade off differently on different content." The recommendation line is just "smallest that hit target," not a quality judgment.
If neither backend hit the target, the script exits 1 and still writes its smallest safe variants. Surface the gap and explain that hitting the target would require resizing or dropping frames, which the constraints forbid.
| User says | You run |
|---|---|
/compress-gif:compress ~/demos/walkthrough.gif | --check, install if needed, then default 200 KB target |
/compress-gif:compress ./big.gif 150 | --check, install if needed, then --target-kb 150 |
compress demo.gif under 100kb with gifski only | --check, ensure gifski + ffmpeg present, then --target-kb 100 --only gifski |
ffmpeg, gifski, ImageMagick, or any other encoder
directly. The script orchestrates them safely.brew install … silently. Always tell the user what
you're installing and why, then ask.Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub ankshvayt/compress-gif --plugin compress-gif