baoyu-compress-image

Compress WebP, PNG, and JPEG images using available tools.

947|163|Updated Jan 13, 2026
One-click install
npx skills add https://github.com/guanyang/open-agent-hub --skill baoyu-compress-image-guanyang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: baoyu-compress-image
Source: https://github.com/guanyang/open-agent-hub/tree/main/skills/baoyu-compress-image
Command: npx skills add https://github.com/guanyang/open-agent-hub --skill baoyu-compress-image-guanyang

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Compresses images efficiently by selecting the best available tool to minimize file size while preserving quality.

Core Features & Use Cases

  • Automatic tool selection for image compression; supports WebP/PNG/JPEG; batch processing; and quality control.
  • Recursive directory processing and reporting options (JSON or human-readable summaries).
  • Use Case: You have a folder of product photos; run the tool to reduce sizes while maintaining visual fidelity.

Quick Start

Run the CLI script to compress an image or a folder of images.

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 from the command line?

You can batch compress images by running the CLI script on a folder. It processes directories recursively, automatically selecting the best available tool to minimize file size while preserving visual quality.

What is the best way to automate image compression for a folder of product photos?

Automating image compression for product photos is handled by running the CLI tool on the folder. It applies per-file compression with configurable format and quality settings, outputting size reduction ratios for each image.

Do I need sharp installed to compress images, or does it detect other tools?

You do not strictly need sharp as the tool automatically detects other available utilities like sips, cwebp, and ImageMagick. It dynamically selects the best installed option to perform the compression.

Can I control the output quality and format when compressing JPEG and PNG files?

You can control output quality and format when compressing JPEG and PNG files. The tool allows configurable format selection, including WebP and PNG, alongside adjustable quality settings to balance file size and fidelity.

How does recursive directory processing work for batch image compression?

Recursive directory processing works by traversing folders and applying per-file compression to all supported images inside. It outputs a detailed report of input and output sizes as well as compression ratios.

Why use sharp for image compression instead of other available CLI tools?

Using sharp for image compression provides an automated fallback when other tools are absent. The script intelligently evaluates your environment and selects the optimal available utility, including ImageMagick or cwebp, to minimize file size.