domains / families / software-engineering / swiftui-view-refactor
Refactor and review SwiftUI view files with strong defaults for small dedicated subviews, MV-over-MVVM data flow, stable view trees, explicit dependency injection, and correct Observation usage. Use when cleaning up a SwiftUI view, splitting long bodies, removing inline actions or side effects, reducing computed `some View` helpers, or standardizing `@Observable` and view model initialization patterns. Refactor and review SwiftUI view files for consistent structure, dependency injection, and Observation usage. Use when asked to clean up a SwiftUI view’s layout/ordering, handle view models safely (non-optional when possible), or standardize how dependencies and @Observable state are initialized and passed.
The three copies share the same core MV-first, subview-extraction, and Observation guidance, but they disagree on how aggressively to extract subviews and on the scope of the refactor. Dimillian/Skills and sickn33/agentic-awesome-skills strongly prefer dedicated View types over computed some View helpers and include an explicit rule to extract actions and side effects out of body. LeoYeAI/openclaw-master-skills explicitly allows keeping related subviews as computed view properties in the same file and omits the side-effect extraction rule. Because crowning one copy would hide a real alternative approach to subview extraction, the copies should be combined.