Borrowing it
Nothing to install: this file belongs to Iron-Ham/XcodePreviews. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Iron-Ham/XcodePreviews/main/.cursor/skills/preview/SKILL.mdgit clone --depth 1 https://github.com/Iron-Ham/XcodePreviewsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/iron-ham/xcodepreviews/preview)<a href="https://agentmods.dev/skills/iron-ham/xcodepreviews/preview"><img src="https://agentmods.dev/badge/skills/iron-ham/xcodepreviews/preview/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/iron-ham/xcodepreviews/preview"><img src="https://agentmods.dev/badge/skills/iron-ham/xcodepreviews/preview.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00052 | $0.00772 |
| Opus 5.5 | $0.00021 | $0.00309 |
| Sonnet 5.5 | $0.00010 | $0.00154 |
| Haiku 4.5 | $0.00005 | $0.00077 |
Grade A, and why
preview-build scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Xcode Preview Capture Skill
Build SwiftUI views and capture screenshots of their rendered output for visual analysis.
Installation Path
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.
Available Commands
Unified Preview (Recommended)
Auto-detects project type and uses the best approach:
"${PREVIEW_BUILD_PATH:-$HOME/XcodePreviews}"/scripts/preview \
<path-to-file.swift> \
--output /tmp/preview.png
Quick Capture (Current Simulator)
"${PREVIEW_BUILD_PATH:-$HOME/XcodePreviews}"/scripts/capture-simulator.sh \
--output /tmp/preview-capture.png
Xcode Project with #Preview
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
SPM Package Preview
Auto-detected from Package.swift in parent directories:
"${PREVIEW_BUILD_PATH:-$HOME/XcodePreviews}"/scripts/preview \
<path-to-file.swift> \
--output /tmp/preview.png
Standalone Swift File
Build a standalone Swift file with system frameworks only:
"${PREVIEW_BUILD_PATH:-$HOME/XcodePreviews}"/scripts/preview \
<path-to-file.swift> \
--output /tmp/preview.png
Workflow
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:
- Layout: Structure and arrangement
- Visual elements: Buttons, text, images
- Styling: Colors, fonts, spacing
- Issues: Alignment, overflow, accessibility
- Suggestions: Improvements
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 101 lines · 52 tokens per session scan A 849f3ee61ca0
preview-build is a skill published in the GitHub repository Iron-Ham/XcodePreviews (151 stars, last pushed 5mo ago), licensed MIT. It adds 52 tokens to every session and 772 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
preview-build compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| preview-buildIron-Ham/XcodePreviews | Skill | 151 | 5mo ago | MIT | A | 52 | Claude Code, Cursor |
| orca-emulator-androidstablyai/orca | Skill | 157k | today | MIT | A | 102 | Claude Code, Codex |
| android-multiprofilechromium/chromium | Skill | 26k | today | BSD-3-Clause | A | 73 | Claude Code, Codex |
| glance-canonical-layoutsandroid/skills | Skill | 11k | today | Apache-2.0 | A | 56 | Claude Code |
| android-tombstone-symbolicationdotnet/skills | Skill | 6.5k | today | MIT | A | 176 | Claude Code |
| dogfoodcallstack/agent-device | Skill | 5.6k | today | MIT | A | 55 | Claude Code |
| winapp-mauimicrosoft/winappCli | Skill | 1.4k | today | MIT | A | 68 | Claude Code |