Skip to content

// Shrink images to 25% of their size so AI engines (Claude, GPT, Gemini) read them faster and cheaper.

Image Compress

skill --stat
  • last update

    May 27, 2026

  • license

    MITv1.0.0

  • format

    SKILL.md

quickstart.sh
3 steps
  1. Install

    // Downloads SKILL.md into ~/.claude/skills/image-compress-skill/

    $ curl -fsSL --create-dirs -o ~/.claude/skills/image-compress-skill/SKILL.md https://claudeskil.com/skills/image-compress-skill/SKILL.md
  2. Invoke

    // Inside Claude Code, type the skill name as a slash command

    > /image-compress-skill wire up a GitHub Actions deploy
  3. Or just ask

    // Claude loads the skill by itself when a request matches its description

    > wire up a GitHub Actions deploy
image-compress-skill/
references
SKILL.md
readonly
name:
Image Compress
slug:
image-compress-skill
version:
v1.0.0
license:
MIT
author:
@chiragthummar16
categories:
tags:
#image-compression#vision#optimization#batch#anthropic
description:

Shrink images to 25% of their size so AI engines (Claude, GPT, Gemini) read them faster and cheaper.

README.md

image-compress-skill/README.md
7 sections

Image Compress

Batch-shrink images to roughly a quarter of their original dimensions before you hand them to a vision model. Smaller images mean fewer image tokens, faster reads, and a lower bill — without losing the content the model actually needs to "see." Built for developers and analysts who routinely feed screenshots, scans, or design exports into Claude, GPT, or Gemini.

When to use it

  • You're about to ask an AI to read a 4000x3000 screenshot or a folder of UI captures.
  • A request fails or stalls because an image is too large for the upload limit.
  • You're running a pipeline that sends hundreds of images to a vision API and the token cost is adding up.
  • You have HEIC photos straight off an iPhone that you want analyzed.

What it does

The skill resizes each image to 25% of its original width and height (a 1/16 reduction in pixel area), then re-encodes it. Because vision models tile images into fixed-size patches to count tokens, cutting the dimensions is what actually lowers the token count — far more than re-compressing at the same resolution would.

Supported inputs: PNG, JPG/JPEG, WEBP, BMP, TIFF, and HEIC. You can pass a single file or point it at a whole folder for batch processing. Aspect ratio is preserved, and outputs are written alongside the originals so nothing is destroyed in place.

Usage

code
curl -fsSL --create-dirs -o ~/.claude/skills/image-compress-skill/SKILL.md https://claudeskil.com/skills/image-compress-skill/SKILL.md

# then, in a Claude session:
"Compress every image in ./screenshots before analyzing them"
"Shrink invoice-scan.heic so it's cheaper to read"
"This PNG is too big — make it smaller and tell me what it says"

The skill triggers automatically when you upload large images and ask for analysis — it will offer to compress first.

Tips & gotchas

  • A flat 25% scale is the right call for documents, UI, and diagrams. For images where fine detail matters — dense tables, tiny serial numbers, fine print — sanity-check that text is still legible after compression, or skip it for that file.
  • Token savings come from dimensions, not file format. A re-saved JPEG at full resolution costs nearly the same as the original; the resize is what buys you the ~80% reduction.
  • HEIC support depends on the host environment having the right decoder available; if a HEIC file is skipped, convert it to PNG/JPG first and re-run.
  • Outputs land next to the source files. Run on a copy if you want the originals untouched in a clean directory.

FAQ

Does this reduce quality? Resolution drops to 25% per side, so it's lossy by design. For most AI-reading tasks the model still parses the content fine; for archival or print use, keep your originals.

Can it handle a mixed folder of formats? Yes — point it at the directory and it processes every supported type in one pass.

Will it really cut my token bill? For oversized images, yes — vision models bill by image area, so a 1/16-area image uses dramatically fewer tokens.

$ cat reviews/

Reviews

// No reviews yet. Be the first.
Loading review form…

$ ls related/

explore all →