baoyu-compress-image

Compress images using sips, cwebp, ImageMagick, or Sharp with format and quality control.

27|9|Updated Jan 25, 2026
One-click install
npx skills add https://github.com/Leoyishou/personal-ai-company --skill baoyu-compress-image-leoyishou
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: baoyu-compress-image
Source: https://github.com/Leoyishou/personal-ai-company/tree/main/content-bu/.claude/skills/baoyu-compress-image
Command: npx skills add https://github.com/Leoyishou/personal-ai-company --skill baoyu-compress-image-leoyishou

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires sharp, and includes scripts (resource) components.

What problem does it solve?

Compresses images by selecting the best available tool to reduce file size, helping you optimize media for web use with minimal effort.

Core Features & Use Cases

  • Automatic tool selection among sips, cwebp, ImageMagick, and Sharp for best results
  • Flexible format output to WebP, PNG, or JPEG with per-file quality control
  • Batch processing with optional recursive directory traversal and per-file or summary reporting

Quick Start

Run the image compression script on your input file or directory to produce WebP or PNG outputs with configurable quality.

Frequently Asked Questions about baoyu-compress-image

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I batch compress images to WebP or PNG?

To batch compress images to WebP or PNG, run the script on an input directory with recursive traversal enabled. It automatically selects the best available local image tool and outputs compressed files while reporting per-file and batch results.

What is the best way to reduce image file size for web use?

Reducing image file size for web use is best achieved by smartly compressing images to WebP or PNG. The tool automatically selects the optimal local utility among Sharp, cwebp, sips, or ImageMagick to minimize file sizes with minimal effort.

Can I convert a folder of images to WebP with quality control?

Yes, you can convert a folder of images to WebP with quality control by running the script on the directory. It supports recursive directory traversal and allows flexible format output with configurable per-file quality settings.

Does Sharp work with PNG and WebP compression?

Sharp works with PNG and WebP compression as one of the local image tools automatically selected by the script. It is used alongside sips, cwebp, and ImageMagick to apply format conversion and quality control for reducing file sizes.

How do I preserve original images when compressing a batch?

You can preserve original images when compressing a batch by using the option to keep originals during processing. The script outputs compressed files separately and provides per-file and summary reporting without overwriting source files.

Why does image compression automatically select different tools?

Image compression automatically selects different tools to ensure the best results based on your local environment. It detects available utilities like sips, cwebp, ImageMagick, or Sharp to guarantee optimal format conversion and file size reduction.