swiftui-patterns

Migrate SwiftUI apps to iOS 17+ patterns with @Observable and NavigationStack.

223|21|Updated Dec 20, 2025
One-click install
npx skills add https://github.com/johnrogers/claude-swift-engineering --skill swiftui-patterns-johnrogers
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: swiftui-patterns
Source: https://github.com/johnrogers/claude-swift-engineering/tree/main/plugins/swift-engineering/skills/swiftui-patterns
Command: npx skills add https://github.com/johnrogers/claude-swift-engineering --skill swiftui-patterns-johnrogers

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Streamline and modernize SwiftUI development on iOS 17+ by promoting the use of @Observable/@Bindable, MVVM architecture, NavigationStack, lazy loading, UIKit interop, and accessibility patterns, reducing boilerplate and migration friction.

Core Features & Use Cases

  • Guides adoption of iOS 17+ patterns across projects, including state management with @Observable and @Bindable, and navigation with NavigationStack.
  • Covers common patterns such as lazy loading, UIKit interop, accessibility (VoiceOver/Dynamic Type), and async operations using .task and .refreshable.
  • Provides migration guidance from older SwiftUI constructs like ObservableObject, @StateObject, and environmentObject to the modern equivalents, with practical examples and references for quick wins.

Quick Start

Start by migrating a representative view to use @Observable and NavigationStack, then progressively convert view models to @Bindable for passed state.

Frequently Asked Questions about swiftui-patterns

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

FAQPage Schema
How do I migrate ObservableObject and @StateObject to the new SwiftUI @Observable pattern?▼

To migrate SwiftUI state management, convert ObservableObject classes to @Observable and replace @StateObject with @Bindable. This modern approach reduces boilerplate and friction when updating view models for iOS 17+.

What is the best way to implement NavigationStack workflows in modern SwiftUI?▼

NavigationStack workflows in modern SwiftUI are best implemented using NavigationPath-based navigation. This pattern standardizes routing and reduces boilerplate friction during iOS 17+ app migration scenarios.

How does .task and .refreshable work for async operations in SwiftUI?▼

The .task and .refreshable modifiers in SwiftUI handle async operations by attaching lifecycle-aware execution to views. They standardize modern API usage for loading data and pull-to-refresh actions.

Can I use UIKit interop and accessibility enhancements like VoiceOver with modern SwiftUI patterns?▼

Yes, modern SwiftUI patterns support UIKit interop and accessibility enhancements like VoiceOver and Dynamic Type. These are integrated directly into the migration guidance for practical app scenarios.

Why should I use @Bindable instead of environmentObject for passed state in iOS 17?▼

You should use @Bindable instead of environmentObject because it standardizes modern SwiftUI state passing with less boilerplate. Progressively converting view models to @Bindable ensures compatibility with iOS 17+ patterns.