crush/skills/video-to-webp/SKILL.md
Convert video files (MP4, MOV, WebM, GIF, MKV, AVI, etc.) into animated WebP images with control over fps, size, quality, loop count, and trimming. Use when the user wants to turn a video or screen recording into an animated WebP, create a lightweight demo loop, replace an animated GIF with a smaller WebP, or produce a short clip as a .webp.
npx skillsauth add meowgorithm/dotfiles video-to-webpInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Convert videos into animated WebP. Under the hood the script uses
ffmpeg to decode and resample frames, then img2webp (from libwebp)
to assemble the animation. This works even when Homebrew's ffmpeg is
built without the libwebp encoder. If img2webp is missing, the
script falls back to ffmpeg's libwebp encoder when available.
Animated WebP is typically 30-80% smaller than an equivalent GIF and supports full 24-bit color and alpha.
Anything ffmpeg can decode: MP4, MOV, WebM, MKV, AVI, GIF, FLV, WMV, MPEG, M4V, etc.
Auto-named output (input.mp4 -> input.webp):
scripts/to-webp.sh input.mp4
Explicit output file:
scripts/to-webp.sh input.mp4 output.webp
Higher fps and constrained width:
scripts/to-webp.sh -f 24 -w 800 demo.mov demo.webp
Trim to a 5-second clip starting at 00:00:03:
scripts/to-webp.sh -s 00:00:03 -d 5 movie.mp4 clip.webp
Batch convert everything in a directory:
scripts/to-webp.sh -y *.mp4
| Option | Description | Default |
| -------------------- | -------------------------------------------- | ------- |
| -f, --fps N | Frames per second | 15 |
| -w, --width N | Output width in px (height scales, auto even)| source |
| -q, --quality N | Quality 0-100 (ignored with --lossless) | 75 |
| -l, --loop N | Loop count, 0 = infinite | 0 |
| -c, --compression N| Compression effort 0-6 (higher = smaller) | 6 |
| -s, --start TIME | Start offset (seconds or HH:MM:SS) | — |
| -d, --duration T | Max duration (seconds or HH:MM:SS) | — |
| --lossless | Use lossless encoding (much larger) | off |
| -y, --yes | Overwrite output without prompting | off |
| -h, --help | Show help | |
Pick fps and width based on intent:
| Use case | fps | width | quality | Notes |
| ---------------------- | ----- | ------ | ------- | ---------------------------- |
| README demo / TTY cast | 10-15 | 800 | 70-80 | Smooth enough, small file |
| UI interaction clip | 24-30 | 960 | 75-85 | Keeps motion fluid |
| Social / thumbnail | 15-20 | 480 | 70 | Autoplays quickly |
| GIF replacement | match | match | 75 | Smaller than source GIF |
| Archival / no loss | 24+ | source | — | Use --lossless |
General rules:
-compression_level 6 is slow to encode but produces the smallest
file; lower it only if encoding speed matters.Requires ffmpeg (any recent build) and libwebp tools
(img2webp, webpmux).
# macOS
brew install ffmpeg webp
# Ubuntu/Debian
sudo apt-get install ffmpeg webp
# Fedora
sudo dnf install ffmpeg libwebp-tools
# Arch
sudo pacman -S ffmpeg libwebp
Verify:
command -v ffmpeg img2webp webpmux
scripts/to-webp.sh -f 15 -w 800 -q 75 recording.mov demo.webp
scripts/to-webp.sh big.gif big.webp
scripts/to-webp.sh -s 00:01:10 -d 4 -f 20 -w 640 talk.mp4 loop.webp
scripts/to-webp.sh --lossless -f 30 -w 1280 capture.mp4 capture.webp
for v in ~/Videos/clips/*.mp4; do
scripts/to-webp.sh -y -f 15 -w 720 "$v"
done
Install the libwebp tools (brew install webp, apt-get install webp, dnf install libwebp-tools, or pacman -S libwebp). This is
the preferred path because recent Homebrew ffmpeg builds no longer
ship the libwebp encoder.
--fps (e.g. 10-15).--width (e.g. 640 or 480).--quality (e.g. 60).--lossless is not set.--start / --duration — animated WebP scales linearly
with frame count.Raise --fps (24-30) or avoid downscaling too aggressively. Some
viewers also render animated WebP poorly; test in a browser.
Lossy WebP uses YUV420 by default. Use --lossless if exact colors
matter (e.g. UI screenshots with fine gradients).
ffmpeg -i input.webp output.mp4
development
Convert images between formats (PNG, JPEG, WebP, GIF, BMP, TIFF, AVIF, HEIC) with quality control and resizing. Use when the user needs to convert images, batch process multiple files, optimize image sizes, or convert to modern formats like WebP or AVIF.
tools
Use charmtone colors via the `charmtone` CLI or Go API (`github.com/charmbracelet/x/exp/charmtone`). Triggers when the user asks to use charmtone colors, generate color palettes, get hex values, create CSS/SCSS/Vim color variables, or work with the CharmTone palette in Go code. Also triggers on mentions of specific charmtone color names (Cherry, Charple, Julep, Hazy, etc.) or requests to pick/choose/apply charmtone colors.
testing
Stage and commit changes with a Conventional Commits message. Invoke with /commit "optional scope hint". Inspects the diff, picks an appropriate type and scope, writes a concise message, and commits. Does not push.
tools
Manage Nix profiles using the modern `nix profile` command (experimental, replaces `nix-env`). Use when installing, removing, upgrading, or managing packages with Nix flakes.