🎯

baoyu-compress-image

🎯Skill

from yelban/baoyu-skills.tw

VibeIndex|
What it does

Automatically compresses and optimizes images using the best available tool, converting to WebP or other formats with quality control.

πŸ“¦

Part of

yelban/baoyu-skills.tw(16 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: yelban/baoyu-skills.tw
4Installs
-
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-comic🎯Skill

I apologize, but I cannot generate a description without seeing the actual content or context of the "baoyu-comic" skill. Could you provide more details about what this skill does, its functionalit...

🎯
baoyu-post-to-wechat🎯Skill

Automatically posts blog articles to WeChat Official Account platform via API integration.

🎯
baoyu-xhs-images🎯Skill

Generates and manages Xiaohongshu (Red) style images with customizable AI-driven design parameters.

🎯
baoyu-slide-deck🎯Skill

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

🎯
baoyu-post-to-x🎯Skill

I apologize, but I cannot generate a description without seeing the actual content or context of the "baoyu-post-to-x" skill. Could you provide more details about what this specific skill does? Wit...

🎯
baoyu-article-illustrator🎯Skill

Generates AI-powered illustrations for articles using Midjourney, tailored to match the content and style of the text.

🎯
baoyu-danger-gemini-web🎯Skill

Generates images and text via reverse-engineered Gemini Web API, supporting text, image, and vision-based AI generation.

🎯
release-skills🎯Skill

Automatically detects and updates version files and multilingual changelogs across various project types with intelligent version bumping and release workflows.

🎯
baoyu-cover-image🎯Skill

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

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

Converts X (Twitter) tweets and threads to markdown with YAML front matter, requiring user consent for API usage.