Skip to main content
skill CX Codex

swiftui-performance — Claude Code skill for SwiftUI profiling

Diagnoses slow SwiftUI rendering, scroll hitches, and unnecessary view updates. Use it to review code and investigate measurements in Instruments.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add dpearson2699/swift-ios-skills --skill swiftui-performance -a claude-code
Open on GitHub

What swiftui-performance does

This skill takes a SwiftUI performance issue from a repeatable symptom to a measured fix. It starts with code review, labels unconfirmed causes as hypotheses, and asks for a small reproduction, device, OS, and build details when they matter.

It guides profiling with the SwiftUI template in Instruments, preferably on a Release build and a real device. The analysis links costly view updates to Time Profiler and Hangs/Hitches data. It looks for unstable ForEach identity, work inside body, broad state reads, costly layout, and oversized images.

Suggested changes stay targeted: narrow state ownership, move expensive work out of body, preserve row identity, or downsample images before rendering. The skill then asks for the same capture again and compares CPU, frame drops, and memory peak when supplied. A Release run on a device is worth checking, because simulator-only results can mislead the diagnosis.

What it helps with

  • trace scroll hitches in a SwiftUI list
  • find excess body updates
  • stabilize ForEach row identity
  • move sorting or decoding out of body
  • connect Instruments evidence to source code

Example prompts for the agent

  • Review this SwiftUI screen: list scrolling hitches, and here are the Row and ForEach implementations.
  • Show me how to capture an Instruments profile for this slow animation and what evidence to share.
  • Investigate why this view's body is recomputed frequently, then suggest measurements before changing code.

How to install swiftui-performance

1Skills CLI (Vercel)

npx skills add dpearson2699/swift-ios-skills --skill swiftui-performance -a claude-code

2Manually: put the files in place

~/.claude/skills/swiftui-performance/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/swiftui-performance/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about swiftui-performance

How do I install swiftui-performance in Claude Code?

Run npx skills add dpearson2699/swift-ios-skills --skill swiftui-performance -a claude-code, then run npx skills add dpearson2699/swift-ios-skills --skill swiftui-performance -a claude-code again. The skill file is placed at ~/.claude/skills/swiftui-performance/SKILL.md.

What does swiftui-performance do?

It helps diagnose and remediate SwiftUI runtime performance issues through code review, Instruments, and repeatable measurement. It separates code-based hypotheses from findings backed by a trace.

What profiling evidence does swiftui-performance use?

It uses the SwiftUI Instruments template and correlates its output with Time Profiler and Hangs/Hitches. In debug builds, Self._printChanges() can help identify the property that triggered a view update.

Similar skills

Everything for Mobile →

From the same set86

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor