Install Baoyu Compress Image
Pick your agent. Every command is ready to paste.
npx skills add JimLiu/baoyu-skills --skill baoyu-compress-imageThe open skills CLI detects your agents (Claude Code, Cursor, Codex and 70+ more) and installs to the right folder. Add -g to install globally.
01
Install it
Run the command above, or upload the folder in Claude.
02
Ask naturally
Describe the task. Your agent loads baoyu-compress-image when the request matches its description.
03
Name it if needed
If it does not trigger, say “use the baoyu-compress-image skill”. In Codex, type $baoyu-compress-image.
The skill itself
SKILL.md
Image Compressor
Tool auto-selection order: sips → cwebp → ImageMagick → Sharp.
Script Directory
{baseDir} = this SKILL.md's directory. Resolve ${BUN_X}: bun if installed; else 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)
First found wins:
| Priority | Path | Scope |
|---|---|---|
| 1 | .baoyu-skills/baoyu-compress-image/EXTEND.md |
Project |
| 2 | ${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-compress-image/EXTEND.md |
XDG |
| 3 | $HOME/.baoyu-skills/baoyu-compress-image/EXTEND.md |
User home |
If none found, use defaults. EXTEND.md supports: default format, default quality, keep-original preference.
Usage
${BUN_X} {baseDir}/scripts/main.ts <input> [options]
${BUN_X} {baseDir}/scripts/main.ts image.png # → WebP, replaces original
${BUN_X} {baseDir}/scripts/main.ts image.png -f png --keep # keep PNG format and original
${BUN_X} {baseDir}/scripts/main.ts ./images/ -r -q 75 # directory, recursive
Output: image.png → image.webp (245KB → 89KB, 64% reduction)
Options
| Option | Short | Description | Default |
|---|---|---|---|
<input> |
File or directory | Required | |
--output |
-o |
Output path | Same path, new ext |
--format |
-f |
webp, png, jpeg | webp |
--quality |
-q |
Quality 0-100 | 80 |
--keep |
-k |
Keep original | false |
--recursive |
-r |
Process subdirs | false |
--json |
JSON output | false |
Extension Support
Custom configurations via EXTEND.md. See Preferences section for paths and supported options.
Tips for Baoyu Compress Image
- • Start a fresh session after installing so your agent picks up the new skill.
- • This skill ships scripts. Read them before the first run, and run it in a project without secrets first.
- • It is part of a pack with 22 skills. Install only the ones you need with --skill to keep triggers precise.
- • If two skills overlap, mention the one you want by name.
Questions about Baoyu Compress Image
What does the Baoyu Compress Image skill do?
Compresses images to WebP (default) or PNG with automatic tool selection. Use when user asks to "compress image", "optimize image", "convert to webp", or reduce image file size.
How do I install Baoyu Compress Image?
Run "npx skills add JimLiu/baoyu-skills --skill baoyu-compress-image" in your project. The skills CLI installs it for Claude Code, Cursor, Codex and 70+ other agents. In Claude on the web, upload the skill folder as a ZIP under Customize > Skills.
Does Baoyu Compress Image work in Cursor and Codex?
Yes. Baoyu Compress Image uses the open SKILL.md format, so it works in Claude Code, Claude, Cursor, OpenAI Codex, Gemini CLI, GitHub Copilot and other agents that support agent skills.
Is Baoyu Compress Image free?
Baoyu Compress Image is open source on GitHub under the MIT license. It is free to install; check the license before commercial use.
Who made Baoyu Compress Image?
Baoyu Compress Image is published by JimLiu in the JimLiu/baoyu-skills repository, together with 21 other skills.



