Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By Iron-Hamv2.0.7MITIn 1 marketplace
Captures SwiftUI previews as screenshots so Claude Code can visually analyze UI components in Xcode projects, SPM packages or standalone Swift files. Needs macOS with Xcode and an iOS Simulator.
Trending plugins
7-day copy clicks
Claude loads one when your task matches it, or you run it by name.
1 marketplace, most starred first
ios-simulator, swift-previews, screenshot-capture, spm, visual-analysis, preview, simulator
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
A CLI toolset for building and capturing SwiftUI previews programmatically. Designed to work with AI coding assistants (Claude Code and Cursor) for visual analysis of UI components.
Install via the Claude Code plugin marketplace:
/plugin marketplace add Iron-Ham/XcodePreviews
/plugin install preview-build@XcodePreviews
git clone https://github.com/Iron-Ham/XcodePreviews.git ~/XcodePreviews
Copy the skill definition to your user-level commands directory:
mkdir -p ~/.claude/commands
cp ~/XcodePreviews/.claude/commands/preview.md ~/.claude/commands/
Note: The manual install expects scripts at
~/XcodePreviews. If you cloned to a different location, setPREVIEW_BUILD_PATH:export PREVIEW_BUILD_PATH=/path/to/XcodePreviews
Upgrading from
Claude-XcodePreviews? The old path~/Claude-XcodePreviewsstill works — the skill files fall back to it automatically. You can rename your clone at any time, or just leave it.
git clone https://github.com/Iron-Ham/XcodePreviews.git ~/XcodePreviews
Copy the skill to your user-level skills directory:
mkdir -p ~/.cursor/skills/preview
cp ~/XcodePreviews/.cursor/skills/preview/SKILL.md ~/.cursor/skills/preview/
If you want the preview toolkit context always available in a specific project, copy the rule to that project's .cursor/rules/ directory:
mkdir -p /path/to/your/project/.cursor/rules
cp ~/XcodePreviews/.cursor/rules/preview.mdc /path/to/your/project/.cursor/rules/
Note: Like the Claude Code install, this expects scripts at
~/XcodePreviews. SetPREVIEW_BUILD_PATHto override:export PREVIEW_BUILD_PATH=/path/to/XcodePreviews
The preview script auto-detects the best approach:
# Preview a file in an Xcode project
./scripts/preview path/to/MyView.swift
# Preview a file in an SPM package
./scripts/preview path/to/Package/Sources/Module/MyView.swift
# Specify output path
./scripts/preview MyView.swift --output ~/Desktop/preview.png
# Capture current simulator
./scripts/preview --capture-only
For standalone Swift files (system imports only):
./scripts/preview-minimal.sh MyView.swift
| 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 |
--keep | Keep temporary files after capture |
#Preview { } contentPreviewHost target into the projectAfter installation, use the /preview command:
/preview path/to/MyView.swift
After installing the skill, ask the agent to preview a SwiftUI view:
Preview the file path/to/MyView.swift
In both cases, the assistant will:
Codex can use the same scripts through a Codex skill.
export PREVIEW_BUILD_PATH=/absolute/path/to/XcodePreviews
mkdir -p ~/.codex/skills/public/xcode-preview-capture
cp -R "$PREVIEW_BUILD_PATH"/.codex/skills/xcode-preview-capture/* \
~/.codex/skills/public/xcode-preview-capture/
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub iron-ham/xcodepreviews --plugin preview-buildPlugins from other owners that cover similar ground