Awesome-omni-skill qasai
Image compression CLI with lossless/lossy options, multiple engines, batch processing, and format conversion. Use when compressing, optimizing, or converting images.
install
source · Clone the upstream repo
git clone https://github.com/diegosouzapw/awesome-omni-skill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/cli-automation/qasai" ~/.claude/skills/diegosouzapw-awesome-omni-skill-qasai && rm -rf "$T"
manifest:
skills/cli-automation/qasai/SKILL.mdsafety · automated scan (low risk)
This is a pattern-based risk scan, not a security review. Our crawler flagged:
- global npm install
Always read a skill's source content before installing. Patterns alone don't mean the skill is malicious — but they warrant attention.
source content
QASAI - Image Compression CLI
Installation
npx qasai # or install globally npm install -g qasai
When to Use
- Compressing images for web optimization
- Batch processing image directories
- Converting between image formats (JPG, PNG, WebP, AVIF)
- Resizing images while maintaining aspect ratio
- Lossless optimization without quality loss
Supported Formats
JPEG, PNG, WebP, AVIF, GIF, TIFF, SVG
Usage
Interactive Mode
npx qasai
Launches guided prompts for compression options.
Direct Compression
npx qasai [input] [options]
If you pass an input path or any options, it runs compression directly.
Common Workflows
1. Basic Compression (Web Optimized)
npx qasai ./images -q 80 -w 1920 -r
2. Maximum Compression
npx qasai ./images -q 60 -j mozjpeg -p pngquant
3. Lossless Optimization
npx qasai ./images -j jpegtran -p optipng -l
4. Convert to Modern Formats
# WebP (good browser support) npx qasai ./images -f webp -q 80 # AVIF (best compression) npx qasai ./images -f avif -q 70
5. Resize Images
# Max width 1920px (maintains aspect ratio) npx qasai ./images -w 1920 # Specific dimensions npx qasai ./images -s 800x600 # Scale to 50% npx qasai ./images -s 50%
6. In-Place Compression (Overwrite Originals)
# With backup npx qasai ./images -i -B -q 80 # Without backup (destructive) npx qasai ./images -i -q 80
7. Custom Output Directory
npx qasai ./images -o ./compressed
8. Scripting & Automation
# Quiet mode (only errors) npx qasai ./images -Q -q 80 # JSON output for parsing npx qasai ./images --json # Skip existing files npx qasai ./images -S # Dry run (preview) npx qasai ./images -D
9. Performance
# Parallel processing (8 workers) npx qasai ./images -P 8 -r
CLI Options Reference
| Short | Long | Description | Default |
|---|---|---|---|
| | Output directory | folder |
| | Overwrite original files | |
| | Quality 1-100 | |
| | Lossless compression | |
| | Resize (e.g., , ) | - |
| | Max width (keeps aspect ratio) | - |
| | Max height (keeps aspect ratio) | - |
| | Convert to format (jpg, png, webp, avif) | - |
| | Process subdirectories | |
| | Preserve EXIF data | |
| | Compression effort 1-10 | |
| | mozjpeg, jpegtran, sharp | |
| | pngquant, optipng, sharp | |
| | gifsicle, sharp | |
| | Max colors for PNG/GIF | |
| | Preview without compressing | |
| | Silent mode (only errors) | |
| Output results as JSON | | |
| | Skip existing output files | |
| | Parallel processing workers | |
| | Backup before in-place compression | |
Compression Engines
JPEG Engines
- mozjpeg (default): Best compression, 5-10% smaller than libjpeg
- jpegtran: Pure lossless, only reorganizes data
- sharp: Fastest option
PNG Engines
- pngquant (default): 60-80% size reduction, reduces to 256 colors
- optipng: Pixel-perfect lossless
- sharp: Fast with good compression
GIF Engine
- gifsicle (default): Best for animated GIFs, preserves animation
Output
Results show per-file:
- Original size
- Compressed size
- Bytes saved
- Percentage saved
- Time elapsed
Examples for Agents
When user asks to optimize images:
# Default web optimization npx qasai ./path/to/images -r -q 80 # For production deployment npx qasai ./public/images -r -w 1920 -f webp -o ./public/optimized
When user wants lossless:
npx qasai ./images -j jpegtran -p optipng
When user wants smallest file size:
npx qasai ./images -q 60 -f avif
When scripting/automation:
# JSON output for parsing npx qasai ./images --json -Q # Skip already processed npx qasai ./images -S -o ./out
References
- Full Specification - Detailed CLI specification and all options