From axe-preview
Captures SwiftUI preview screenshots and reviews UI/UX for layout, spacing, HIG compliance, accessibility, typography, color contrast, and consistency. Use for UI feedback or View design reviews.
npx claudepluginhub k-kohey/axe --plugin axe-previewThis skill is limited to using the following tools:
Capture a preview screenshot and perform a comprehensive UI/UX review.
Captures screenshots of SwiftUI #Preview blocks using axe CLI. Visualize View appearance, check layouts, and verify visual changes.
Reviews SwiftUI and Swift code for modern APIs, best practices, performance, accessibility, data flow, navigation, and Clean Architecture.
Reviews SwiftUI code for view composition, state management (@State, @Binding, @Observable), performance, and accessibility. Use for .swift files with SwiftUI views or UI code.
Share bugs, ideas, or general feedback.
Capture a preview screenshot and perform a comprehensive UI/UX review.
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).
axe preview report <path/to/File.swift> --output <output.png>
axe preview report is preferred over oneshot axe preview because it waits for rendering to complete (--wait, default 10s) 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 review eachaxe preview --preview <title|index> (oneshot, no render wait)Read the captured image with the Read tool.
Read the SwiftUI source file (resolved in the previous step) to understand the implementation alongside the visual output.
Evaluate the preview image and source code against these criteria:
.foregroundStyle / .background) vs hardcoded values for Dark Mode support.font(.body) etc.).accessibilityLabel, .accessibilityHint)Present findings organized by severity:
For each finding, reference the specific line in the source code and suggest a concrete fix.
Run this if the command fails because axe is not found::
curl -fsSL https://raw.githubusercontent.com/k-kohey/axe/main/install.sh | sh