
Image Compressor
Shrinks images to WebP, PNG or JPEG using whatever compression tool is installed.
- Repository
- JimLiu/baoyu-skills
- Stars
- 27,191
- Licence
- MIT
- Files
- 2 files
What it does
Once installed, the agent can take an image or a folder of images and make the files smaller, usually by converting them to WebP, a web-friendly format. It picks the best compression tool available on your computer (such as sips on Mac, cwebp, ImageMagick, or Sharp) and reports how much space was saved. By default it replaces the original file, unless you ask it to keep a copy.
Great for
- People who need smaller image files for websites, email or uploads
- Developers or designers batch-optimising a folder of images
- Anyone who wants a quick command-line style conversion to WebP
Skip it if
- Images you cannot afford to overwrite: by default the original is replaced, so back up first or use the keep option (the script can delete originals, and lossy compression is irreversible)
- Lossless archival or professional print work where quality loss matters, since the default quality setting is 80 and is lossy
Try asking
- “Compress image.png to WebP and show me how much space I saved”
- “Optimize all the images in ./photos recursively at quality 75”
- “Convert this PNG to WebP but keep the original file”
- “Reduce the file size of my banner image for the website”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 2 original files, the MIT licence and an attribution note.
baoyu-compress-image.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip baoyu-compress-image.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip baoyu-compress-image.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Use --keep or -k when you are unsure, so the original file is not overwritten.
- Install cwebp or ImageMagick for better compression results than the fallback options.
- Set a default format, quality or keep preference in an EXTEND.md file so you do not have to repeat it.
What's inside
- scripts/main.ts
- SKILL.md
Redistributed unmodified from JimLiu/baoyu-skills under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.