baoyu-compress-image

Compress images to WebP or PNG with configurable quality.

Updated Jul 5, 2026
One-click install
npx skills add https://github.com/archerli/skill-set --skill baoyu-compress-image-archerli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: baoyu-compress-image
Source: https://github.com/archerli/skill-set/tree/main/baoyu-skills/baoyu-compress-image
Command: npx skills add https://github.com/archerli/skill-set --skill baoyu-compress-image-archerli

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill streamlines the process of compressing images to reduce file size without losing quality, suitable for optimizing image storage and transfer.

Core Features & Use Cases

  • Image Compression: Compress images to WebP or PNG format.
  • Format Selection: Allows users to specify the output format.
  • Quality Control: Users can adjust the quality of the output images.
  • Use Case: If you need to reduce the file size of a series of images for web use, this Skill can be used to compress them efficiently while maintaining good visual quality.

Quick Start

Run the baoyu-compress-image skill on your images directory with the command: bun main.ts ./images -f webp -q 80

Frequently Asked Questions about baoyu-compress-image

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

FAQPage Schema
How do I compress images to WebP format while controlling the output quality?

Image compression to WebP is automated by specifying the target format and quality level. You can compress images by running a command that sets the output format to WebP and adjusts the quality parameter to balance file size and visual fidelity.

What is the best way to reduce image file size for web optimization without losing visual quality?

Reducing image file size for web optimization is achieved through automated compression with quality control. This process utilizes tools like cwebp, ImageMagick, or Sharp to decrease storage size while maintaining good visual quality for web use.

Do I need bun installed to run image compression scripts, or can I use npx?

Bun is a primary runtime for executing the image compression scripts, but npx is also supported as an alternative. The Skill operates using these dependencies to run the automation process for reducing image file sizes.

Can I batch compress a directory of images to PNG format?

Batch compressing a directory of images to PNG format is supported by specifying the directory path and output format. The Skill operates on image files within the directory to reduce file size for archiving or web use.

Does image compression work with ImageMagick and Sharp, or is cwebp required?

Image compression works by utilizing available tools like cwebp, ImageMagick, or Sharp based on system availability. It is not strictly limited to cwebp and automatically selects an appropriate tool to process the images.

When should I not use WebP format for image file size reduction?

WebP format is suitable for web optimization, but you can choose PNG as an alternative output format. If your target platform lacks WebP support, selecting PNG during the image compression process ensures broader compatibility while still reducing file size.