← ClaudeAtlas

swiftui-performancelisted

Audit and improve SwiftUI runtime performance. Use when diagnosing slow rendering, janky scrolling, high CPU, memory usage, excessive view updates, layout thrash, body evaluation cost, identity churn, view lifetime issues, lazy loading, Instruments profiling guidance, and performance audit requests.
dpearson2699/swift-ios-skills · ★ 730 · Web & Frontend · score 80
Install: claude install-skill dpearson2699/swift-ios-skills
# SwiftUI Performance Audit SwiftUI view performance end-to-end, from instrumentation and baselining to root-cause analysis and concrete remediation steps. ## Contents - [Workflow Decision Tree](#workflow-decision-tree) - [1. Code-First Review](#1-code-first-review) - [2. Guide the User to Profile](#2-guide-the-user-to-profile) - [3. Analyze and Diagnose](#3-analyze-and-diagnose) - [4. Remediate](#4-remediate) - [Common Code Smells (and Fixes)](#common-code-smells-and-fixes) - [5. Verify](#5-verify) - [Outputs](#outputs) - [Instruments Profiling](#instruments-profiling) - [Identity and Lifetime](#identity-and-lifetime) - [Lazy Loading Patterns](#lazy-loading-patterns) - [State and Observation Optimization](#state-and-observation-optimization) - [Common Mistakes](#common-mistakes) - [Review Checklist](#review-checklist) - [References](#references) ## Workflow Decision Tree - If the user provides code, start with "Code-First Review." - If the user only describes symptoms, ask for minimal code/context, then do "Code-First Review." - If code review is inconclusive, go to "Guide the User to Profile" and ask for a trace or screenshots. ## 1. Code-First Review Collect: - Target view/feature code. - Data flow: state, environment, observable models. - Symptoms and reproduction steps. Focus on: - View invalidation storms from broad state changes. - Unstable identity in lists (`id` churn, `UUID()` per render). - Top-level conditional view swapping (`if/else` returning different