k-kohey/axe/fix-ui
Claude Code and agent skill by k-kohey/axe
- community
Checking that the SKILL.md file is still in the repository.
Iteratively 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.
Install
npx vskill@latest install k-kohey/axe/fix-uiSKILL.md
Design-Driven UI Fix Loop
Iteratively modify a SwiftUI View until its preview matches a target design image.
Inputs
$0: Path to the SwiftUI source file (.swift)$1: Path to the design image (PNG, JPG, etc.)
Procedure
1. Resolve inputs
$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.
2. Read the design target
Read the design image at $1 using the Read tool to understand the target appearance.
3. Read the source code
Read the SwiftUI source file to understand the current implementation.
4. Capture the current preview
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:
- Use a directory as
--outputto capture all, then pick the relevant one - Or fall back to
axe preview "$0" --preview <title|index>(oneshot, no render wait)
Read the captured image to see the current appearance.
5. Compare and identify differences
Compare the current preview against the design image. Focus on:
- Layout structure (VStack/HStack/ZStack arrangement)
- Spacing and padding
- Font sizes and weights
- Colors and backgrounds
- Corner radius and borders
- Image sizing and aspect ratios
- Text content and alignment
6. Edit the source code
Make targeted edits to the SwiftUI source file to address the identified differences. Prioritize the most visually impactful changes first.
7. Re-capture and verify
Capture a new preview after the edits. Use --reuse-build to skip rebuilding since only the View source changed:
Read the new image and compare against the design.
8. Iterate
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.
9. Report
Show the final preview image and summarize all changes made to the source file.
Guidelines
- Make minimal, focused changes per iteration
- Prefer SwiftUI modifiers over restructuring the view hierarchy
- If the file has multiple
#Previewblocks, use--preview <title|index>to target the correct one - If the design requires assets (images, custom fonts) not present in the project, note this to the user
- If the design cannot be perfectly replicated due to platform constraints, explain the limitations
Prerequisites
Run this if the command fails because axe is not found::
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingclaude-plugin/skills/fix-ui/SKILL.md
Popularity
- Repository stars
- 67
- Repository forks
- 4
- 7-day trend score
- 21
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/k-kohey/axe/fix-ui)