$npx -y skills add rorkai/app-store-connect-cli-skills --skill asc-screenshot-resizeResize and validate App Store screenshots with current asc screenshot-size data and macOS sips. Use when preparing or fixing screenshots for App Store Connect submission.
| 1 | # asc screenshot resize |
| 2 | |
| 3 | Use this skill to prepare screenshots for App Store Connect. Do not rely on a hard-coded dimension table in this skill; the CLI owns the current size matrix. |
| 4 | |
| 5 | ## Source of truth |
| 6 | |
| 7 | Always discover current accepted sizes from `asc` first: |
| 8 | |
| 9 | ```bash |
| 10 | asc screenshots sizes --output table |
| 11 | asc screenshots sizes --all --output table |
| 12 | ``` |
| 13 | |
| 14 | For local validation before upload: |
| 15 | |
| 16 | ```bash |
| 17 | asc screenshots validate --path "./screenshots/iphone" --device-type "IPHONE_65" --output table |
| 18 | asc screenshots validate --path "./screenshots/ipad" --device-type "IPAD_PRO_3GEN_129" --output table |
| 19 | ``` |
| 20 | |
| 21 | Common current device-type anchors: |
| 22 | |
| 23 | - `IPHONE_65` for the common 6.5-inch iPhone screenshot set. |
| 24 | - `IPAD_PRO_3GEN_129` for the common 12.9/13-inch iPad screenshot set. |
| 25 | |
| 26 | Run `asc screenshots sizes --all` when targeting other display types such as 6.9-inch iPhone, Apple TV, Mac, Vision Pro, iMessage, or Watch. |
| 27 | |
| 28 | ## Workflow |
| 29 | |
| 30 | ### 1. Sanitize filenames |
| 31 | |
| 32 | macOS screenshots can contain hidden Unicode spaces that make tools fail with "not a valid file". Sanitize before batch work: |
| 33 | |
| 34 | ```bash |
| 35 | python3 -c " |
| 36 | import os |
| 37 | for f in os.listdir('.'): |
| 38 | clean = f.replace('\u202f', ' ') |
| 39 | if f != clean: |
| 40 | os.rename(f, clean) |
| 41 | print(f'Renamed: {clean}') |
| 42 | " |
| 43 | ``` |
| 44 | |
| 45 | ### 2. Inspect dimensions and metadata |
| 46 | |
| 47 | ```bash |
| 48 | sips -g pixelWidth -g pixelHeight screenshot.png |
| 49 | sips -g hasAlpha -g space screenshot.png |
| 50 | ``` |
| 51 | |
| 52 | App Store Connect rejects screenshots with alpha transparency. Strip alpha by round-tripping through JPEG: |
| 53 | |
| 54 | ```bash |
| 55 | sips -s format jpeg input.png --out /tmp/asc-screenshot-no-alpha.jpg |
| 56 | sips -s format png /tmp/asc-screenshot-no-alpha.jpg --out output.png |
| 57 | rm /tmp/asc-screenshot-no-alpha.jpg |
| 58 | ``` |
| 59 | |
| 60 | Batch-strip alpha from PNGs: |
| 61 | |
| 62 | ```bash |
| 63 | for f in *.png; do |
| 64 | if sips -g hasAlpha "$f" | grep -q "yes"; then |
| 65 | sips -s format jpeg "$f" --out /tmp/asc-screenshot-no-alpha.jpg |
| 66 | sips -s format png /tmp/asc-screenshot-no-alpha.jpg --out "$f" |
| 67 | rm /tmp/asc-screenshot-no-alpha.jpg |
| 68 | echo "Stripped alpha: $f" |
| 69 | fi |
| 70 | done |
| 71 | ``` |
| 72 | |
| 73 | ### 3. Resize only after choosing a target from asc |
| 74 | |
| 75 | Pick a width and height from `asc screenshots sizes --all`. `sips -z` takes height first, then width: |
| 76 | |
| 77 | ```bash |
| 78 | # Example: portrait IPHONE_65 1284 x 2778 |
| 79 | sips -z 2778 1284 input.png --out output.png |
| 80 | ``` |
| 81 | |
| 82 | Batch resize to a chosen target: |
| 83 | |
| 84 | ```bash |
| 85 | mkdir -p resized |
| 86 | for f in *.png; do |
| 87 | sips -z 2778 1284 "$f" --out "resized/$f" |
| 88 | done |
| 89 | ``` |
| 90 | |
| 91 | ### 4. Validate outputs with asc |
| 92 | |
| 93 | ```bash |
| 94 | sips -g pixelWidth -g pixelHeight -g hasAlpha resized/*.png |
| 95 | asc screenshots validate --path "./resized" --device-type "IPHONE_65" --output table |
| 96 | ``` |
| 97 | |
| 98 | ### 5. Upload only after validation |
| 99 | |
| 100 | ```bash |
| 101 | asc screenshots upload --version-localization "LOC_ID" --path "./resized" --device-type "IPHONE_65" --dry-run --output table |
| 102 | asc screenshots upload --version-localization "LOC_ID" --path "./resized" --device-type "IPHONE_65" |
| 103 | ``` |
| 104 | |
| 105 | ## Guardrails |
| 106 | |
| 107 | - Treat `asc screenshots sizes --all` as authoritative; Apple size requirements change. |
| 108 | - Do not stretch screenshots across incompatible aspect ratios unless the user accepts the visual tradeoff. |
| 109 | - Always output to a separate file or directory to preserve originals. |
| 110 | - Screenshots must be PNG or JPEG and must not include alpha transparency. |
| 111 | - Convert Display P3 or other color spaces to sRGB when needed: |
| 112 | |
| 113 | ```bash |
| 114 | sips -m "/System/Library/ColorSync/Profiles/sRGB IEC61966-2.1.icc" input.png --out output.png |
| 115 | ``` |
| 116 | |
| 117 | - Prefer `asc screenshots validate` over visual inspection before upload. |