Source: AvdLee/SwiftUI-Agent-Skill · Maintainer: community: Antoine van der Lee · License: MIT · Checked: 24 October 2026
What is the SwiftUI skill?
The SwiftUI skill with the most installs on skills.sh, by a narrow margin, is swiftui-expert-skill, an Agent Skill that helps Claude Code, Codex, Cursor and other agents write, review and refactor SwiftUI for iOS and macOS. It focuses on correctness and performance: state and data flow, view identity, lists, layout, animation, deprecated APIs and, unusually, recording and analyzing Instruments traces.
The repo README describes it as "Expert guidance for any AI coding tool that supports the Agent Skills open format" covering "SwiftUI state management, view composition, performance, SDK 27 changes, and Liquid Glass adoption." It was created by Antoine van der Lee, author of the SwiftLee blog, and Omar Elsayed.
As of 24 October 2026, its skills.sh page listed 35.0K installs (snapshot, 24 October 2026), and the GitHub repo had about 3.7K stars.
What does it do?
The skill's description tells the agent to load it "when writing, reviewing, or refactoring SwiftUI code for iOS or macOS," and then lists dozens of specific triggers, from @Observable data flow and safe areas to reorderable drag and drop and Instruments .trace capture.
The SKILL.md has four parts.
Operating rules. A few that shape every answer:
- "Treat each
Viewtype as an invalidation boundary": give a view only the data it reads. - Replace hard-deprecated APIs; during feature work, flag soft-deprecated ones and leave them in place.
- Prefer native SwiftUI over UIKit or AppKit bridging unless bridging is needed.
- "Focus on correctness and performance; do not enforce specific architectures (MVVM, VIPER, etc.)"
- "Only adopt Liquid Glass when explicitly requested by the user."
- Present performance optimizations as suggestions, and gate version-specific APIs with
#available.
Task workflows. Separate steps for reviewing code, improving code, building a new feature, recording a trace and trace-driven improvement. For a new feature, the agent designs data flow first, extracts subviews early, uses Button for every tappable element and adds accessibility labels.
A topic router. A table mapping more than 30 topics to reference files: state management, environment and @Entry, lists and ForEach, navigation and sheets, scrolling, focus, three levels of animation, accessibility, Swift Charts, toolbars, document apps, WebKit, localization, previews, macOS scenes and windows, iPhone Duo and foldable layouts, and latest-apis.md for deprecated-to-modern migrations from iOS 15 through iOS 27.
A correctness checklist of rules it treats as bugs, for example:
@Stateproperties areprivate.@StateObjectfor view-owned objects,@ObservedObjectfor injected ones; on iOS 17+,@Statewith@Observableand@Bindablefor injected observables that need bindings. Apple's Observation docs describe the macro behind this.ForEachuses stable identity, "never.indices/\.offset.".animation(_:value:)always includes thevalueparameter.- Previews use self-contained mock data, with no live services or network.
Instruments tooling. The folder ships scripts/record_trace.py and scripts/analyze_trace.py, which wrap xctrace. The README says they are "Pure stdlib Python 3; only external dep is xctrace (ships with Xcode)." The analyzer reads Time Profiler, Hangs, Animation Hitches, SwiftUI updates and the SwiftUI cause graph, then returns JSON and Markdown. Its key metric, per the README, is main-thread coverage on each hang or hitch: under 25% means the main thread was blocked, 75% or more means CPU-bound work.
How do you install the SwiftUI skill?
skills CLI (the README's recommended route):
npx skills@latest add https://github.com/avdlee/swiftui-agent-skill --skill swiftui-expert-skill
If you installed before the repo moved to the Agent Plugins layout, the README says to run npx skills@latest update with skills CLI 1.5.24 or newer.
Claude Code plugin. Inside Claude Code:
/plugin marketplace add AvdLee/SwiftUI-Agent-Skill
/plugin install swiftui-expert@swiftui-expert-skill
The README also shows a .claude/settings.json snippet with enabledPlugins and extraKnownMarketplaces, so teammates are prompted to install it when they open the repo. Claude Code's plugin docs explain marketplaces; see also Claude Code plugins.
Codex and ChatGPT. The README says the plugin is in the OpenAI Plugins Directory: open Plugins in Codex and search for "SwiftUI Expert". For folder-based installs, see Codex skills.
Cursor. Load the plugin from a local clone in ~/.cursor/plugins/local, per the README. See Cursor skills for the skills route.
INSTALLATION.md adds Gemini CLI (gemini skills install https://github.com/AvdLee/SwiftUI-Agent-Skill), pi, Autohand Code and a manual copy.
How do you use it?
The README's own example is: "Use the swiftui expert skill and review the current SwiftUI code for state-management and performance improvements."
More example prompts (suggestions, not quotes from the repo):
Review FeedView.swift for state management bugs and ForEach identity problems.Migrate this view model from ObservableObject to @Observable. We target iOS 17 and later.Find deprecated SwiftUI APIs in this module and list replacements, but don't change soft-deprecated ones yet.Record a trace: attach to MyApp on my iPhone. I'll tell you when I'm done.Analyse ~/Desktop/session.trace and tell me which view causes the hang after the feed loads.
For a whole-codebase review, the skill tells the agent to split the work into focus areas or a TODO list rather than reviewing everything at once.
Tips and limits
- All three audits pass. On skills.sh, Gen Agent Trust Hub, Socket and Snyk all showed Pass on 24 October 2026.
- The scripts need a Mac with Xcode. Trace recording and analysis depend on
xctrace. On the iOS Simulator the SwiftUI lane comes back empty, so the skill switches to the Time Profiler template there; real devices and the host Mac get the SwiftUI template. - It runs code when you ask for traces. The Python scripts start and stop
xctraceand write.tracefiles; the rest of the skill is plain Markdown. The skill says to edit source only if you asked for edits. - API guidance needs refreshing. The repo includes a maintenance skill,
update-swiftui-apis, for updatinglatest-apis.mdafter new iOS or Xcode releases. It needs the Sosumi MCP and is not part of the published skill. - Old path going away. The skill folder moved to
skills/swiftui-expert-skill/; a symlink at the old root path "will be removed in the next major version," perINSTALLATION.md. - SwiftUI focus. The skill targets SwiftUI and prefers native SwiftUI over UIKit or AppKit bridging; the author publishes separate skills for Swift concurrency, Core Data, Swift Testing and Xcode build optimization. Apple's SwiftUI documentation remains the reference for API details.
Under the MIT License you can copy and change it as long as you keep the copyright notice.
Save it in your Kipt library
In Kipt, open Skills and paste the skill's GitHub folder link into the import box. Kipt reads the SKILL.md along with its references/ and scripts/ files, or you can drop the folder or a .zip. Your skills live in your own private GitHub repo and install into Claude Code or Codex with one command:
npx skills add https://github.com/<you>/<repo>.git --all -g
Kipt is not affiliated with Antoine van der Lee or SwiftLee.
Similar skills
- React Native skill: Vercel's React Native rules, if your mobile app is cross-platform.
- Expo skill: official Expo skills for building and shipping React Native apps.
- Firebase basics skill: includes iOS setup steps and fetching
GoogleService-Info.plistfrom the CLI.