/axe-preview:preview <file.swift> [--preview <title|index>] [--reuse-build] [--wait <duration>]from axe-preview
Captures a SwiftUI View preview screenshot using axe CLI. Useful for checking layout or verifying visual changes.
Ships in axe-preview. 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.
Capture a screenshot of a SwiftUI View's #Preview block using axe preview report (preferred) or axe preview.
axe preview reportaxe preview report is preferred because it waits for rendering to complete (--wait, default 10s) and retries on failure. Use this unless you need to select a specific preview from multiple #Preview blocks.
Resolve $ARGUMENTS to a .swift file path. $ARGUMENTS may contain only a View name (e.g. ContentView), so use Glob to find the actual path (e.g. TodoApp/ContentView.swift).
Run axe preview report to capture the preview as a PNG image:
axe preview report <path/to/File.swift> --output <output.png>
Display the captured image using the Read tool.
#Preview blocks, --output must be a directory. In that case, each screenshot is saved as <basename>--preview-<index>.png. Display all captured images.Describe what you see in the preview to the user.
axe preview (oneshot)Use axe preview when you need to select a specific preview from a file that contains multiple #Preview blocks, via --preview <title|index>.
Note: oneshot mode captures immediately after the app signals readiness, with no rendering delay. This may result in a blank screenshot for views that require time to render.
axe preview <path/to/File.swift> > <output.png>
--wait <duration> — Rendering delay before screenshot capture (default 10s, report only). Reduce for simple views, increase for complex ones.--reuse-build — Skip xcodebuild and reuse artifacts from a previous build. Useful when capturing multiple previews in succession or when only the View source changed.--preview <title|index> — Select a specific preview by title or index (oneshot only).$ERR_LOG and report the error to the user. Common causes:
#Preview block.axerc or --scheme not specifiedaxe or idb_companion not installedRun this if the command fails because axe is not found::
curl -fsSL https://raw.githubusercontent.com/k-kohey/axe/main/install.sh | sh
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
swiftui-preview, screenshot-capture, axe-cli, visual-testing
5 skills in this plugin
/fix-uiIteratively fix a SwiftUI View to match a design image. Captures previews with axe, compares against the target design, and modifies the code until the UI matches. Use when the user provides a design image and wants the View adjusted to match it./inspect-viewInspect the view hierarchy of a running simulator app using axe view. Use when debugging layout issues, investigating view structure, or diagnosing UI problems in a running app./preview-reportCapture previews of multiple SwiftUI files and generate a visual report. Use when the user wants to see all previews at once, create PR documentation, or batch-check UI across files./ui-reviewCapture a SwiftUI preview and review its UI/UX quality. Checks layout, spacing, HIG compliance, accessibility, and visual consistency. Use when the user asks for UI feedback or wants a design review of a View.npx claudepluginhub k-kohey/axe --plugin axe-previewOther plugins' skills for the same job