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.
How this skill is triggered — by the user, by Claude, or both
Slash command
/image-tools:manipulate-imageThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Swiss army knife for image manipulation powered by Pillow.
instructions/alpha-and-composite.mdinstructions/analyze.mdinstructions/convert-and-compress.mdinstructions/crop-and-trim.mdinstructions/resize-and-scale.mdinstructions/transform.mdscripts/check-setup.shscripts/image_tools.pyscripts/install.mdscripts/ops/__init__.pyscripts/ops/alpha.pyscripts/ops/analyze.pyscripts/ops/convert.pyscripts/ops/crop.pyscripts/ops/resize.pyscripts/ops/transform.pyscripts/run.shSwiss 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.
npx claudepluginhub dkmaker/my-claude-plugins --plugin image-toolsConvert and manipulate images using ImageMagick: format conversion, resizing, batch processing, thumbnails, quality adjustment, rotate, flip, crop.
Processes web images: resize, crop, trim whitespace, convert PNG/WebP/JPG, optimize size, generate thumbnails/OG cards via Python Pillow CLI or scripts.
Generates and edits images via a unified CLI supporting OpenAI gpt-image-2 and Codex, with masks, transparent backgrounds, and up to 4K sizes.