SwiftUI Expert Skill for Claude: What It Does and How to Install It
Makes Claude write, review and speed up SwiftUI code, and record Instruments traces to find slow views.
- Installs
- 35.6K
- on skills.sh
- Stars
- 3.8K
- on GitHub
- Files
- 50
- besides SKILL.md
- Updated
- Oct 2026
- last repo commit
SwiftUI Expert makes Claude follow set workflows for SwiftUI: review code, improve code, or build a new feature. A Topic Router sends Claude to the right reference file, such as state management, lists, navigation, animation, Swift Charts or Liquid Glass, and a 17-item correctness checklist marks hard rules.
It also bundles Python scripts that record an Instruments .trace with xctrace and analyze one. That is the part that runs commands on your machine, so read the notes below before you use it.
Good for
- iOS and macOS developers writing or reviewing SwiftUI
- Developers chasing hangs, hitches or needless view updates
- Teams moving to new SwiftUI APIs and iPhone Duo or foldable layouts
Install swiftui-expert-skill
Claude Code
- 1
Copy this prompt.
Install the swiftui-expert-skill skill in Claude Code. Run this command: npx skills add https://github.com/avdlee/swiftui-agent-skill --skill swiftui-expert-skill Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires Node.js.
From its listing on skills.sh. Source.
What's in the skill
When it loads
Use when writing, reviewing, or refactoring SwiftUI code for iOS or macOS, including state and `@Observable` data flow, view composition, resizable layouts, safe areas, display scale, performance, lists, environment, localization, animation, Liquid Glass, and API migration. Also use for iPhone Duo, foldable, or large-display layouts (`NavigationSplitView` on large displays, iPhone tab sidebar, two-column reflow, foldable grids, `ArrangementView`, `ReservedRegion`), hinge effects, vertical bars, `@State` initialization or synthesized-property diagnostics, `@ContentBuilder` ambiguity, `reorderable` drag/drop, custom `AsyncImage` `URLSession`, swipe actions outside List, item-bound `alert`/`confirmationDialog`, `ToolbarOverflowMenu`, `AnimatableValues`, Document APIs (`Document`/`DocumentReader`), and Instruments `.trace` capture or analysis.
Sections in SKILL.md
- Operating Rules
- Task Workflow
- Review existing SwiftUI code
- Improve existing SwiftUI code
- Implement new SwiftUI feature
- Record a new Instruments trace
- Trace-driven improvement (Instruments .trace provided)
- Topic Router
- Correctness Checklist
Key facts
- Author
- AvdLee (the repo owner)
- Repository
- avdlee/swiftui-agent-skill
- Installs on skills.sh
- 35,646 as of 2026-11-02
- License
- MIT
- Last commit to the repo
- 2026-10-06
- skills.sh audits
- Gen Agent Trust Hub pass, Socket pass, Snyk pass
What it includes
Find topics, flag deprecated API, check #available
Claude reads the code, runs the Topic Router and replaces hard-deprecated APIs. It flags soft-deprecated ones and leaves them unless you ask to migrate.
Try: “Use the SwiftUI expert skill and review this view for state and performance problems.”
Read ·
Review existing SwiftUI codeAudit, cut state updates, extract subviews
Refactors hot paths and large view bodies, and can suggest image downsampling.
Write ·
Improve existing SwiftUI codeData flow first, then view structure, animation and accessibility
Claude decides owned versus injected state, extracts subviews early, uses Button for tappable elements and gates new APIs with #available.
Write ·
Implement a new SwiftUI featurescripts/record_trace.py wraps xctrace record
Attaches to a running app, launches one, or records all processes. Stop with Ctrl+C, a stop file or a time limit. The SwiftUI template is the default; the simulator needs Time Profiler.
Try: “Record a trace of my app while I scroll the feed.”
Runs code ·
Record a new Instruments tracescripts/analyze_trace.py reads a .trace file
Summarizes hangs, hitches, Time Profiler and SwiftUI update causes, can scope to a time window, and returns a prioritized plan. It edits code only if you ask.
Runs code ·
Trace-driven improvement33 topics mapped to reference files
State, environment, lists, layout, navigation, scrolling, focus, animation, accessibility, charts, toolbars, documents, WebKit, text, Liquid Glass, macOS, localization, previews and traces.
Read ·
Topic Router17 hard rules
Examples: @State properties are private, ForEach uses stable identity, animation(_:value:) includes the value, and version-specific APIs are gated with #available.
Read ·
Correctness checklist
From the official docs
Permissions
Medium risk
The trace features run Python scripts that call xctrace to record or read performance data from your apps. Record only the app you are debugging and never approve a system-wide recording unless you mean it.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
System-wide recording can capture other apps
The recording reference says an all-processes recording can capture activity from unrelated apps, and wants your explicit approval first. Choose attach or launch instead. github.com
Values passed with --env can show up in process lists
The reference says the wrapper hides them in its own log, but other tools may still show process arguments. Keep secrets out of the command line. github.com
It can stop xctrace for you
The script sends an interrupt to xctrace when a stop file appears and waits up to 60 seconds for it to finish. Check the recording is yours. github.com
Technical details
| Turning on read-only | No read-only switch is documented in SKILL.md. |
|---|---|
| Scopes |
|
Questions
What does SwiftUI Expert do?
It gives Claude workflows and reference files for writing, reviewing and improving SwiftUI, covering state, view structure, lists, navigation, animation, charts, accessibility and performance. It can also record and analyze Instruments traces.
How do I install it?
Use the install box at the top of this page. The README's recommended route is the skills CLI, and it also lists a Codex plugin directory, a Claude Code plugin and Cursor.
Does it need Python or Xcode?
Only for the trace features. The recording and analysis scripts are Python and call xctrace. The review and writing workflows need neither.
Is SwiftUI Expert safe to use?
The review workflows only read and edit your code. The recording script runs xctrace, which can attach to or launch an app and writes a .trace file, and its reference warns that a system-wide recording can capture other apps. Prefer attach or launch.
Will it adopt Liquid Glass automatically?
No. The SKILL.md says to adopt Liquid Glass only when you explicitly ask for it.
SwiftUI Expert vs SwiftUI Pro?
SwiftUI Expert has review, improve and new-feature workflows plus trace scripts. SwiftUI Pro by Paul Hudson is a fixed 11-step review that loads one reference per step and bundles no scripts.
Information
updated Nov 2, 2026
- Repository
- avdlee/swiftui-agent-skill
- Folder
skills/swiftui-expert-skill
Sources
Docs, issue trackers and discussions this page is built from.
Show all 5Hide
- swiftui-expert-skill SKILL.md · github.com
- record_trace.py · github.com
- avdlee/swiftui-agent-skill README · github.com
- trace-recording.md · github.com
- swiftui-pro SKILL.md · github.com