Skip to main content

webp-skill

Compresses PNG images to WebP format using ffmpeg. Use when user asks to "convert png to webp", "compress to webp", "png转webp", "压缩成webp", or reduce PNG file size.

Jump to install

Source facts

Repository
yang0/webp-skill
Last source activity
July 5, 2026 at 23:35
Detected SKILL.md language
English
Stars
0
Forks
0

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.

Showing SKILL.md

SKILL.md
Source instructions · Read-only preview
name
webp-skill
description
Compresses PNG images to WebP format using ffmpeg. Use when user asks to "convert png to webp", "compress to webp", "png转webp", "压缩成webp", or reduce PNG file size.
version
1.0.0
metadata
{"requires":{"anyBins":["ffmpeg","bun"]}}
# PNG → WebP Compressor Converts PNG images to WebP format via ffmpeg. Simple, lossy/lossless WebP encoding with configurable quality. ## Script Directory Scripts in `scripts/` subdirectory. `{baseDir}` = this SKILL.md's directory path. Replace `{baseDir}` with actual value. | Script | Purpose | |--------|---------| | `scripts/compress.ts` | PNG → WebP conversion CLI | ## Usage ```bash bun {baseDir}/scripts/compress.ts <input> [options] ``` ## Options | Option | Short | Description | Default | |--------|-------|-------------|---------| | `<input>` | | PNG file path(s) — supports glob patterns | Required | | `--output` | `-o` | Output file or directory | Same path, .webp ext | | `--quality` | `-q` | Quality 0–100 | 80 | | `--lossless` | `-l` | Lossless WebP encoding (ignores quality) | false | | `--keep` | `-k` | Keep original PNG | false | ## Examples ```bash # Basic conversion (quality 80) bun {baseDir}/scripts/compress.ts image.png # High quality bun {baseDir}/scripts/compress.ts image.png -q 90 # Lossless bun {baseDir}/scripts/compress.ts image.png --lossless # Keep original bun {baseDir}/scripts/compress.ts image.png -k # Convert all PNGs in a directory bun {baseDir}/scripts/compress.ts "images/*.png" # Custom output path bun {baseDir}/scripts/compress.ts image.png -o output.webp ``` **Output**: ``` image.png → image.webp (1024KB → 89KB, 91% reduction) ```
View on GitHub