swiftui-performance-audit

Diagnose SwiftUI rendering, scrolling, and update performance issues from code and Instruments traces.

25|1|Updated Feb 10, 2026
One-click install
npx skills add https://github.com/wisdom-in-a-nutshell/agents --skill swiftui-performance-audit-wisdom-in-a-nutshell
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: swiftui-performance-audit
Source: https://github.com/wisdom-in-a-nutshell/agents/tree/main/plugins-source/external/build-ios-apps/skills/swiftui-performance-audit
Command: npx skills add https://github.com/wisdom-in-a-nutshell/agents --skill swiftui-performance-audit-wisdom-in-a-nutshell

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? SwiftUI apps often suffer from janky scrolling, slow rendering, hangs, and excessive view updates that are hard to trace back to specific code. This Skill provides a structured audit workflow that starts with code-first review and escalates to Instruments profiling only when needed, producing prioritized findings with concrete fixes. ## Core Features & Use Cases - Code-first smell detection: Identify expensive formatters in body, unstable ForEach identity, observation fan-out, main-thread image decoding, and layout thrash using a curated smell catalog. - Guided profiling intake: Collect the right Instruments evidence (SwiftUI timeline, Time Profiler, hangs) with a checklist covering device, build configuration, and reproduction steps. - Structured audit reports: Summarize findings ordered by impact with before/after metrics, fixes, and validation steps using a report template. - Use Case: A user reports dropped frames when scrolling a list. The Skill reviews the view code, finds inline filtering inside ForEach and unstable identity, recommends pre-filtering with stable IDs, then asks for a Release-mode SwiftUI Instruments trace to verify the fix. ## Quick Start Use the swiftui-performance-audit skill to review this SwiftUI view for performance problems and suggest concrete fixes.

Frequently Asked Questions about swiftui-performance-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I diagnose slow SwiftUI view rendering?▼

Start with a code-first review looking for expensive work in body such as formatters, sorting, and filtering, plus unstable ForEach identity and broad observation. If code review is inconclusive, capture a Release-mode trace with the SwiftUI Instruments template and inspect Long View Body Updates with Time Profiler.

How to fix janky scrolling in a SwiftUI List?▼

Janky scrolling usually comes from unstable identity, inline filtering inside ForEach, or heavy row bodies. Use stable domain identifiers instead of id: \.self, pre-filter and pre-sort collections before rendering, and move formatting or image decoding off the main thread.

What Instruments template should I use for SwiftUI performance?▼

Use the SwiftUI template, which combines the SwiftUI instrument with Time Profiler and hang or hitch detection. Record in a Release build on a real device, reproduce only the problematic interaction, and inspect Long View Body Updates and Update Groups.

Why does @Observable cause too many SwiftUI view updates?▼

Broad @Observable models cause update fan-out when many views read the same large collection or root object, so one small change invalidates many views. Narrow the observable surface with per-item view models or scoped state so only affected views update.

Should I use equatable() to stop SwiftUI redraws?▼

Use equatable() only when equality checking is cheaper than recomputing the subtree and the view inputs are value-semantic and stable. Applying it as a blanket fix can add comparison overhead without reducing actual render work.

When is code review not enough for SwiftUI performance issues?▼

Code review falls short when symptoms like hangs, hitches, or memory growth have no obvious code-level cause. In those cases capture a SwiftUI Instruments trace with Time Profiler on a real device in Release mode, since Debug builds and Simulator distort timing behavior.