SurgePix
Channel Crop Pack
Generate a channel crop pack from one or more source images (campaign KV / brand key visual / finished hero) via the platform API. Built for ecommerce sellers, Amazon brands, and DTC brand marketing teams, SurgePix Channel Crop Pack instantly adapts your campaign KV, Hero image, or product photography to every channel size without stretching, distortion, or redesigning. Smart cropping keeps faces, products, and headlines inside the safe zone, preserves your original style, and image or ZIP in seconds. From one Amazon main image to full multichannel branding kit: upload once, sell everywhere. Perfect for ecommerce image resizing, Amazon A+ Content, Shopify storefronts, and social commerce.
npx skills add https://github.com/surgepix/agent-skills --skill surgepix-channel-cropSurgePix Generate Channel Crop Pack from a Key Visual
This skill is visual crop / aspect adaptation only. It does not overlay or lock logos, fixed text, or anchors ? use surgepix-lock-brand-mark-position for placement lock. To design a poster from scratch, use surgepix-generate-poster.
What the Skill Does
| Action | Description |
|---|---|
| Smart crop / fit | Reframe the master into each target size, keeping the subject inside the safe area |
| Lock fixed text | Pass every needed size via repeatable --text-WxH |
| Output piece count | Equals the number of --size values entered (duplicates deduped). One size → 1 image; M sizes → M pieces (ZIP if M > 1) |
| Size cheat sheet | Use the recommended size table below as --size values (no placement lock in this skill) |
| Preserve look | Default: no restyle - composition adaptation only |
| Batch masters | N references x M sizes → up to N x M pieces (per master, piece count still follows the size list) |
| Check task status | When run with --nowait true, resolve via surgepix-query-task |
| Download result | One size → image URL; multiple sizes → ZIP |
By default ( --nowait false) the API waits and returns download.Pass --nowait true for taskId, then use surgepix-query-task. | |
Workflow
Step 0: Check environment (required)
Before running, verify config:
node "<skills-dir>/surgepix-setup/scripts/check_env.mjs"
- Exit 0 → proceed to Step 1
- Exit 1 → configure
.envfollowing the surgepix-setup skill, then retry
Step 1: Gather inputs
Flag Required? Description --referenceRequired Master image(s); path or URL; repeatable; max 20MB each --sizeRequired Target WxH; repeat to list all needed sizes; output piece count = number of sizes entered (deduped)--session-idOptional Frontend session grouping only; not a regenerate switch --nowaitOptional Default falseStep 2: Run generate-channel-crop
node "<skills-dir>/surgepix-generate-channel-crop-pack/scripts/generate_channel_crop_pack.mjs" \ --reference "<path-or-url>" [...] \ --size <WxH> [--size <WxH> ...] \ [--session-id <id>] [--nowait <true|false>]
Input Required? Description --reference <path-or-url>Required Master(s); each is cropped to every size --size <WxH>Required Target size; at least one; repeatable; piece count follows the size list length --session-id <id>Optional Frontend grouping only ? not regenerate --nowait <true|false>Optional Default falseStep 3: Parse output
Sync success (single):
{"ok":true,"taskId":"task_abc123","sessionId":123,"progress":"succeeded","download":"https://...","imageCount":1,"resultType":"zip","note":"API 仅返回 ZIP 下载地址,不含单张图片 URL;禁止编造单张链接"}
Async submitted (ZIP):
{"ok":true,"taskId":"task_abc123","sessionId":123,"progress":"succeeded","download":"https://.../xxx.zip","imageCount":4,"resultType":"zip"}
Async submitted:
{"ok":true,"async":true,"taskId":"task_abc123","sessionId":123,"progress":"processing","download":null,"hint":"..."}
Failure:
{"ok":false,"error":"..."}
Step 4: Present result
- On success: Show
downloadfor ZIP show only the ZIP link; Tell the user whichWxHvalues were produced - On failure: The script prints the error code and message.
- When the user is not satisfied:
- Not satisfied: image-edit or re-run with a new
--sizelist - Do not treat
--session-idas a regenerate
- Not satisfied: image-edit or re-run with a new
- On success: Show
Create & Edit Visuals with AI
© 2026 SurgePix. All rights reserved. Made with ❤️ for productivity.