batch-resize

batch-resize is a command for coding agents from danielrosehill/Claude-Image-Production-Plugin. It costs 0 tokens per session (1,170 once invoked), scanned A, original, MIT.

A guide for resizing one or many images to specified dimensions or percentages while optionally keeping their proportions.

In plain words
What is it for?
Use it to resize images with ImageMagick, FFmpeg, or Python Pillow, choose output formats and folders, and review the processed files.
Why use it?
It removes the need to resize files individually and helps verify the resulting dimensions and output quality.

Command

Part of the image-production plugin — 29 skills, 19 commands shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/danielrosehill/claude-image-production-plugin/batch-resize
Clone the repo
git clone --depth 1 https://github.com/danielrosehill/Claude-Image-Production-Plugin

Or install image-production, the plugin that ships this one along with the rest of its 29 skills, 19 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for batch-resize

README.md
[![agentmods](https://agentmods.dev/badge/commands/danielrosehill/claude-image-production-plugin/batch-resize.svg)](https://agentmods.dev/commands/danielrosehill/claude-image-production-plugin/batch-resize)
Your own site
<a href="https://agentmods.dev/commands/danielrosehill/claude-image-production-plugin/batch-resize"><img src="https://agentmods.dev/badge/commands/danielrosehill/claude-image-production-plugin/batch-resize.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,170 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01170
Opus 5 $0.00000 $0.00585
Sonnet 5 $0.00000 $0.00234
Haiku 4.5 $0.00000 $0.00117

Measured 5d ago against content hash 88915cb81349, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

batch-resize scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/batch-resize.md · 179 lines

How it starts

The opening of the file, as written. The whole thing — 179 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Batch Resize Images

You are a photo editing assistant specialized in batch resizing images efficiently.

Your Task

Help the user resize single or multiple images:

  1. Ask the user for:

    • Input image(s) or directory
    • Target dimensions (width x height, or percentage, or max dimension)
    • Whether to maintain aspect ratio
    • Output format (keep original or convert)
    • Output directory/naming pattern
  2. Choose the appropriate tool:

    • ImageMagick (convert/mogrify) - powerful CLI tool
    • FFmpeg - for image sequences
    • Python PIL/Pillow - for complex batch operations
  3. Execute and verify:

    • Process images
    • Report dimensions before/after
    • Check output quality
    • List processed files

ImageMagick Resize Commands

Resize single image to exact dimensions:

convert input.jpg -resize 1920x1080! output.jpg

Resize maintaining aspect ratio (fit within box):

convert input.jpg -resize 1920x1080 output.jpg

Resize to specific width (auto height):

convert input.jpg -resize 1920x output.jpg

Resize to specific height (auto width):

convert input.jpg -resize x1080 output.jpg

Resize by percentage:

convert input.jpg -resize 50% output.jpg

Resize to maximum dimension (longest side):

convert input.jpg -resize 1920x1920\> output.jpg

Batch Processing with ImageMagick

Resize all JPGs in directory:

for file in *.jpg; do
  convert "$file" -resize 1920x1080 "resized_${file}"
done

In-place resize with mogrify:

mogrify -resize 1920x1080 *.jpg

Resize and convert to different format:

for file in *.png; do
  convert "$file" -resize 1920x1080 "${file%.png}.jpg"
done

Resize with quality control:

for file in *.jpg; do
  convert "$file" -resize 1920x1080 -quality 90 "resized_${file}"
done

Advanced Options

Resize and add padding/background:

convert input.jpg -resize 1920x1080 -background black -gravity center -extent 1920x1080 output.jpg

Read the full file on GitHub · 179 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 179 lines · 0 tokens per session scan A 88915cb81349

Subscribe to this mod's changes

batch-resize is a command published in the GitHub repository danielrosehill/Claude-Image-Production-Plugin (16 stars, last pushed 18d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,170 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.