Skip to main content
skill CX Codex

screenshot-compression — Claude Code skill for image compression

Shrinks PNG and JPEG screenshots without converting their format. Use it before adding images to documentation or committing them to a repository.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add zc277584121/marketing-skills --skill screenshot-compression -a claude-code
Open on GitHub

What screenshot-compression does

The skill runs the Python script compress_screenshots.py. It picks a tool based on the file extension: pngquant for PNG and jpegoptim for JPEG. Pass image files or directories; add --recursive to include nested folders. The script reports results for each file and a combined summary.

Compression replaces the original files. Keep copies first if you need to preserve them. Only .png, .jpg, and .jpeg files are handled; other formats are skipped. Both pngquant and jpegoptim must be installed on the system. The script checks for them but does not install them, so processing stops if either tool is missing.

Adjust output quality with --png-quality and --jpeg-quality. PNG processing reduces the color palette; JPEG processing re-encodes the image and removes metadata. This is an in-place workflow, so backups matter.

What it helps with

  • shrink PNG screenshots before a commit
  • compress JPEG images for documentation
  • process screenshot files in a directory
  • scan nested folders for supported images

Example prompts for the agent

  • Compress screenshot.png and keep its format.
  • Process the images in ./docs/, including nested folders.
  • Compress *.jpg using JPEG quality 70.

How to install screenshot-compression

1Skills CLI (Vercel)

npx skills add zc277584121/marketing-skills --skill screenshot-compression -a claude-code

2Manually: put the files in place

~/.claude/skills/screenshot-compression/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/screenshot-compression/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about screenshot-compression

How do I install screenshot-compression in Claude Code?

Run npx skills add zc277584121/marketing-skills --skill screenshot-compression -a claude-code. The skill file is at ~/.claude/skills/screenshot-compression/SKILL.md.

What does screenshot-compression do?

It compresses PNG and JPEG images in place with pngquant and jpegoptim, preserving their file formats.

Which tools does screenshot-compression require?

Install pngquant and jpegoptim on your system first. The skill checks for both and stops if either one is missing.

Similar skills

All skills for Writing and docs →

From the same set9

remove-ai-style Rewrites English or Chinese prose to drop formulaic phrasing, stray dashes and exclamation marks. Useful before you publish an article or a doc. CX Codex +1 4,200installs browser-screenshot Captures one block of a page — a post, a tweet, a chart, a section of an article — instead of a full-page dump. Useful when you need a clean illustration. CX Codex +1 4,100installs image-generation This skill creates illustrations, diagrams, and other visuals for articles and docs. It chooses between Codex, OpenAI API, and Gemini paths. CX Codex +1 4,000installs chrome-automation Controls an active Chrome window via the agent-browser CLI. Useful for extracting web data, filling forms, and replaying DevTools recordings while keeping active login sessions intact. CX Codex +1 4,000installs content-rewrite Turns one article or announcement into versions for LinkedIn, X, Reddit, an English blog and WeChat. Useful when the same material has to go out in several places. CX Codex +1 4,000installs video-to-gif Turns one video into several GIFs at different settings and drops them in a folder, so you pick the one that looks right. CX Codex +1 3,900installs raw-video-processing Cleans up raw screen recordings by cutting silent pauses and speeding up the footage. Useful before publishing demos or tutorials. CX Codex +1 3,900installs github-traffic Pulls traffic metrics, visitor referrers, and clone counts from GitHub. Stores snapshots locally and generates trend charts. CX Codex +1 3,800installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor