Automated summary
A command-line tool for compressing images with lossless/lossy options, multiple engines, batch processing, and format conversion.
Strengths
- Supports many formats (JPEG, PNG, WebP, AVIF, etc.)
- Multiple compression engines (mozjpeg, pngquant, optipng, etc.)
- Batch and recursive processing
- Resizing and format conversion capabilities
Limitations
- Lossless compression may be slower
- Requires Node.js and npm installation
- Default output folder might confuse new users
Best for optimizing images for web, reducing file sizes before deployment, or batch-converting images to modern formats.
Avoid if you need a GUI or are processing very large images with custom per-file settings.
Security analysis
SafeThe skill simply documents usage of a public npm CLI tool for image compression. There are no instructions for destructive actions, exfiltration, obfuscated payloads, or disabling safety measures. Running npx is standard and the commands are all legitimate.
No concerns found
How this analysis is madeExamples
Compress all images in the ./images folder to 80% quality, resize to max width 1920px, and process recursively.Convert all images in ./images to WebP format with 80% quality.Perform lossless compression on all images in ./images using jpegtran and optipng engines.name: qasai description: Image compression CLI with lossless/lossy options, multiple engines, batch processing, and format conversion. Use when compressing, optimizing, or converting images. license: Apache-2.0 metadata: author: ahmadawais version: "0.1.0" repository: https://github.com/ahmadawais/qasai allowed-tools:
- shell
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 |
|-------|------|-------------|---------|
| -o | --output <dir> | Output directory | qasai/ folder |
| -i | --in-place | Overwrite original files | false |
| -q | --quality <n> | Quality 1-100 | 80 |
| -l | --lossless | Lossless compression | false |
| -s | --resize <dim> | Resize (e.g., 800x600, 50%) | - |
| -w | --max-width <px> | Max width (keeps aspect ratio) | - |
| -H | --max-height <px> | Max height (keeps aspect ratio) | - |
| -f | --format <fmt> | Convert to format (jpg, png, webp, avif) | - |
| -r | --recursive | Process subdirectories | false |
| -m | --keep-metadata | Preserve EXIF data | false |
| -e | --effort <n> | Compression effort 1-10 | 6 |
| -j | --jpeg-engine <e> | mozjpeg, jpegtran, sharp | mozjpeg |
| -p | --png-engine <e> | pngquant, optipng, sharp | pngquant |
| -g | --gif-engine <e> | gifsicle, sharp | gifsicle |
| -c | --colors <n> | Max colors for PNG/GIF | 256 |
| -D | --dry-run | Preview without compressing | false |
| -Q | --quiet | Silent mode (only errors) | false |
| | --json | Output results as JSON | false |
| -S | --skip-existing | Skip existing output files | false |
| -P | --parallel <n> | Parallel processing workers | 4 |
| -B | --backup | Backup before in-place compression | false |
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
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/qasai-image-compression-cli-mm5t8al4/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/qasai-image-compression-cli-mm5t8al4' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/qasai-image-compression-cli-mm5t8al4/download' --output '.skill-downloads/qasai-image-compression-cli-mm5t8al4/SKILL.md.part' && mv '.skill-downloads/qasai-image-compression-cli-mm5t8al4/SKILL.md.part' '.skill-downloads/qasai-image-compression-cli-mm5t8al4/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
Original excerpt: Installation
npx qasai
# or install globally
npm install -g qasai
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/qasai-image-compression-cli-mm5t8al4/SKILL.md' && test -s '.skill-downloads/qasai-image-compression-cli-mm5t8al4/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/qasai' && cp -R '.skill-downloads/qasai-image-compression-cli-mm5t8al4' '.claude/skills/qasai'Cursor
test -f '.skill-downloads/qasai-image-compression-cli-mm5t8al4/SKILL.md' && test -s '.skill-downloads/qasai-image-compression-cli-mm5t8al4/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/qasai' && cp -R '.skill-downloads/qasai-image-compression-cli-mm5t8al4' '.cursor/skills/qasai'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/qasai-image-compression-cli-mm5t8al4'openskills read 'qasai-image-compression-cli-mm5t8al4'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/qasai-image-compression-cli-mm5t8al4/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.