Skill
Community

manipulate-image

Install
1
Install the plugin
$
npx claudepluginhub dkmaker/my-claude-plugins --plugin image-tools

Want just this skill?

Then install: npx claudepluginhub u/[userId]/[slug]

Description

Manipulate images - resize, crop, convert, add alpha, transform, compress, and analyze. Use when user needs any image manipulation, format conversion, or image information.

Tool Access

This skill is limited to using the following tools:

BashReadWriteGlobAskUserQuestion
Supporting Assets
View in Repository
instructions/alpha-and-composite.md
instructions/analyze.md
instructions/convert-and-compress.md
instructions/crop-and-trim.md
instructions/resize-and-scale.md
instructions/transform.md
scripts/check-setup.sh
scripts/image_tools.py
scripts/install.md
scripts/ops/__init__.py
scripts/ops/alpha.py
scripts/ops/analyze.py
scripts/ops/convert.py
scripts/ops/crop.py
scripts/ops/resize.py
scripts/ops/transform.py
scripts/run.sh
Skill Content

Image Tools

Swiss army knife for image manipulation powered by Pillow.

First Use

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

Running Commands

SCRIPTS="${CLAUDE_PLUGIN_ROOT}/skills/manipulate-image/scripts"
"$SCRIPTS/run.sh" <command> [args...]

Available Commands

CommandWhat it doesInstruction file
resizeScale to width/height/percentageresize-and-scale.md
thumbnailGenerate max-size thumbnailresize-and-scale.md
cropCrop by box or centercrop-and-trim.md
trimAuto-trim whitespace borderscrop-and-trim.md
padPad to target size with colorcrop-and-trim.md
convertChange format (PNG/JPG/WebP)convert-and-compress.md
compressReduce file sizeconvert-and-compress.md
alphaAdd/remove/transparent alphaalpha-and-composite.md
compositeOverlay imagesalpha-and-composite.md
rotateRotate by degreestransform.md
flipFlip horizontal/verticaltransform.md
infoShow dimensions, format, modeanalyze.md
metadataExtract EXIF dataanalyze.md

Workflow

  1. Run check-setup.sh if this is the first use or you hit errors
  2. Read the instruction file for the operation the user needs
  3. Run run.sh <command> with the right arguments
  4. Show the user the result

Transparent Background from AI-Generated Images

When removing backgrounds from images generated by image-tools:generate-image (or similar AI tools):

  1. Sample the actual background color (AI never produces exact colors):

    # from PIL import Image; print(Image.open("image.png").getpixel((0,0)))
    
  2. 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):

ColorExact RGBHexApproximate AI output
Green0, 255, 0#00FF00varies around (0-20, 240-255, 0-20)
Magenta255, 0, 255#FF00FFvaries around (235-255, 0-20, 235-255)
Blue0, 0, 255#0000FFvaries around (0-20, 0-20, 235-255)
Yellow255, 255, 0#FFFF00varies 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.

Quick Reference

All commands accept: input (file or directory for batch), -o/--output.

Stats
Stars1
Forks0
Last CommitFeb 15, 2026

Similar Skills