baoyu-compress-image

Originally fromyelban/baoyu-skills.tw
Installation
Summary

Compresses images to WebP or PNG with automatic tool selection based on system availability.

  • Supports WebP (default), PNG, and JPEG output formats with configurable quality (0–100, default 80)
  • Automatically selects best available compression tool: sips, cwebp, ImageMagick, or Sharp
  • Processes single files or directories recursively with options to keep originals or replace in-place
  • Customizable via EXTEND.md configuration files at project, user home, or XDG config locations
SKILL.md

Image Compressor

Compresses images using best available tool (sips → cwebp → ImageMagick → Sharp).

Script Directory

Scripts in scripts/ subdirectory. {baseDir} = this SKILL.md's directory path. Resolve ${BUN_X} runtime: if bun installed → bun; if npx available → npx -y bun; else suggest installing bun. Replace {baseDir} and ${BUN_X} with actual values.

Script Purpose
scripts/main.ts Image compression CLI

Preferences (EXTEND.md)

Check EXTEND.md in priority order — the first one found wins:

Priority Path Scope
1 .baoyu-skills/baoyu-compress-image/EXTEND.md Project
Related skills

More from jimliu/baoyu-skills

Installs
18.3K
GitHub Stars
18.1K
First Seen
Jan 19, 2026