Aug 28, 2026
swiftui-agent-skill: A SwiftUI Expert Skill Pack for Claude Code, Codex, and Cursor
A 4.6k-star agent skill that steers AI coding assistants toward modern, accessible, performant SwiftUI by encoding API guidance, design rules, and the specific mistakes LLMs make — installable into Claude Code, Codex, Gemini, Cursor, or any Agent Skills–format tool.
LLMs writing SwiftUI tend to reach for the APIs they saw most in training data — which often means deprecated navigation paths, accessibility regressions, and animation patterns that look fine but compile to expensive work. twostraws/swiftui-agent-skill (from Paul Hudson of Hacking with Swift) packages the rules for writing modern, simple, accessible SwiftUI into an Agent Skill you can drop into Claude Code, Codex, Gemini, Cursor, or any tool that reads the Agent Skills format.
Why This Skill Matters
The README frames the skill as covering navigation, layout, animations, state management, VoiceOver, deprecated APIs, and "the mistakes LLMs actually make" — invisible-to-VoiceOver buttons, surprise perf costs, soft-deprecated API surfaces. The skill targets selective triggers so you can scope a review (for example: accessibility only, or performance only) instead of always running the full pass.
Sister skills exist for adjacent areas (SwiftData, Concurrency, Testing) but are not bundled here. The skill uses the standard Agent Skills format and is portable across Claude Code, Codex, Gemini, Cursor, and other compatible tools. The repo is at 4.6k stars, 166 forks, 17 commits on main, 8 open issues, 3 open PRs — actively maintained. License is MIT, contributions must also be MIT.
Installation
The standard npx skills install handles most tools:
npx skills add https://github.com/twostraws/swiftui-agent-skill --skill swiftui-pro
For Claude Code specifically, the marketplace variant is the recommended path:
/plugin marketplace add twostraws/SwiftUI-Agent-Skill
/plugin install swiftui-pro@swiftui-agent-skill
The installer requires Node. If your machine lacks it:
brew install node
For Xcode installation, the repo links a YouTube walkthrough (the README does not paste the Xcode steps inline).
Real Workflow: Audit a SwiftUI Project for Deprecated APIs
You are about to ship a SwiftUI app and want a last-pass review for any deprecated patterns before release. The skill has a selective trigger for that exact scope.
Step 1. Open Claude Code at the project root with the skill installed. Run:
/swiftui-pro Check for deprecated API
Step 2. The skill activates and scans the project. Expect it to flag soft-deprecated navigation patterns, animation APIs that compile to expensive work, and accessibility regressions.
Step 3. For each finding, the skill produces a fix snippet. Apply the ones that match your intent and re-run if you make large changes to the file.
Step 4. For a focused scope, prefix with the area you care about. For example:
/swiftui-pro Focus on accessibility
The skill narrows its audit to VoiceOver labels, hit areas, and Dynamic Type behaviour.
Step 5. After the release, add the skill to AGENTS.md if you want it applied automatically on future sessions:
- Always consult: swiftui-pro
Real Workflow: Use the Skill From Codex
You want the same audit from inside Codex rather than Claude Code. The skill supports both.
Step 1. In a Codex session at the project root, invoke the skill by name:
$swiftui-pro Focus on accessibility
Step 2. Codex honours the skill in the same way Claude Code does. The output is the same audit style — VoiceOver labels, hit areas, Dynamic Type.
Step 3. To make the skill auto-apply, add it to Codex's configuration so the skill loads by default for SwiftUI projects.
Step 4. From Claude Code (the README's documented example), you can also invoke in natural language rather than the slash form:
Use the SwiftUI Pro skill to look for performance problems in this project.
Slash invocations resolve to the same skill; natural-language invocation is documented for Claude Code and may work in Codex too, but it is not explicitly listed for Codex in the README.
Tips
- Scope each invocation to a single area (
Focus on accessibility,Check for deprecated API) rather than running the full pass — the skill is built for selective triggering. - Add
swiftui-proto yourAGENTS.mdfor projects where every SwiftUI file should be audited by default. - The skill targets LLM-specific mistakes, not generic SwiftUI teaching; it complements, not replaces, official Apple docs.
- Sister skills cover SwiftData, Concurrency, and Testing — install them alongside if those parts of your stack need the same treatment.
- Contributions must be MIT and should target edge cases and soft deprecations, not restate what LLMs already know.
When Not to Use This
If you are not writing SwiftUI, none of this applies — and the SwiftUI mistakes the skill catches are SwiftUI-specific. If you are still learning SwiftUI, the skill assumes the basics and targets edge cases; reach for Apple's official SwiftUI documentation or Hacking with Swift first. If you only need a one-shot review and do not want the skill to apply by default, invoke it on demand rather than wiring it into AGENTS.md.
See the leaderboard for more skill packs.