$npx -y skills add rorkai/app-store-connect-cli-skills --skill asc-shots-pipelineOrchestrate iOS screenshot automation with xcodebuild/simctl for build-run, AXe for UI actions, JSON settings and plan files, Koubou-based framing (asc screenshots frame), and screenshot upload (asc screenshots upload). Use when users ask for automated screenshot capture, AXe
| 1 | # asc screenshots pipeline (xcodebuild -> AXe -> frame -> asc) |
| 2 | |
| 3 | Use this skill for agent-driven screenshot workflows where the app is built and launched with Xcode CLI tools, UI is driven with AXe, and screenshots are uploaded with `asc`. |
| 4 | |
| 5 | ## Current scope |
| 6 | - Implemented now: build/run, AXe plan capture, frame composition, and upload. |
| 7 | - Device discovery is built-in via `asc screenshots list-frame-devices`. |
| 8 | - Local screenshot automation commands are experimental in asc cli. |
| 9 | - Framing is pinned to Koubou `0.18.1` for deterministic output. |
| 10 | - Feedback/issues: https://github.com/rorkai/App-Store-Connect-CLI/issues/new/choose |
| 11 | |
| 12 | ## Defaults |
| 13 | - Settings file: `.asc/shots.settings.json` |
| 14 | - Capture plan: `.asc/screenshots.json` |
| 15 | - Raw screenshots dir: `./screenshots/raw` |
| 16 | - Framed screenshots dir: `./screenshots/framed` |
| 17 | - Default frame device: `iphone-air` |
| 18 | |
| 19 | ## 1) Create settings JSON first |
| 20 | |
| 21 | Create or update `.asc/shots.settings.json`: |
| 22 | |
| 23 | ```json |
| 24 | { |
| 25 | "version": 1, |
| 26 | "app": { |
| 27 | "bundle_id": "com.example.app", |
| 28 | "project": "MyApp.xcodeproj", |
| 29 | "scheme": "MyApp", |
| 30 | "simulator_udid": "booted" |
| 31 | }, |
| 32 | "paths": { |
| 33 | "plan": ".asc/screenshots.json", |
| 34 | "raw_dir": "./screenshots/raw", |
| 35 | "framed_dir": "./screenshots/framed" |
| 36 | }, |
| 37 | "pipeline": { |
| 38 | "frame_enabled": true, |
| 39 | "upload_enabled": false |
| 40 | }, |
| 41 | "upload": { |
| 42 | "version_localization_id": "", |
| 43 | "device_type": "IPHONE_65", |
| 44 | "source_dir": "./screenshots/framed" |
| 45 | } |
| 46 | } |
| 47 | ``` |
| 48 | |
| 49 | If you intentionally skip framing, set: |
| 50 | - `"frame_enabled": false` |
| 51 | - `"upload.source_dir": "./screenshots/raw"` |
| 52 | |
| 53 | ## 2) Build and run app on simulator |
| 54 | |
| 55 | Use Xcode CLI for build/install/launch: |
| 56 | |
| 57 | ```bash |
| 58 | xcrun simctl boot "$UDID" || true |
| 59 | |
| 60 | xcodebuild \ |
| 61 | -project "MyApp.xcodeproj" \ |
| 62 | -scheme "MyApp" \ |
| 63 | -configuration Debug \ |
| 64 | -destination "platform=iOS Simulator,id=$UDID" \ |
| 65 | -derivedDataPath ".build/DerivedData" \ |
| 66 | build |
| 67 | |
| 68 | xcrun simctl install "$UDID" ".build/DerivedData/Build/Products/Debug-iphonesimulator/MyApp.app" |
| 69 | xcrun simctl launch "$UDID" "com.example.app" |
| 70 | ``` |
| 71 | |
| 72 | Use `xcodebuild -showBuildSettings` if the app bundle path differs from the default location. |
| 73 | |
| 74 | ## 3) Capture screenshots with AXe (or `asc screenshots run`) |
| 75 | |
| 76 | Prefer plan-driven capture: |
| 77 | |
| 78 | ```bash |
| 79 | asc screenshots run --plan ".asc/screenshots.json" --udid "$UDID" --output json |
| 80 | ``` |
| 81 | |
| 82 | Useful AXe primitives during plan authoring: |
| 83 | |
| 84 | ```bash |
| 85 | axe describe-ui --udid "$UDID" |
| 86 | axe tap --id "search_field" --udid "$UDID" |
| 87 | axe type "wwdc" --udid "$UDID" |
| 88 | axe screenshot --output "./screenshots/raw/home.png" --udid "$UDID" |
| 89 | ``` |
| 90 | |
| 91 | Minimal `.asc/screenshots.json` example: |
| 92 | |
| 93 | ```json |
| 94 | { |
| 95 | "version": 1, |
| 96 | "app": { |
| 97 | "bundle_id": "com.example.app", |
| 98 | "udid": "booted", |
| 99 | "output_dir": "./screenshots/raw" |
| 100 | }, |
| 101 | "steps": [ |
| 102 | { "action": "launch" }, |
| 103 | { "action": "wait", "duration_ms": 800 }, |
| 104 | { "action": "screenshot", "name": "home" } |
| 105 | ] |
| 106 | } |
| 107 | ``` |
| 108 | |
| 109 | ## 4) Frame screenshots with `asc screenshots frame` |
| 110 | |
| 111 | The asc CLI pins framing to Koubou `0.18.1`. |
| 112 | Install and verify before running framing steps: |
| 113 | |
| 114 | ```bash |
| 115 | pip install koubou==0.18.1 |
| 116 | kou --version # expect 0.18.1 |
| 117 | # If Koubou reports missing device frames, run once with network access: |
| 118 | kou setup-frames |
| 119 | ``` |
| 120 | |
| 121 | List supported frame device values first: |
| 122 | |
| 123 | ```bash |
| 124 | asc screenshots list-frame-devices --output json |
| 125 | ``` |
| 126 | |
| 127 | Frame one screenshot (defaults to `iphone-air`): |
| 128 | |
| 129 | ```bash |
| 130 | asc screenshots frame \ |
| 131 | --input "./screenshots/raw/home.png" \ |
| 132 | --output-dir "./screenshots/framed" \ |
| 133 | --device "iphone-air" \ |
| 134 | --output json |
| 135 | ``` |
| 136 | |
| 137 | Supported `--device` values: |
| 138 | - `iphone-air` (default) |
| 139 | - `iphone-17-pro` |
| 140 | - `iphone-17-pro-max` |
| 141 | - `iphone-16e` |
| 142 | - `iphone-17` |
| 143 | - `mac` |
| 144 | |
| 145 | ## 5) Upload screenshots with asc |
| 146 | |
| 147 | Generate and review artifacts before upload: |
| 148 | |
| 149 | ```bash |
| 150 | asc screenshots review-generate --framed-dir "./screenshots/framed" --output-dir "./screenshots/review" |
| 151 | asc screenshots review-open --output-dir "./screenshots/review" |
| 152 | asc screenshots review-approve --all-ready --output-dir "./screenshots/review" |
| 153 | ``` |
| 154 | |
| 155 | For reviewed multi-locale sets, prefer the plan/apply flow so existing remote screenshot counts are included before upload: |
| 156 | |
| 157 | ```bash |
| 158 | asc screenshots plan --app "APP_ID" --version "1.2.3" --review-output-dir "./screenshots/review" --output json |
| 159 | asc screenshots apply --app "APP_ID" --version "1.2.3" --review-output-dir "./screenshots/review" --confirm --output json |
| 160 | ``` |
| 161 | |
| 162 | Upload from the configured source directory (default `./screenshots/framed` when framing is enabled): |
| 163 | |
| 164 | ```bash |
| 165 | asc screenshots upload \ |
| 166 | --version-localization "LOC_ID" \ |
| 167 | --path "./screenshots/framed" \ |
| 168 | --device-type "IPHONE_65" \ |
| 169 | --output json |
| 170 | ``` |
| 171 | |
| 172 | List or validate |