/image-tools:manipulate-image [operation] [image path] [options]from image-tools
Manipulate images - resize, crop, convert, add alpha, transform, compress, and analyze. Use when user needs any image manipulation, format conversion, or image information.
Ships in image-tools. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Swiss army knife for image manipulation powered by Pillow.
Run setup check:
bash "${CLAUDE_PLUGIN_ROOT}/skills/manipulate-image/scripts/check-setup.sh"
If it fails, read the install guide:
${CLAUDE_PLUGIN_ROOT}/skills/manipulate-image/scripts/install.md
SCRIPTS="${CLAUDE_PLUGIN_ROOT}/skills/manipulate-image/scripts"
"$SCRIPTS/run.sh" <command> [args...]
| Command | What it does | Instruction file |
|---|---|---|
resize | Scale to width/height/percentage | resize-and-scale.md |
thumbnail | Generate max-size thumbnail | resize-and-scale.md |
crop | Crop by box or center | crop-and-trim.md |
trim | Auto-trim whitespace borders | crop-and-trim.md |
pad | Pad to target size with color | crop-and-trim.md |
convert | Change format (PNG/JPG/WebP) | convert-and-compress.md |
compress | Reduce file size | convert-and-compress.md |
alpha | Add/remove/transparent alpha | alpha-and-composite.md |
composite | Overlay images | alpha-and-composite.md |
rotate | Rotate by degrees | transform.md |
flip | Flip horizontal/vertical | transform.md |
info | Show dimensions, format, mode | analyze.md |
metadata | Extract EXIF data | analyze.md |
check-setup.sh if this is the first use or you hit errorsrun.sh <command> with the right argumentsWhen removing backgrounds from images generated by image-tools:generate-image (or similar AI tools):
Sample the actual background color (AI never produces exact colors):
# from PIL import Image; print(Image.open("image.png").getpixel((0,0)))
Remove with --feather (activates HSV chroma key + spill suppression):
run.sh alpha <image> --transparent "<actual R,G,B>" --tolerance 15 --feather 40 -o <output>
run.sh trim <output> -o <final>
Chroma key palette (the generate-image skill picks the best one based on subject colors):
| Color | Exact RGB | Hex | Approximate AI output |
|---|---|---|---|
| Green | 0, 255, 0 | #00FF00 | varies around (0-20, 240-255, 0-20) |
| Magenta | 255, 0, 255 | #FF00FF | varies around (235-255, 0-20, 235-255) |
| Blue | 0, 0, 255 | #0000FF | varies around (0-20, 0-20, 235-255) |
| Yellow | 255, 255, 0 | #FFFF00 | varies around (235-255, 235-255, 0-20) |
Always sample the actual corner pixel — Gemini never produces the exact requested RGB.
Why --feather matters: Without it, you get binary transparency with colored halos. With it, the algorithm uses HSV hue detection (handles imprecise colors), Gaussian-blurred alpha edges, and spill suppression that removes background color contamination from outline pixels.
See the image-tools:generate-image skill for chroma key color selection rules.
All commands accept: input (file or directory for batch), -o/--output.
instructions/alpha-and-composite.md (opens in a new tab)instructions/analyze.md (opens in a new tab)instructions/convert-and-compress.md (opens in a new tab)instructions/crop-and-trim.md (opens in a new tab)instructions/resize-and-scale.md (opens in a new tab)instructions/transform.md (opens in a new tab)scripts/check-setup.sh (opens in a new tab)scripts/image_tools.py (opens in a new tab)scripts/install.md (opens in a new tab)scripts/ops/__init__.py (opens in a new tab)scripts/ops/alpha.py (opens in a new tab)scripts/ops/analyze.py (opens in a new tab)scripts/ops/convert.py (opens in a new tab)scripts/ops/crop.py (opens in a new tab)scripts/ops/resize.py (opens in a new tab)scripts/ops/transform.py (opens in a new tab)scripts/run.sh (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub dkmaker/my-claude-plugins --plugin image-tools2 skills in this plugin
Other plugins' skills for the same job