PlugWiki

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. 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. 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

  1. Operating Rules
  2. Task Workflow
  3. Review existing SwiftUI code
  4. Improve existing SwiftUI code
  5. Implement new SwiftUI feature
  6. Record a new Instruments trace
  7. Trace-driven improvement (Instruments .trace provided)
  8. Topic Router
  9. Correctness Checklist

Key facts

Installs on skills.sh
35,646 as of 2026-11-02
License
MIT
Last commit to the repo
2026-10-06

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 code

  • Audit, cut state updates, extract subviews

    Refactors hot paths and large view bodies, and can suggest image downsampling.

    Write · Improve existing SwiftUI code

  • Data 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 feature

  • scripts/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 trace

  • scripts/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 improvement

  • 33 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 Router

  • 17 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-onlyNo read-only switch is documented in SKILL.md.
Scopes
  • Runs python3 scripts/record_trace.py and scripts/analyze_trace.py

  • Writes .trace files (examples use ~/Desktop) and a stop file under /tmp

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

Folder
skills/swiftui-expert-skill

avdlee/swiftui-agent-skillskills.sh

Sources

Docs, issue trackers and discussions this page is built from.

Show all 5
  1. swiftui-expert-skill SKILL.md · github.com
  2. record_trace.py · github.com
  3. avdlee/swiftui-agent-skill README · github.com
  4. trace-recording.md · github.com
  5. swiftui-pro SKILL.md · github.com

Updated Nov 2, 2026.