/prefire:swiftui-previewfrom prefire
Renders SwiftUI #Preview blocks as PNG images using Prefire, enabling visual layout checks across devices, color schemes, and Dynamic Type sizes without Xcode Previews.
Ships in prefire. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Prefire builds the app and runs its generated snapshot tests in render mode, so every #Preview
comes back as a PNG of the current code. Use it to check your own UI changes instead of guessing.
list_previews once to learn the preview names and where each is declared.render_previews with only the previews you touched, for example
{"previews": ["Sign in"], "devices": ["iPhone 16 Pro"], "color_scheme": "dark"}.
A render builds the project, so it takes as long as a test run: ask for few previews.Before calling a UI change done, render it at least once. For layout changes, also check a small
phone (iPhone SE (3rd generation)), an iPad, dark, and accessibility3 Dynamic Type.
image path, size, device, source
(file:line), userStory, state and error. notes lists names that matched nothing and
devices that were ignored.max_images (default 6) are not attached; read them from their paths.isError: true with "no snapshot test ran in render mode" means the tests are not set up or
were generated by an older Prefire: see Setup.xcodebuild.log in the
output directory, fix the build, and render again. The last good render is kept.Install the CLI: brew install barredewe/prefire/prefire.
The project needs Prefire's snapshot tests: the Prefire package with PrefireTestsPlugin on a
test target. See https://github.com/BarredEwe/Prefire#-quick-start.
.prefire.yml in the project folder needs a render_configuration:
render_configuration:
scheme: MyApp # scheme whose tests include the snapshot tests
project: MyApp.xcodeproj # or workspace: MyApp.xcworkspace
destination: platform=iOS Simulator,name=iPhone 16 # platform=macOS for a Mac app
test_target: MyAppSnapshotTests # runs only the tests of the previews asked for
Without the MCP server, the same works from a shell: prefire render "Sign in" --device iPad,
prefire render --list, prefire board.
Full guide: https://github.com/BarredEwe/Prefire/blob/main/Documentation/AI.md
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
swiftui, prefire, ui-preview, snapshot-testing, visual-testing
npx claudepluginhub barredewe/prefire --plugin prefireOther plugins' skills for the same job