What problem does it solve?
This Skill helps you avoid fragile SwiftUI view architecture by establishing consistent patterns for state ownership, composition, environment wiring, and async loading.
Core Features & Use Cases
- Modern MV SwiftUI structuring: keep views lightweight and push business logic into models/services, avoiding unnecessary view models.
- Correct @Observable ownership and binding: enforce safe main-thread updates and proper use of @State, let, @Bindable, and @Environment.
- Compositional view design: decompose large views into focused subviews, use ViewBuilder helpers for conditional UI, and extract repeated styling into custom ViewModifiers.
- Safe async loading practices: use .task and .task(id:) for cancellation-aware loading tied to view lifecycle.
- iOS 26+ polish and performance guardrails: apply modern API usage and reduce recomputation using stable IDs, Lazy stacks/grids, and Equatable when appropriate.
- HIG alignment checklist: improve accessibility, typography, theming semantics, and empty/error state presentation with ContentUnavailableView.
Quick Start
Ask: "Use the swiftui-patterns skill to refactor my SwiftUI screen into a lightweight MV structure with correct @Observable/@State ownership, extract subviews and ViewModifiers, and convert my async work to .task with iOS 26+ best practices."