What problem does it solve?
This Skill helps developers enforce a consistent structure and clean dependency flow in SwiftUI view files, reducing boilerplate and improving maintainability by promoting MV-style patterns and careful management of observable state.
Core Features & Use Cases
- Enforces consistent SwiftUI view structure and ordering (Environment, stored properties, init, body, helpers) to improve readability.
- Promotes MV-like patterns by preferring lightweight views and dependency injection via @Environment / @Observable, keeping business logic out of views.
- Assists in splitting large views into smaller subviews and extracting complex computed views to keep files maintainable.
- Use Case: When refactoring a large UserProfileView.swift with scattered state, apply the guideline to restructure into smaller subviews and inject services via environment.
Quick Start
Refactor the SwiftUI view file located at app/Views/ExampleView.swift to apply the standard ordering, MV-pattern guidance, and proper observation usage.