From img-cropper
This skill should be used when the user asks to "crop an image", "trim whitespace from an image", "remove blank space from a PNG", "auto-crop", "trim transparent space", "remove empty borders", "crop the blank area", "trim the image", or requests removing unused/blank/transparent/white space around image content.
How this skill is triggered — by the user, by Claude, or both
Slash command
/img-cropper:img-cropperThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Auto-crop images by trimming blank or transparent space around the content.
Auto-crop images by trimming blank or transparent space around the content.
Before cropping images, ensure:
pip install PillowIf Pillow is missing, install it before proceeding.
Run the crop script located at ${CLAUDE_PLUGIN_ROOT}/skills/img-cropper/scripts/crop_image.py:
python3 "${CLAUDE_PLUGIN_ROOT}/skills/img-cropper/scripts/crop_image.py" \
input.png \
-o cropped.png
Arguments:
| Argument | Required | Default | Description |
|---|---|---|---|
input | Yes | - | Path to the input image |
-o, --output | No | Overwrites input | Output file path |
-p, --padding | No | 0 | Pixels of padding to keep around content |
-bg, --background | No | Auto-detect | Background color to trim (transparent, hex, or CSS name) |
--fuzz | No | 10 | Color tolerance 0-255 for background matching |
When a user asks to crop/trim an image:
Basic crop (auto-detect background, overwrite):
python3 "${CLAUDE_PLUGIN_ROOT}/skills/img-cropper/scripts/crop_image.py" image.png
Crop with padding and save to new file:
python3 "${CLAUDE_PLUGIN_ROOT}/skills/img-cropper/scripts/crop_image.py" image.png -o trimmed.png -p 10
Crop white background specifically:
python3 "${CLAUDE_PLUGIN_ROOT}/skills/img-cropper/scripts/crop_image.py" image.png -bg white -o cropped.png
Crop transparent space:
python3 "${CLAUDE_PLUGIN_ROOT}/skills/img-cropper/scripts/crop_image.py" image.png -bg transparent -o cropped.png
High fuzz tolerance for near-white backgrounds:
python3 "${CLAUDE_PLUGIN_ROOT}/skills/img-cropper/scripts/crop_image.py" image.png --fuzz 30 -o cropped.png
| Issue | Solution |
|---|---|
Pillow not installed | Run pip install Pillow |
| Nothing cropped | Background may not match corners — try -bg white or -bg transparent explicitly |
| Too much cropped | Lower the --fuzz value (try 0 for exact matching) |
| Not enough cropped | Raise the --fuzz value (try 30 or higher) |
npx claudepluginhub thejacedev/claude-code-skills --plugin img-cropperRemoves backgrounds from single or batch images using AI (rembg/U2-Net) or built-in white-to-transparent methods. Outputs PNG/WebP with transparency for photos, products, icons.
Processes web images: resize, crop, trim whitespace, convert PNG/WebP/JPG, optimize size, generate thumbnails/OG cards via Python Pillow CLI or scripts.
CLI image manipulation using ImageMagick and vtracer — convert PNG/JPG to SVG, remove watermarks, resize, crop, and edit raster images.