Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
zc277584121 avatar

Screenshot Compression

  • 2.8k installs
  • Updated July 30, 2026
  • zc277584121/marketing-skills

screenshot-compression is an agent skill that Compress PNG and JPEG screenshots in place using pngquant and jpegoptim, keeping the original format for maximum compati.

About

Compress screenshot images PNG JPEG in place while keeping the original format Uses pngquant for PNG and jpegoptim for JPEG both are highly effective for screenshot content UI elements text flat colors Prerequisites pngquant and jpegoptim must be installed on the system The script will not install them automatically it checks for their presence and prints install instructions if missing The user has screenshot files that are too large and wants to reduce file size without changing format Common scenarios Preparing images for GitHub READMEs blog posts or documentation Reducing image sizes before committing to a repository Batch compressing a directory of screenshots WebP has better compression but poor compatibility in some contexts Context WebP Support Browsers Chrome Firefox Safari Edge Yes GitHub Issues PRs Yes WeChat editor No Word PowerPoint No Some forums blog backends Varies

  • description: Compress PNG and JPEG screenshots in place using pngquant and jpegoptim, keeping the original format for ma
  • Compress screenshot images (PNG/JPEG) in place while keeping the original format. Uses `pngquant` for PNG and `jpegoptim
  • > **Prerequisites**: `pngquant` and `jpegoptim` must be installed on the system. The script will **not** install them au
  • Follow screenshot-compression SKILL.md steps and documented constraints.
  • Follow screenshot-compression SKILL.md steps and documented constraints.

Screenshot Compression by the numbers

  • 2,789 all-time installs (skills.sh)
  • +219 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #284 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
At a glance

screenshot-compression capabilities & compatibility

Capabilities
description: compress png and jpeg screenshots i · compress screenshot images (png/jpeg) in place w · > **prerequisites**: `pngquant` and `jpegoptim` · follow screenshot compression skill.md steps and
Use cases
orchestration
From the docs

What screenshot-compression says it does

description: Compress PNG and JPEG screenshots in place using pngquant and jpegoptim, keeping the original format for maximum compatibility.
SKILL.md
Compress screenshot images (PNG/JPEG) in place while keeping the original format. Uses `pngquant` for PNG and `jpegoptim` for JPEG — both are highly effective for screenshot content (UI elements, text
SKILL.md
> **Prerequisites**: `pngquant` and `jpegoptim` must be installed on the system. The script will **not** install them automatically — it checks for their presence and prints install instructions if mi
SKILL.md
npx skills add https://github.com/zc277584121/marketing-skills --skill screenshot-compression

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs2.8k
Security audit3 / 3 scanners passed
Last updatedJuly 30, 2026
Repositoryzc277584121/marketing-skills

When should an agent use screenshot-compression and what problem does it solve?

Compress PNG and JPEG screenshots in place using pngquant and jpegoptim, keeping the original format for maximum compatibility.

Who is it for?

Developers invoking screenshot-compression as documented in the skill source.

Skip if: Skip when requirements fall outside screenshot-compression documented scope.

When should I use this skill?

Compress PNG and JPEG screenshots in place using pngquant and jpegoptim, keeping the original format for maximum compatibility.

What you get

Outputs aligned with the screenshot-compression SKILL.md workflow and stated deliverables.

  • Compressed PNG screenshots
  • Compressed JPEG screenshots

Files

SKILL.mdMarkdownGitHub ↗

Skill: Screenshot Compression

Compress screenshot images (PNG/JPEG) in place while keeping the original format. Uses pngquant for PNG and jpegoptim for JPEG — both are highly effective for screenshot content (UI elements, text, flat colors).

Prerequisites: pngquant and jpegoptim must be installed on the system. The script will not install them automatically — it checks for their presence and prints install instructions if missing.

---

When to Use

The user has screenshot files that are too large and wants to reduce file size without changing format. Common scenarios:

  • Preparing images for GitHub READMEs, blog posts, or documentation
  • Reducing image sizes before committing to a repository
  • Batch compressing a directory of screenshots

---

Why Keep Original Format (Not WebP)

WebP has better compression, but poor compatibility in some contexts:

ContextWebP Support
Browsers (Chrome/Firefox/Safari/Edge)Yes
GitHub Issues/PRsYes
WeChat editorNo
Word / PowerPointNo
Some forums/blog backendsVaries

Keeping PNG/JPEG ensures the compressed images work everywhere.

---

Default Workflow

python /path/to/skills/screenshot-compression/scripts/compress_screenshots.py <files-or-directories>

The script will: 1. Check that pngquant and jpegoptim are installed — if not, print install instructions and exit 2. Auto-detect file format by extension 3. Compress each file in place (overwrites the original) 4. Print per-file and total compression summary

---

Dependency Check

The script requires two system tools. If either is missing, it exits with install instructions instead of proceeding. Do not install them on behalf of the user — just relay the error message so the user can install them.

Install commands:

# macOS
brew install pngquant jpegoptim

# Ubuntu / Debian
sudo apt install pngquant jpegoptim

# CentOS / RHEL
sudo yum install pngquant jpegoptim

---

Script Options

FlagDefaultDescription
paths (positional)requiredImage files or directories to compress
-r, --recursiveoffRecursively process directories
--png-quality80-95pngquant quality range (min-max, 0-100)
--jpeg-quality85jpegoptim max quality (0-100)

---

Examples

# Compress a single file
python .../compress_screenshots.py screenshot.png

# Compress all images in a directory
python .../compress_screenshots.py ./images/

# Recursive directory scan
python .../compress_screenshots.py ./docs/ --recursive

# High quality for code screenshots
python .../compress_screenshots.py *.png --png-quality 90-100

# Aggressive compression for thumbnails
python .../compress_screenshots.py *.jpg --jpeg-quality 70

---

Quality Tuning Guide

Scenario--png-quality--jpeg-quality
General screenshots (docs, web pages)80-9585
Code screenshots (need sharp text)90-10090
Thumbnails / previews (size priority)60-8070

---

How It Works

PNG (pngquant)

  • Quantizes 24-bit true color (16M colors) down to an 8-bit palette (256 colors)
  • Uses Floyd-Steinberg dithering for smooth gradients
  • Screenshots are ideal candidates — UI colors are typically well under 256 unique values
  • Typical reduction: 60-80%

JPEG (jpegoptim)

  • Re-encodes at the specified quality level
  • Strips metadata (EXIF, ICC profiles, thumbnails) via --strip-all
  • Optimizes Huffman tables
  • Typical reduction: 20-50%

---

Important Notes

  • Files are compressed in place — the original is overwritten. Back up files first if needed.
  • Only .png, .jpg, and .jpeg files are processed. Other formats are silently skipped.
  • The script never installs dependencies. If tools are missing, it prints install instructions and exits.

Related skills

How it compares

Pick screenshot-compression over manual export sliders when you need repeatable CLI batch passes across docs or marketing screenshot folders.

FAQ

What is screenshot-compression?

Compress PNG and JPEG screenshots in place using pngquant and jpegoptim, keeping the original format for maximum compatibility.

When should I use screenshot-compression?

Compress PNG and JPEG screenshots in place using pngquant and jpegoptim, keeping the original format for maximum compatibility.

Is screenshot-compression safe to install?

Review the Security Audits panel on this page before production use.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.