/axe-preview:fix-ui <file.swift> <design-image-path>from axe-preview
Iteratively fixes a SwiftUI View to match a target design image by capturing previews with axe, comparing differences, and editing code.
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, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Iteratively modify a SwiftUI View until its preview matches a target design image.
$0: Path to the SwiftUI source file (.swift)$1: Path to the design image (PNG, JPG, etc.)$0 may contain only a View name (e.g. ContentView) instead of a file path. Resolve it to a .swift path (e.g. TodoApp/ContentView.swift) using Glob.
Read the design image at $1 using the Read tool to understand the target appearance.
Read the SwiftUI source file to understand the current implementation.
axe preview report "$0" --output <output.png>
axe preview report is preferred because it waits for rendering to complete and retries on failure.
If the file has multiple #Preview blocks, --output file.png will fail (it requires exactly one preview). In that case:
--output to capture all, then pick the relevant oneaxe preview "$0" --preview <title|index> (oneshot, no render wait)Read the captured image to see the current appearance.
Compare the current preview against the design image. Focus on:
Make targeted edits to the SwiftUI source file to address the identified differences. Prioritize the most visually impactful changes first.
Capture a new preview after the edits. Use --reuse-build to skip rebuilding since only the View source changed:
axe preview report "$0" --output <output.png> --reuse-build
Read the new image and compare against the design.
Repeat steps 5-7 until the preview closely matches the design image. Stop after at most 5 iterations. If the design still does not match, report remaining differences to the user.
Show the final preview image and summarize all changes made to the source file.
#Preview blocks, use --preview <title|index> to target the correct oneRun 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
5 skills in this plugin
/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./previewCapture a SwiftUI preview screenshot using axe CLI. Use when the user wants to see the current appearance of a SwiftUI View, check layout, or verify changes visually./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