Skip to content
Skills Library
Design & UX · Conversion & formats

process-image

/process-image

Resize, convert, rotate, flip, color-adjust, or inspect a local image file (JPEG/PNG/WebP/AVIF, or an SVG rendered to pixels) and make blur-up placeholders — thumbnails, avatars, hero images, fitting an image into a layout, converting between formats, orientation fixes, brightness/saturation tweaks, checking dimensions/size. Runs entirely offline via Bun's native image API, no network call and no fal.ai credit spent. Use whenever the user wants to resize, shrink, convert, re-encode, compress, rotate, mirror, brighten/desaturate an image they already have, needs an LQIP/blur-up placeholder, or

Licence
MIT
Last repository change
08.11.2026

Assessment and security

95/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content30 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
1
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 08.11.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • 1 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: scripts/process-image.ts

What it does and when to use it

Resize, convert, rotate, flip, color-adjust, or inspect a local image file (JPEG/PNG/WebP/AVIF, or an SVG rendered to pixels) and make blur-up placeholders — thumbnails, avatars, hero images, fitting an image into a layout, converting between formats, orientation fixes, brightness/saturation tweaks, checking dimensions/size. Runs entirely offline via Bun's native image API, no network call and no fal.ai credit spent. Use whenever the user wants to resize, shrink, convert, re-encode, compress, rotate, mirror, brighten/desaturate an image they already have, needs an LQIP/blur-up placeholder, or

Original author description

Resize, convert, rotate, flip, color-adjust, or inspect a local image file (JPEG/PNG/WebP/AVIF, or an SVG rendered to pixels) and make blur-up placeholders — thumbnails, avatars, hero images, fitting an image into a layout, converting between formats, orientation fixes, brightness/saturation tweaks, checking dimensions/size. Runs entirely offline via Bun's native image API, no network call and no fal.ai credit spent. Use whenever the user wants to resize, shrink, convert, re-encode, compress, rotate, mirror, brighten/desaturate an image they already have, needs an LQIP/blur-up placeholder, or

How it works

  1. info — inspect before deciding
  2. resize
  3. convert
  4. rotate / flip — orientation fixes
  5. adjust — brightness / saturation
  6. placeholder — blur-up LQIP
Original SKILL.md headings · 75 lines, 730 words
SKILL.md preview
---
name: process-image
description: Resize, convert, rotate, flip, color-adjust, or inspect a local image file (JPEG/PNG/WebP/AVIF, or an SVG rendered to pixels) and make blur-up placeholders — thumbnails, avatars, hero images, fitting an image into a layout, converting between formats, orientation fixes, brightness/saturation tweaks, checking dimensions/size. Runs entirely offline via Bun's native image API, no network call and no fal.ai credit spent. Use whenever the user wants to resize, shrink, convert, re-encode, compress, rotate, mirror, brighten/desaturate an image they already have, needs an LQIP/blur-up placeholder, or needs a PNG/favicon/preview from an SVG logo — even if they just paste a path and say "make this smaller".
compatibility: Claude Code with Bun 1.4 or later. Offline; no API key.
---

# process-image

Wraps Bun's native `Bun.Image` API (statically linked libjpeg-turbo/spng/libwebp plus OS codecs — this is the "sharp" people mean when they say Bun has it built in, not the npm `sharp` package) behind one CLI: `${CLAUDE_SKILL_DIR}/scripts/process-image.ts`. Purely local — no network, no API key, safe to run freely.

```
bun ${CLAUDE_SKILL_DIR}/scripts/process-image.ts <command> ...
```

If the shell says `bun` isn't found, Bun isn't installed. Stop and ask the user to install it from
https://bun.com/docs/installation and restart Claude Code. Don't replace the script with other tools or
code of your own: the checks it runs before a paid call and on the result would be lost.

If you're about to generate a *new* image and just want it encoded a particular way, don't chain `generate` → `process-image convert/resize` — the `generate-image generate`/`edit` commands already take `--format` / `--output-quality` / `--max-width` and do it in one step. Reach for `process-image` for images that already exist on disk.

An `.svg` source works with every command: it is rendered to pixels first (with resvg, installed by
Bun on first use). `resize` renders it straight at the target width, so
`resize --source logo.svg --output favicon-64.png --width 64` gives a sharp favicon. Render an SVG
this way to look at it before showing it to the user. A preview isn't a deliverable, so it goes in
the project's work folder: `media-generation/` inside the project's own scratch folder if it has
one (`.scratch/`, `tmp/`), otherwise `.media-generation/` holding a `.gitignore` that contains `*`,
so git never sees it. Never `/tmp` or a folder next to the project.

For `rotate`, `flip` and `adjust`, the output format is inferred from the `--output` extension
(`.jpg`/`.jpeg`, `.png`, `.webp`, `.avif`, `.heic`; anything else is rejected); `--quality 1-100` (default 85) applies to any lossy format.

