skills/image-crop/SKILL.md
Crops an image to specified dimensions around a focal point. Use when you need to extract a portion of an image, create thumbnails with custom positioning, or prepare images for specific aspect ratios.
npx skillsauth add agntswrm/agent-media image-cropInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Crops an image to specified dimensions centered on a configurable focal point. The crop region is calculated to center on the focal point while staying within image bounds.
npx agent-media@latest image crop --in <path> --width <px> --height <px> [options]
| Option | Required | Description |
|--------|----------|-------------|
| --in | Yes | Input file path or URL |
| --width | Yes | Width of crop area in pixels |
| --height | Yes | Height of crop area in pixels |
| --focus-x | No | Focal point X position 0-100 (default: 50 = center) |
| --focus-y | No | Focal point Y position 0-100 (default: 50 = center) |
| --dpi | No | DPI/density for output (default: 300) |
| --out | No | Output path, filename or directory (default: ./) |
| --provider | No | Provider to use (default: local) |
Returns a JSON object with the cropped image path:
{
"ok": true,
"media_type": "image",
"action": "crop",
"provider": "local",
"output_path": "cropped_123_abc.png",
"mime": "image/png",
"bytes": 45678
}
Crop to 800x600 centered (default focal point):
npx agent-media@latest image crop --in photo.jpg --width 800 --height 600
Crop with focal point at top-left area (20% from left, 30% from top):
npx agent-media@latest image crop --in photo.jpg --width 800 --height 600 --focus-x 20 --focus-y 30
Crop from URL with custom output:
npx agent-media@latest image crop --in https://example.com/image.jpg --width 1024 --height 768 --out ./output
data-ai
Generates video from text prompts or animates static images. Use when you need to create videos from descriptions, animate images, or produce video content using AI.
development
Upscales an image using AI super-resolution to increase resolution with detail generation. Use when you need to enlarge images, improve low-resolution photos, or prepare images for large-format display.
testing
Resizes an image to specified dimensions. Use when you need to change image size, create thumbnails, or prepare images for specific display requirements.
content-media
Removes the background from an image, leaving the foreground subject with transparency. Use when you need to isolate subjects, create cutouts, or prepare images for compositing.