Kipt

SwiftUI skill for Claude Code: swiftui-expert-skill explained

The SwiftUI skill by Antoine van der Lee helps your agent write and review SwiftUI: state, lists, performance, Liquid Glass and traces. How to install it.

By the Kipt team · Updated 24 October 2026

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 View type 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:

  • @State properties are private.
  • @StateObject for view-owned objects, @ObservedObject for injected ones; on iOS 17+, @State with @Observable and @Bindable for injected observables that need bindings. Apple's Observation docs describe the macro behind this.
  • ForEach uses stable identity, "never .indices/\.offset."
  • .animation(_:value:) always includes the value parameter.
  • 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 xctrace and write .trace files; 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 updating latest-apis.md after 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," per INSTALLATION.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.plist from the CLI.

Questions

What is the SwiftUI expert skill?

swiftui-expert-skill is an MIT-licensed Agent Skill by Antoine van der Lee and Omar Elsayed, published in the AvdLee/SwiftUI-Agent-Skill repo. It guides a coding agent when writing, reviewing or refactoring SwiftUI for iOS and macOS, with a correctness checklist, more than 30 topic references and a Python toolchain for Instruments traces.

How do I install the SwiftUI skill in Claude Code?

Inside Claude Code, run /plugin marketplace add AvdLee/SwiftUI-Agent-Skill, then /plugin install swiftui-expert@swiftui-expert-skill. Or install the skill files with npx skills@latest add https://github.com/avdlee/swiftui-agent-skill --skill swiftui-expert-skill, which the README calls the recommended route.

Does the SwiftUI skill force an architecture like MVVM?

No. Its operating rules say to focus on correctness and performance and not to enforce specific architectures such as MVVM or VIPER. It encourages separating business logic from views for testability without mandating how, and presents performance changes as suggestions.

Will the skill add Liquid Glass to my app?

Only if you ask. The SKILL.md says to adopt Liquid Glass only when the user explicitly requests it, and to gate version-specific APIs with #available and sensible fallbacks. Liquid Glass guidance lives in a separate reference file for iOS 26 and later.

Can the SwiftUI skill analyze Instruments traces?

Yes. It ships Python scripts that wrap xctrace to record a new trace or analyze an existing .trace file across Time Profiler, Hangs, Animation Hitches and SwiftUI lanes. The scripts use only the Python standard library plus xctrace, which ships with Xcode.

More in Skill directory

All guides

Keep your prompts and skills in one place, in your own GitHub. Install every skill with one command.

Get started

Kipt is an independent product, not affiliated with or endorsed by Anthropic, OpenAI, Cursor or GitHub. Claude, ChatGPT, Codex, Cursor and GitHub are trademarks of their owners.