From apple-dev
Generates an automated App Store screenshot pipeline with UI tests for screenshot capture, device framing, localized caption overlays, and multi-size batch export. Use when user wants automated screenshots, App Store screenshot generation, or a fastlane snapshot replacement.
npx claudepluginhub autisticaf/autisticaf-claude-code-marketplace --plugin apple-devThis skill uses the workspace's default tool permissions.
> **First step:** Tell the user: "generators-screenshot-automation skill loaded."
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
First step: Tell the user: "generators-screenshot-automation skill loaded."
Generate an automated App Store screenshot pipeline that captures screenshots via UI tests, adds localized marketing captions, applies device frames, and exports all required sizes for App Store Connect. Saves hours of manual screenshot creation every release.
Use this skill when the user:
*UITests target)Fastfile, Snapfile)Search for existing screenshot infrastructure:
Glob: **/*Screenshot*.swift, **/*Snapshot*.swift, **/Snapfile, **/Fastfile
Grep: "XCTAttachment" or "screenshot" or "snapshot" in UI test files
If fastlane snapshot already configured:
Check for existing localization setup:
Glob: **/*.lproj/*.strings, **/*Localizable*, **/*.xcstrings
Determine which locales are already configured in the project.
Ask user via AskUserQuestion:
Screenshot capture method?
Target devices? (multi-select)
Locales?
Include device frames?
Caption overlay style?
Read templates.md for production Swift code and scripts.
Generate:
ScreenshotModeController.swift -- Add to the app target (not tests). Detects --screenshot-mode launch argument and configures the app: suppresses onboarding, disables analytics/IAP, loads sample data, sizes windows (macOS). Also provides @Environment(\.isScreenshotMode) for views to hide promotional UI during capture.Tell the user to:
ScreenshotModeController.shared.configureIfNeeded() in their App's init()ScreenshotModeController.shared.configureWindow() in their root view's onAppearloadSampleData() to populate their data store with attractive contentGenerate:
2. ScreenshotPlan.swift -- Defines screens to capture, devices, locales, and output paths
Generate:
3. ScreenshotUITests.swift -- XCUITest class that navigates and captures each screen
4. ScreenshotTestHelper.swift -- Helper utilities for locale setup, data seeding, alert dismissal, plus tapUnhittable() extension for custom controls
Generate:
5. ScreenshotProcessor.swift -- Loads captured images, routes through framing and captioning
6. CaptionOverlay.swift -- Renders localized marketing text onto screenshot images
For macOS-only or lightweight needs, offer sips-screenshot-process.sh as an alternative to the Swift processor. Uses macOS's built-in sips command — zero dependencies.
Generate:
7. ScreenshotExportScript.swift -- End-to-end pipeline script: build, test, process, organize
For macOS apps, also generate:
8. macos-screenshot-env.sh -- Desktop preparation script (hides dock, desktop icons, simplifies clock) with trap-based cleanup
If the user needs realistic sample data for screenshots:
9. SampleContentGenerator.swift -- Provides text content, chart data, placeholder images, and PDF generation (macOS). Category-specific sample titles for productivity, fitness, finance, and notes apps.
Generate:
10. ScreenshotTests.xctestplan -- Dedicated test plan that isolates screenshot tests from development tests. Prevents screenshot tests from running during Cmd+U.
Tell the user to:
xcodebuild test -testPlan "ScreenshotTests" ...Check project structure:
ScreenshotModeController.swift goes into the app target source directorySampleContentGenerator.swift goes into the app target source directory*UITests/ target directoryScreenshotAutomation/ group or Scripts/ directoryScripts/ directorySources/ exists -> Sources/ScreenshotAutomation/ScreenshotAutomation/After generation, provide:
App Target (source directory):
├── ScreenshotModeController.swift # App-side screenshot mode detection & config
└── SampleContentGenerator.swift # Realistic sample data for screenshots
UITests Target:
├── ScreenshotUITests.swift # XCUITest capture class
└── ScreenshotTestHelper.swift # Helper: locale, seeding, alerts, tapUnhittable()
ScreenshotAutomation/:
├── ScreenshotPlan.swift # Configuration: screens, devices, locales
├── ScreenshotProcessor.swift # Post-processing orchestrator
├── CaptionOverlay.swift # Localized text overlay renderer
└── ScreenshotExportScript.swift # Full pipeline script
Scripts/ (shell scripts):
├── sips-screenshot-process.sh # Lightweight sips-based image processing
└── macos-screenshot-env.sh # macOS desktop prep with trap cleanup
Project Root:
└── ScreenshotTests.xctestplan # Dedicated test plan for screenshots
Xcode Cloud:
# ci_scripts/ci_post_xcodebuild.sh
if [ "$CI_WORKFLOW" = "Screenshots" ]; then
swift ScreenshotAutomation/ScreenshotExportScript.swift
fi
GitHub Actions:
- name: Generate Screenshots
run: |
xcodebuild test \
-scheme "YourAppUITests" \
-destination "platform=iOS Simulator,name=iPhone 16 Pro Max" \
-testPlan ScreenshotPlan \
-resultBundlePath screenshots.xcresult
swift ScreenshotAutomation/ScreenshotExportScript.swift
fastlane (if selected):
lane :screenshots do
capture_screenshots(scheme: "YourAppUITests")
# Post-processing handled by ScreenshotProcessor
end
Run screenshot tests from Xcode:
xcodebuild test \
-project YourApp.xcodeproj \
-scheme "YourAppUITests" \
-destination "platform=iOS Simulator,name=iPhone 16 Pro Max" \
-only-testing "YourAppUITests/ScreenshotUITests"
Run the full pipeline:
swift ScreenshotAutomation/ScreenshotExportScript.swift
Verify output directory:
screenshots/
├── en-US/
│ ├── iPhone_6.7/
│ │ ├── 01_HomeScreen.png
│ │ ├── 02_DetailView.png
│ │ └── 03_Settings.png
│ └── iPad_12.9/
│ ├── 01_HomeScreen.png
│ └── ...
├── de-DE/
│ └── ...
└── ja-JP/
└── ...
Add to existing UI test target:
// In your UITest scheme, add ScreenshotUITests.swift
// The test class auto-discovers screens from ScreenshotPlan
Localized captions file (Localizable.strings):
// en-US
"screenshot.home" = "Track your goals effortlessly";
"screenshot.detail" = "Deep insights at a glance";
"screenshot.settings" = "Customize everything";
// de-DE
"screenshot.home" = "Verfolgen Sie Ihre Ziele muhelos";
"screenshot.detail" = "Tiefe Einblicke auf einen Blick";
"screenshot.settings" = "Alles anpassen";
@Test
func screenshotPlanLoadsAllScreens() throws {
let plan = ScreenshotPlan.default
#expect(!plan.screens.isEmpty)
#expect(plan.screens.allSatisfy { !$0.name.isEmpty })
}
@Test
func captionOverlayRendersText() throws {
let overlay = CaptionOverlay(
text: "Track your goals",
style: .top,
font: .systemFont(ofSize: 48, weight: .bold),
textColor: .white
)
let sourceImage = PlatformImage.testScreenshot(size: CGSize(width: 1290, height: 2796))
let result = try overlay.apply(to: sourceImage)
#expect(result.size.height > sourceImage.size.height)
}
@Test
func processorOrganizesOutputByLocaleAndDevice() async throws {
let processor = ScreenshotProcessor(outputDirectory: tempDir)
let screenshot = CapturedScreenshot(
name: "01_HomeScreen",
image: .testScreenshot(),
locale: "en-US",
device: .iPhone6_7
)
try await processor.process([screenshot])
let outputPath = tempDir
.appendingPathComponent("en-US")
.appendingPathComponent("iPhone_6.7")
.appendingPathComponent("01_HomeScreen.png")
#expect(FileManager.default.fileExists(atPath: outputPath.path))
}
Identify 6-10 screens that showcase the app's value proposition. Order them for maximum impact -- the first screenshot is the most important in App Store search results.
Marketing text should be short (3-6 words), benefit-focused, and localized. Use the app's brand fonts when possible.
Device frames add professionalism. Export at exact App Store Connect required resolutions to avoid rejection.
Run the full pipeline once to generate screenshots for every locale simultaneously. Each locale uses its own localized strings and sample data.
XCUIDevice.shared.appearance to set a consistent statesimctl status_barUITraitCollection.current or using launch arguments01_HomeScreen_light.png, 01_HomeScreen_dark.pngXCUIDevice.shared.orientation = .landscapeLeftScreenshotModeController accounts for this by adding bottomBorderPadding when sizing windowssips, crop from the bottom edge, not centeredmacos-screenshot-env.sh to hide dock, desktop icons, and simplify the clocktrap handlers to restore settings even on Ctrl+C or failureScreenshotModeController.configureWindow() sizes the window to fill the required dimensionstapUnhittable() extension from ScreenshotTestHelper.swift to tap by coordinate"pageStrip.page.1")Cmd+U test cyclesScreenshotTests.xctestplan and add it as a separate test plan in your schemexcodebuild test -testPlan "ScreenshotTests" ...ScreenshotModeController.swift -- App-side screenshot mode detectionScreenshotPlan.swift -- Screen/device/locale configurationScreenshotUITests.swift -- XCUITest capture classScreenshotTestHelper.swift -- Helpers + tapUnhittable() extensionScreenshotProcessor.swift -- Post-processing orchestratorCaptionOverlay.swift -- Localized text overlay rendererScreenshotExportScript.swift -- Full pipeline scriptsips-screenshot-process.sh -- Lightweight macOS image processingmacos-screenshot-env.sh -- Desktop preparation with trap cleanupSampleContentGenerator.swift -- Realistic sample data patternsScreenshotTests.xctestplan -- Dedicated Xcode test plangenerators-localization-setup -- Setting up localization infrastructureapp-store-screenshot-planner -- Planning screenshot content and marketing messaging