.cursor/skills/preview/SKILL.md
Build and capture SwiftUI previews for visual analysis. Use when the user asks to preview a SwiftUI view, capture a simulator screenshot, or visually inspect iOS UI components. Supports Xcode projects, SPM packages, and standalone Swift files.
npx skillsauth add iron-ham/xcodepreviews preview-buildInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Build SwiftUI views and capture screenshots of their rendered output for visual analysis.
Scripts are located at ${PREVIEW_BUILD_PATH:-$HOME/XcodePreviews}/scripts/
Compatibility: If
~/XcodePreviewsdoesn't exist, fall back to~/Claude-XcodePreviews(legacy name). ThePREVIEW_BUILD_PATHenvironment variable overrides both.
Auto-detects project type and uses the best approach:
"${PREVIEW_BUILD_PATH:-$HOME/XcodePreviews}"/scripts/preview \
<path-to-file.swift> \
--output /tmp/preview.png
"${PREVIEW_BUILD_PATH:-$HOME/XcodePreviews}"/scripts/capture-simulator.sh \
--output /tmp/preview-capture.png
Fast builds by injecting a minimal PreviewHost target (handled automatically by the unified script):
"${PREVIEW_BUILD_PATH:-$HOME/XcodePreviews}"/scripts/preview \
<path-to-file.swift> \
--project <path.xcodeproj> \
--output /tmp/preview.png
Auto-detected from Package.swift in parent directories:
"${PREVIEW_BUILD_PATH:-$HOME/XcodePreviews}"/scripts/preview \
<path-to-file.swift> \
--output /tmp/preview.png
Build a standalone Swift file with system frameworks only:
"${PREVIEW_BUILD_PATH:-$HOME/XcodePreviews}"/scripts/preview \
<path-to-file.swift> \
--output /tmp/preview.png
When the user asks to preview a SwiftUI view:
Identify the target: Determine what needs to be previewed (Swift file, project scheme, or current simulator state)
Build and capture: Run the appropriate script
Read and analyze: Use the Read tool to view the captured PNG at /tmp/preview.png
Report findings:
| Option | Description |
|--------|-------------|
| --project <path> | Xcode project file |
| --workspace <path> | Xcode workspace file |
| --package <path> | SPM Package.swift path |
| --module <name> | Target module (auto-detected) |
| --simulator <name> | Simulator name (default: iPhone 17 Pro) |
| --output <path> | Output screenshot path |
| --verbose | Show detailed build output |
sim-manager.sh boot "iPhone 17 Pro"development
# Xcode Preview Capture Skill <skill-definition> name: preview description: Build and capture Xcode/SwiftUI previews for visual analysis invocation: /preview </skill-definition> ## Overview This skill allows you to build SwiftUI views and capture screenshots of their rendered output for visual analysis. It supports: - Building standalone Swift files containing SwiftUI views - Building views from existing Xcode projects - Building views from SPM packages - Capturing the current simulator scre
development
Build and capture SwiftUI previews for visual analysis in Codex. Use when asked to preview a Swift file, capture simulator UI, or inspect visual output from SwiftUI views.
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.