## info — inspect before deciding

```
process-image.ts info --source <path>
```

Prints format, dimensions, and file size. Run this first when you don't already know the source image's size — e.g. before picking a resize width or deciding whether a convert is even needed.

## resize

```
process-image.ts resize --source <path> --output <path> --width N [--height N] [--fit inside|fill] [--quality 1-100]
```

`--fit inside` (the default) preserves aspect ratio, shrinking to fit within the given width/height. `--fit fill` stretches to the exact dimensions, distorting the aspect ratio — only use it when the caller explicitly wants an exact box (e.g. a fixed avatar frame). Omit `--height` to derive it from the width at the source's aspect ratio.

## convert

```
process-image.ts convert --source <path> --output <path> --format jpeg|png|webp|avif|heic [--quality 1-100]
```

`webp` is the safe default for anything web-bound — good size/quality, transparency, universal support. `avif` is typically another 20–30% smaller and every current browser renders it, **but Bun encodes it through the OS codec**: impossible on Linux (nothing to install), on macOS only on Apple M3 or newer, on Windows only with the AV1 Video Extension. HEIC works on macOS and on Windows with the HEIF extension, never on Linux; reading AVIF/HEIC/TIFF sources has the same limits. The script says so when the machine can't do it — then just use `webp`. `--format` must agree with the `--output` extension. `png` is lossless with transparency (large), `jpeg` is smallest for photos but has no alpha, `heic` is for Apple-ecosystem deliverables, not the web. `--quality` (default 85) affects all lossy formats.

## rotate / flip — orientation fixes

```
process-image.ts rotate --source <path> --output <path> --degrees 90|180|270
process-image.ts flip   --source <path> --output <path> [--axis horizontal|vertical]
```

`rotate` turns clockwise. `flip --axis horizontal` (the default) mirrors left↔right; `vertical` turns it upside down. Mirroring is not safe for images containing text or recognizable logos — they'll read backwards.

## adjust — brightness / saturation

```
process-image.ts adjust --source <path> --output <path> [--brightness N] [--saturation N]
```

`--brightness` and `--saturation` are multipliers (`1.0` = unchanged, `0.5` = half, `1.3` = +30%). There is no hue rotation — Bun's image API doesn't support it. Typical uses: darken a hero image so overlay text stays readable (`--brightness 0.7`), desaturate a busy background (`--saturation 0.6`). At least one flag is required.

## placeholder — blur-up LQIP

```
process-image.ts placeholder --source <path>
```

Prints a tiny blurred `data:image/png;base64,…` URI (a few hundred bytes) to stdout. Put it in the `<img>`'s CSS `background` or a low-quality `src` that swaps to the real image on load — the standard blur-up loading pattern. Nothing is written to disk.
Files in this package (2)
  • SKILL.md 6 KB
  • scripts/process-image.ts 8 KB

Versions

The database has no other skills named process-image.

Database snapshot: 13.11.2026 · package version e25fe61399f3 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100sharp
    Process and transform images with Sharp for Node.js. Use when a user asks to resize images, convert image formats (WebP, AVIF, PNG, JPEG), compress images, crop or rotate photos, generate thumbnails, add watermarks, optimize images for web, batch process images, create…
  • 100byted-las-image-resample
    Downsamples, resizes, and compresses images using Volcengine LAS with multiple interpolation methods (lanczos, bilinear, nearest). Image resizing, image scaling, and image compression — reduces image resolution, dimensions, and file size. Changes and adjusts DPI settings.…
  • 100image-processing
    Process images using ImageMagick for format conversion, resizing, cropping, batch processing, effects, composition, watermarks, and optimization. This skill should be used when the user wants to convert image formats (PNG, JPEG, WebP, GIF), resize or crop images, apply effects…
  • 100netlify-image-cdn
    Transform, resize, crop, reformat, and optimize images on demand via Netlify Image CDN's /.netlify/images endpoint. Use when adding responsive images, generating thumbnails, converting formats (avif/webp/png), cropping to aspect ratios, tuning image quality, creating blurred…
  • 100responsive-image-pipeline
    Resize PNG/JPG/WebP images into AVIF and WebP srcset variants (EXIF-rotated, never upscaled), a fallback <img> file and a base64 LQIP placeholder, then print a copy-paste <picture> snippet with truthful srcset widths. Cached per source. Use for site images, hero art, gallery…
  • 100adobe-resize-photos-and-videos
    Resize photos and videos to exact pixel dimensions or aspect ratios using Adobe tools. Use this skill whenever a user wants to resize, scale, or change the dimensions of an image or video file — including phrases like "resize this to 1920x1080", "make this 4K", "scale to…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.