How this skill is triggered — by the user, by Claude, or both
Slash command
/tools:media-optimizerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Optimize and convert images and videos using [Optimo](https://optimo.microlink.io/) — format-specific compression pipelines on top of ImageMagick and FFmpeg.
Optimize and convert images and videos using Optimo — format-specific compression pipelines on top of ImageMagick and FFmpeg.
npx [email protected] <file-or-directory>
Check for newer versions: npm view optimo version
Node.js requirement: Optimo requires Node >= 24. Verify with
node --version. If on an older version, upgrade Node first or usenvm install 24 && nvm use 24.Security: Pin to an exact version in production. Avoid running on untrusted files — ImageMagick and FFmpeg have active CVEs.
| Format | Required binary |
|---|---|
| PNG, JPEG, WebP, AVIF, HEIC, JXL, GIF | magick (ImageMagick) |
| SVG | svgo |
| JPEG second pass | mozjpegtran or jpegtran (optional) |
| GIF second pass | gifsicle (optional) |
| MP4, WebM, MOV, MKV, AVI, OGV | ffmpeg |
Partial install behavior: SVG works with only svgo installed. Video fails gracefully if ffmpeg is absent. JPEG second-pass is skipped if neither mozjpegtran nor jpegtran is found.
svgoanddebugare peer deps not bundled by optimo — install withnpm install -g svgo debug.
--format only when format conversion is the goal--resize only when dimension/size control is required--verbose when diagnosing unsupported files or binary errors# Dry run — preview what would change
npx [email protected] public/ --dry-run
# Optimize a single file
npx [email protected] image.png
# Optimize entire directory
npx [email protected] public/media
# Convert format
npx [email protected] image.png --format webp
npx [email protected] image.heic --format jpeg
# Lossy mode for maximum compression
npx [email protected] image.jpg --losy
# Resize options
npx [email protected] image.png --resize 50% # by percentage
npx [email protected] image.png --resize 100kB # to target file size (images only)
npx [email protected] image.png --resize w960 # by width
npx [email protected] image.png --resize h480 # by height
# Video
npx [email protected] clip.mp4
npx [email protected] clip.mov --format webm
npx [email protected] clip.mp4 --mute false # keep audio (muted by default)
# Debug
npx [email protected] image.heic --dry-run --verbose
Full flag reference, pipelines, JS API, and git pre-commit hook:
references/optimo.md
npx claudepluginhub nawwwal/dex --plugin toolsOptimizes web images using WebP/AVIF formats, responsive srcset/picture elements, lazy loading, and Sharp for Node.js. Improves page loads, responsive images, production assets.
Convert and manipulate images using ImageMagick: format conversion, resizing, batch processing, thumbnails, quality adjustment, rotate, flip, crop.
Compresses images to WebP (default) or PNG using automatic tool selection (sips, cwebp, ImageMagick, Sharp). Supports batch, recursive, quality, and keep-original options.