What problem does it solve?
This Skill addresses the complexity and potential inconsistencies in building large-scale SwiftUI applications by enforcing a specific, opinionated architecture. It helps prevent common pitfalls related to state management, navigation, and dependency injection, leading to more maintainable and scalable codebases.
Core Features & Use Cases
- Architecture Enforcement: Guides developers to adhere to a modular MVVM-C pattern with strict dependency rules between layers (Domain, Data, Feature, App).
- State Management: Mandates the use of
@Observable for ViewModels and coordinators, promoting efficient, granular UI updates.
- Navigation & Coordination: Enforces the use of coordinators to manage
NavigationPath and presentation logic, enabling testable flows and deep linking.
- Dependency Injection: Promotes environment-based injection using protocol abstractions for testability and flexibility.
- Use Case: When starting a new SwiftUI project or refactoring an existing one, use this Skill to ensure adherence to best practices for modularity, state management, and navigation, preventing architectural drift as the project grows.
Quick Start
Apply the swift-ui-architect skill to review the current SwiftUI project's adherence to the mandated MVVM-C architecture and identify any deviations from the specified rules.