png-compress

Compress PNG assets in App projects using pngquant quantization and oxipng optimization.

76|3|Updated Aug 7, 2026
One-click install
npx skills add https://github.com/Job-Yang/jobbyang-ai-skills --skill png-compress-job-yang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: png-compress
Source: https://github.com/Job-Yang/jobbyang-ai-skills/tree/main/skills/png-compress-skill
Command: npx skills add https://github.com/Job-Yang/jobbyang-ai-skills --skill png-compress-job-yang

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pngquant, oxipng, Pillow, numpy.

What problem does it solve? Compressing every PNG in an App project through online tools like TinyPNG is slow, quota-limited, and requires uploading images off your machine. This Skill runs the same class of compression locally: recursive batch processing, incremental caching, and automatic quality gates, so large projects can be compressed repeatedly without re-quantizing already-processed images. ## Core Features & Use Cases - Two-stage local pipeline: pngquant performs lossy color quantization (24/32-bit to 8-bit palette), then oxipng applies lossless DEFLATE recompression and metadata stripping. - Incremental caching and safety gates: Content-hash caching skips already-compressed files, while decode, dimension, alpha, PSNR/SSIM/MAE gates automatically keep the original when output degrades or grows larger. - Project-agnostic batch processing: Recursively scans any directory, skips Pods/build/DerivedData and APNG files, uses conservative quality for small icons, and parallelizes across CPU cores. - Use Case: Point it at an iOS project with 1,200 PNG assets; it compresses new and changed images in place, writes a shareable cache file, and reports total size savings. ## Quick Start Ask the agent to compress all PNG assets in your project directory, for example: compress the PNGs in /path/to/MyApp, optionally with a dry run first to preview the savings.

Frequently Asked Questions about png-compress

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

FAQPage Schema
How do I batch compress PNG files in an iOS project locally?

Run the bundled script with the project path, such as ./compress.sh /path/to/MyApp. It recursively finds PNGs, compresses them with pngquant and oxipng, replaces files in place, and writes a cache so repeat runs skip processed images.

pngquant vs TinyPNG for PNG compression, which is better?

Both use the same public technique of color quantization plus metadata removal. Published comparisons show tuned pngquant settings can match or exceed TinyPNG compression ratios, while running locally without upload limits or API quotas.

Does this PNG compression support APNG animated images?

No, APNG files are detected via the acTL chunk and skipped entirely. This prevents animated PNGs from being flattened into a single frame during lossy quantization.

What dependencies are required to run pngquant and oxipng compression?

You need pngquant, oxipng, and Python 3. Pillow is required for the default quality gate, and numpy optionally enables SSIM metrics. On macOS install them with brew install pngquant oxipng and pip install Pillow numpy.

What happens if compressed PNG quality is too low?

Automatic gates reject bad output: the result must decode, keep dimensions and alpha, stay smaller than the original, and pass PSNR, SSIM, and MAE thresholds. Failed files keep the original and are cached so they are not retried.

Can I preview PNG compression savings without modifying files?

Yes, run the script with the --dry-run flag. It scans and estimates compression results without changing any files or writing to the cache, so you can evaluate savings before committing.