crush/skills/image-convert/SKILL.md
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.
npx skillsauth add meowgorithm/dotfiles image-convertInstall 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 images between formats with quality control, resizing, and batch processing support.
| Format | Extension | Notes | | ------ | ------------ | ------------------------------------ | | PNG | .png | Lossless, supports transparency | | JPEG | .jpg, .jpeg | Lossy compression, no transparency | | WebP | .webp | Modern format, good compression | | GIF | .gif | Animation support (first frame only) | | BMP | .bmp | Uncompressed, large files | | TIFF | .tiff, .tif | High quality, large files | | AVIF | .avif | Next-gen format, best compression | | HEIC | .heic, .heif | Apple format |
Convert by specifying output extension:
scripts/convert.sh input.png output.jpg
Or specify format explicitly:
scripts/convert.sh -f webp input.png output.webp
# Convert to JPEG with 90% quality and resize to 1920px width
scripts/convert.sh -f jpg -q 90 -r 1920x input.png output.jpg
# Convert to WebP at 50% of original size
scripts/convert.sh -f webp -q 85 -r 50% input.png output.webp
Convert all PNG files to WebP:
scripts/convert.sh -f webp *.png
Output files will have the same basename with the new extension.
| Option | Description | Example |
| --------------- | --------------------------- | ---------------------- |
| -f, --format | Output format | -f webp |
| -q, --quality | Quality 1-100 (default: 85) | -q 90 |
| -r, --resize | Resize geometry | -r 800x600, -r 50% |
| -v, --verbose | Show conversion commands | -v |
| -h, --help | Show help | -h |
| Syntax | Description | Example |
| ------ | ------------------------------- | --------- |
| WxH | Exact dimensions (may crop) | 800x600 |
| Wx | Width only, height proportional | 1920x |
| xH | Height only, width proportional | x1080 |
| W% | Percentage of original | 50% |
The script uses available tools in this priority:
magick or convert): Primary tool for all formats
magick (ImageMagick 7+)convert (legacy ImageMagick 6) if neededInstall ImageMagick for full functionality:
# macOS
brew install imagemagick webp
# Ubuntu/Debian
sudo apt-get install imagemagick webp
# Arch
sudo pacman -S imagemagick libwebp
Convert to WebP with good quality and reasonable size:
scripts/convert.sh -f webp -q 80 -r 1200x *.png
Generate 300px wide thumbnails:
for img in *.jpg; do
scripts/convert.sh -f jpg -q 75 -r 300x "$img" "thumbs/$img"
done
scripts/convert.sh -f jpg -q 95 IMG_1234.HEIC output.jpg
scripts/convert.sh -f webp -q 85 large.png small.webp
video-to-webp skill. It handles
fps, trimming, looping, and scaling with ffmpeg + img2webp.tools
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.
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.