Setup & Installation
Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:
What This Skill Does
Audits SwiftUI view performance through code review and guided Instruments profiling. Covers view invalidation storms, unstable list identities, heavy body computations, layout thrash, and image decoding issues. Produces a prioritized issue list with concrete code fixes and before/after metrics when traces are available.
Combines static code review with step-by-step Instruments guidance so performance issues are caught even when the root cause isn't obvious from symptoms alone.
When to use it
- Diagnosing janky scrolling in a SwiftUI list
- Finding CPU spikes during complex SwiftUI animations
- Reducing excessive view body re-evaluations in a feed
- Catching expensive formatter allocations inside body
- Profiling memory peaks in an image-heavy SwiftUI screen
Example Workflow
Here's how your AI assistant might use this skill in practice.
User asks: 'My SwiftUI list scrolls at 30fps and CPU spikes during scrolling. Here is my view code.'
- 1Reviews the provided view code for known SwiftUI anti-patterns
- 2Identifies sorted collections computed inside body on every render
- 3Detects unstable ForEach identity using id: \.self on mutable values
- 4Recommends precomputing sorted data and using stable IDs
- 5Guides the user to capture a SwiftUI Instruments trace if code fixes are insufficient
A prioritized list of root causes with specific code changes and an optional Instruments profiling walkthrough