Simulator Screenshot
Overview
Use this skill to capture screenshots from iOS Simulator or Android Emulator via a single script with consistent JSON output. It supports listing devices, selecting by name or ID, and saving screenshots to a chosen path. Useful for verifying UI changes, debugging layouts, or documenting app states during development.
If user is working on iOS/Android App use this tool to verify visual aspects by capturing simulator/emulator screenshots on demand.
Quick Start
Use scripts/simulator-screenshot.sh from this skill folder.
# List iOS simulators (JSON)
scripts/simulator-screenshot.sh ios --list --json
# Capture from the booted iOS simulator
scripts/simulator-screenshot.sh ios ./screenshot.png --json
# Capture from a specific iOS simulator by name
scripts/simulator-screenshot.sh ios ./screenshot.png --id "iPhone 15 Pro" --json
# List Android emulators/devices (JSON)
scripts/simulator-screenshot.sh android --list --json
# Capture from a specific Android emulator by serial
scripts/simulator-screenshot.sh android ./screenshot.png --id emulator-5554 --json
Workflow
Pre steps:
- If user have not specified location to save screenshot, create
agent_screenshotsfolder in the current directory. - Generate names for screenshots basing on context of usage eg.
login_screen-ios.png,settings_page-ios.png. - Use
--max-size 1024unless the user specifies another size.
Main steps:
- Choose platform:
iosorandroid. - If device is unknown, run
--list --jsonand pick a device:- iOS: use device name or UDID.
- Android: use running device serial (e.g.,
emulator-5554).
- Capture with optional
--idand an output path, including--max-size 1024unless specified otherwise. - Parse JSON output and check
statusforsuccessorerror.
Output Notes
- Always pass
--jsonfor machine-readable output. - Success JSON includes
path,platform,device_id(if provided), andtimestamp. - Error JSON includes
message,platform, andtimestamp.
Requirements
- iOS: macOS with Xcode Command Line Tools and
jq. - Android: Android SDK
adbin PATH andjq. Optionalemulatorfor listing AVDs.