swiftui-mvvm-architecture
CommunityProduction-first MVVM with @Observable in SwiftUI
Authorrusel95
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Modern SwiftUI apps often suffer from maintenance challenges when evolving legacy patterns. This skill provides a production-first path to migrate codebases to an MVVM architecture using @Observable, a typed Router, and dependency injection, enabling safer, incremental refactors.
Core Features & Use Cases
- Phased refactoring workflow using a refactoring/ directory to ship small, reviewable PRs
- Adoption of @Observable @MainActor ViewModels to improve testability and reduce redraws
- Typed navigation with a Router and Route enum to replace fragile string-based paths
- Protocol-based DI via constructor injection to enable mocking and easier testing
- Guidance for creating new screens and migrating from ObservableObject with measurable boundaries
Quick Start
Provide a legacy SwiftUI screen and instruct the AI to migrate it to an @Observable ViewModel, router-based navigation, and constructor DI in small, reviewable PRs.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: swiftui-mvvm-architecture Download link: https://github.com/rusel95/WhiteNoise/archive/main.zip#swiftui-mvvm-architecture Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.