SwiftUI Agent Skill: The Complete Guide to Writing Better SwiftUI with AI
By Paul Hudson (Hacking with Swift). An agent skill called SwiftUI Pro that helps Claude Code, Codex, Gemini, and Cursor write smarter, simpler, and more modern SwiftUI. It targets the exact mistakes LLMs make: invisible VoiceOver buttons, deprecated API, performance problems. 1,300+ stars in 3 days.
What Is SwiftUI Agent Skill?
An Agent Skill (SKILL.md format) that injects years of SwiftUI knowledge into AI coding agents. Built on Paul Hudson's existing SwiftAgents AGENTS.md file, packaged in the Agent Skills format for universal compatibility.
- Skill Name: SwiftUI Pro
- License: MIT
- Stars: 1,300+ ⭐ (in 3 days)
- Forks: 36
- By: Paul Hudson — Hacking with Swift
The Problem It Solves
AI coding agents generate SwiftUI code with predictable mistakes:
| LLM Mistake | Impact |
|---|---|
| Invisible VoiceOver buttons | Accessibility broken for visually impaired users |
| Deprecated API usage | Code breaks on newer iOS versions |
| Performance anti-patterns | UI stutters, excessive re-renders |
| Wrong modifiers order | Layout breaks or unexpected behavior |
| Missing accessibility labels | App fails accessibility audits |
SwiftUI Pro addresses all of these with rules built from thousands of hours of real-world SwiftUI development.
Installation
Via npx (Recommended)
npx skills add https://github.com/twostraws/swiftui-agent-skill --skill swiftui-pro
During installation, select which agents (Claude Code, Codex, Gemini, Cursor) and scope (project-level or global).
Manual
Clone the repo and copy the swiftui-pro directory to your agent's skills location.
Usage
Claude Code
/swiftui-pro
/swiftui-pro Check for deprecated API
/swiftui-pro Focus on accessibility
OpenAI Codex
$swiftui-pro
$swiftui-pro Focus on accessibility
Natural Language
Use the SwiftUI Pro skill to look for performance problems in this project.
What It Covers
- API Usage — Flags deprecated APIs, suggests modern alternatives
- Design Patterns — Proper MVVM, environment objects, state management
- Performance — Avoids excessive re-renders, body recalculations
- Accessibility — VoiceOver labels, dynamic type, reduced motion
- Edge Cases — The things LLMs consistently get wrong
SwiftUI Agent Skill vs Alternatives
Category: This tool is a SwiftUI-specific AI coding agent skill.
| Feature | SwiftUI Agent Skill | SwiftAgents | SwiftFormat |
|---|---|---|---|
| Focus | SwiftUI AI skill | Swift/SwiftUI AGENTS.md | Swift code formatting |
| Stars | 1.3K ⭐ (3 days!) | 969 ⭐ | 8.7K ⭐ |
| License | MIT | None specified | MIT |
| By | Paul Hudson | Paul Hudson | Nick Lockwood |
| Format | Agent Skills (SKILL.md) | AGENTS.md | CLI + Xcode Extension |
| Agent Compatibility | Claude Code, Codex, Gemini, Cursor | Agent-dependent | ❌ Not an agent skill |
| npx Install | ✅ | ❌ Manual | ❌ |
| SwiftUI-Specific | ✅ Focused | ✅ Swift + SwiftUI | ❌ All Swift |
| Deprecated API Detection | ✅ | ✅ | ❌ |
| Accessibility Checks | ✅ VoiceOver, labels | ✅ | ❌ |
| Performance Rules | ✅ | ✅ | ❌ |
| Code Formatting | ❌ | ❌ | ✅ Core function |
| Xcode Extension | ❌ | ❌ | ✅ |
| Invocable Commands | ✅ /swiftui-pro $swiftui-pro | ❌ Auto-loaded | ❌ |
| Partial Reviews | ✅ Targeted prompts | ❌ | ✅ Rule selection |
| Token-Efficient | ✅ Concise by design | ✅ | N/A |
When to choose SwiftUI Agent Skill: You want your AI coding agent (Claude Code, Codex, Gemini, Cursor) to write better SwiftUI — catching deprecated APIs, fixing accessibility, avoiding performance problems. Built by Paul Hudson from thousands of hours of SwiftUI experience.
When to choose SwiftAgents: You want the predecessor AGENTS.md file by the same author. Less portable (no Agent Skills format), but covers Swift + SwiftUI together. Both by Paul Hudson.
When to choose SwiftFormat: You want code formatting (indentation, spacing, syntax), not AI-guided design/architecture/accessibility improvements. A traditional linter, not an agent skill.
Conclusion
Paul Hudson distilled thousands of hours of SwiftUI expertise into one agent skill. SwiftUI Pro targets exactly what LLMs get wrong — deprecated APIs, broken accessibility, performance anti-patterns — and delivers it in the universal Agent Skills format. One npx command, and Claude Code, Codex, Gemini, or Cursor instantly write better SwiftUI. 1,300 stars in 3 days from the Swift community says everything.
Explore SwiftUI Agent Skill on GitHub
