# A Claude Skill That Makes Images Smaller

> Source: <https://dev.to/dalirnet/a-claude-skill-that-makes-images-smaller-348b>
> Published: 2026-07-01 07:53:44+00:00

The cover image on this page is about 20 KB. The file I made was 70 KB.

That is three times bigger than it needs to be — for a file whose only job is to load. This happens a lot. You make a PNG, you know it is too big, but making it smaller means a website, an upload, a download, and a manual swap. Four steps for a file you already finished. So you skip it and ship the big one.

`tiny`

makes an image smaller with one instruction. It sends the file to [TinyPNG](https://tinypng.com), replaces the original with the smaller version, and shows the result:

```
✓ cover.png  70.3 KB → 19.9 KB  (-50.3 KB, -71.7%)
-- quota: 2 / 500 used this month (498 left)
```

These numbers are real — this is the cover of this article. PNG, JPEG, and WebP all work. The replace is safe: if anything fails, your original file is not touched.

The second line is the important part. TinyPNG's free plan gives you 500 images per month. But it does **not** stop at 500 — image number 501 still works, and it charges your card. So `tiny`

counts your usage and stops you before you cross the line:

```
only 3 free compression(s) left this month but 5 requested.
Compress fewer, or pass --force (may incur charges).
```

The free plan can never become a paid one by accident. The count resets each month on its own.

**1. Install** — go to your skills folder, clone the gist, then add a free key once (get one at [tinypng.com/developers](https://tinypng.com/developers)):

```
cd ~/.claude/skills
git clone https://gist.github.com/dalirnet/213259ba6e9cf2d3098319f966a5699e.git tiny
bash tiny/tiny.sh set-key <your-key>
```

Claude finds it in your next session. To update later: `cd ~/.claude/skills/tiny && git pull`

.

**2. Use it** — give Claude one image, many images, or a glob:

```
tiny cover.png
tiny assets/*.png
tiny usage          # → 47 / 500 used this month (453 left)
```

One important note: it replaces the file **in place**. If you want to keep the original, copy it first.
