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.
npx skills add zc277584121/marketing-skills --skill screenshot-compression -a claude-codeWhat 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.pngand keep its format. - Process the images in
./docs/, including nested folders. - Compress
*.jpgusing JPEG quality70.
How to install screenshot-compression
1Skills CLI (Vercel)
npx skills add zc277584121/marketing-skills --skill screenshot-compression -a claude-code2Manually: put the files in place
~/.claude/skills/screenshot-compression/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/screenshot-compression/
1Skills CLI (Vercel)
npx skills add zc277584121/marketing-skills --skill screenshot-compression -a codex2Manually: put the files in place
.agents/skills/screenshot-compression/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add zc277584121/marketing-skills --skill screenshot-compression -a cursor2Manually: put the files in place
.cursor/skills/screenshot-compression/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install zc277584121/marketing-skills screenshot-compression2Manually: put the files in place
.github/skills/screenshot-compression/SKILL.md1Skills CLI (Vercel)
npx skills add zc277584121/marketing-skills --skill screenshot-compression -a gemini-cli2Platform CLI
gemini skills install https://github.com/zc277584121/marketing-skills --path skills/screenshot-compressionManually: put the files in place
.devin/skills/screenshot-compression/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add zc277584121/marketing-skills --skill screenshot-compression -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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.