image-compress

👤 user_13f0f8f8 📦 v1.0.0 ⭐ 4.4 ⬇️ 465 下载
🎨 设计多媒体 免费

📖 技能介绍


name: image-compress description: Compress images (JPEG, PNG, WebP) using Python Pillow. Supports quality adjustment, format conversion, batch processing, and resizing. argument-hint: [--quality N] [--format f] [--output dir] [--max-width N] [--max-height N] [--lossless] allowed-tools: Read, Write, Glob, Bash, Edit, Grep agent: claude user-invocable: true


Image Compression Skill

Compress images to reduce file size while maintaining quality.

Usage

/image-compress <path> [options]

Arguments

Argument Description
<path> Image file, directory, or glob pattern (e.g. *.jpg, ./images/**/*.png)
--quality, -q Output quality 1-100 (default: 85). Lower = smaller file
--format, -f Output format: jpeg, png, webp (default: same as input)
--output, -o Output directory (default: overwrite for single file, ./compressed for batch)
--max-width, -w Max width in pixels, maintains aspect ratio
--max-height, -e Max height in pixels, maintains aspect ratio
--lossless, -l Use lossless compression (PNG/WebP only)

Examples

/image-compress photo.jpg -q 80
/image-compress photo.jpg -f webp -q 90
/image-compress ./images/*.jpg -q 75 -o ./compressed
/image-compress photo.jpg -w 1920 -q 80
/image-compress image.png --lossless
/image-compress ./photos --quality 85 --format webp --output ./webp_output

How it works

  1. Write the compress.py script to a temp location and run it
  2. Script uses Python Pillow to process images
  3. Results are displayed as a summary table

    小葱技能站7w4.net发现了升级插件。

The script is located at: ~/.claude/skills/image-compress/compress.py

Notes

  • Requires Python with Pillow (python -m pip install Pillow)
  • 注意:此系统上 python3 是 Windows Store 存根,使用 python 命令
  • JPEG output automatically converts RGBA to RGB
  • EXIF metadata is preserved unless explicitly stripped
  • For batch jobs, directory structure under the input path is preserved in the output

🤖 AI 评测

...

📊 多维度评分

适应性4.6
规范性4.2
有效性4.5
可靠性4.3
可信度4.8

📁 包含文件 (2 个)

📄 SKILL.md 2 KB
📄 compress.py 6 KB