🎯

baoyu-compress-image

🎯Skill

from siatwangmin/coco-skills

VibeIndex|
What it does

Automatically compresses and optimizes images to WebP or other formats using the best available tool.

πŸ“¦

Part of

siatwangmin/coco-skills(11 items)

baoyu-compress-image

Installation

npxRun with npx
npx -y bun ${SKILL_DIR}/scripts/main.ts <input> [options]
npxRun with npx
npx -y bun ${SKILL_DIR}/scripts/main.ts image.png
npxRun with npx
npx -y bun ${SKILL_DIR}/scripts/main.ts image.png -f png --keep
npxRun with npx
npx -y bun ${SKILL_DIR}/scripts/main.ts ./images/ -r -q 75
npxRun with npx
npx -y bun ${SKILL_DIR}/scripts/main.ts image.png --json
πŸ“– Extracted from docs: siatwangmin/coco-skills
3Installs
-
AddedFeb 4, 2026

Skill Details

SKILL.md

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.

Overview

# Image Compressor

Compresses images using best available tool (sips β†’ cwebp β†’ ImageMagick β†’ Sharp).

Script Directory

Scripts in scripts/ subdirectory. Replace ${SKILL_DIR} with this SKILL.md's directory path.

| Script | Purpose |

|--------|---------|

| scripts/main.ts | Image compression CLI |

Preferences (EXTEND.md)

Use Bash to check EXTEND.md existence (priority order):

```bash

# Check project-level first

test -f .baoyu-skills/baoyu-compress-image/EXTEND.md && echo "project"

# Then user-level (cross-platform: $HOME works on macOS/Linux/WSL)

test -f "$HOME/.baoyu-skills/baoyu-compress-image/EXTEND.md" && echo "user"

```

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”

β”‚ Path β”‚ Location β”‚

β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€

β”‚ .baoyu-skills/baoyu-compress-image/EXTEND.md β”‚ Project directory β”‚

β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€

β”‚ $HOME/.baoyu-skills/baoyu-compress-image/EXTEND.md β”‚ User home β”‚

β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”

β”‚ Result β”‚ Action β”‚

β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€

β”‚ Found β”‚ Read, parse, apply settings β”‚

β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€

β”‚ Not found β”‚ Use defaults β”‚

β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

EXTEND.md Supports: Default format | Default quality | Keep original preference

Usage

```bash

npx -y bun ${SKILL_DIR}/scripts/main.ts [options]

```

Options

| Option | Short | Description | Default |

|--------|-------|-------------|---------|

| | | 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 |

Examples

```bash

# Single file β†’ WebP (replaces original)

npx -y bun ${SKILL_DIR}/scripts/main.ts image.png

# Keep PNG format

npx -y bun ${SKILL_DIR}/scripts/main.ts image.png -f png --keep

# Directory recursive

npx -y bun ${SKILL_DIR}/scripts/main.ts ./images/ -r -q 75

# JSON output

npx -y bun ${SKILL_DIR}/scripts/main.ts image.png --json

```

Output:

```

image.png β†’ image.webp (245KB β†’ 89KB, 64% reduction)

```

Extension Support

Custom configurations via EXTEND.md. See Preferences section for paths and supported options.

More from this repository10

🎯
baoyu-image-gen🎯Skill

Generates AI images using OpenAI and Google APIs with flexible text-to-image generation options.

🎯
baoyu-xhs-images🎯Skill

Skill

🎯
baoyu-infographic🎯Skill

Generates professional infographics by analyzing content and creating publication-ready visuals with 20 layout types and 17 visual styles.

🎯
release-skills🎯Skill

Automatically detects and updates version files, changelogs, and git tags across multiple project types with multi-language support and intelligent version bumping.

🎯
baoyu-danger-x-to-markdown🎯Skill

Skill

🎯
baoyu-cover-image🎯Skill

Generates customizable article cover images with 5-dimensional design options, supporting multiple styles, palettes, and aspect ratios.

🎯
baoyu-slide-deck🎯Skill

Generates professional slide deck images from content, creating stylized presentations with customizable options for audience, style, and language.

🎯
baoyu-danger-gemini-web🎯Skill

Generates images and text via reverse-engineered Gemini Web API, supporting multi-turn conversations and vision-capable AI generation.

🎯
baoyu-post-to-wechat🎯Skill

Automates posting markdown articles and image-text content to WeChat Official Account using Chrome browser automation.

🎯
baoyu-article-illustrator🎯Skill

Generates contextually-appropriate illustrations for articles by analyzing content structure and automatically selecting optimal image types and visual styles.