swiftui-view-refactor

Installation
SKILL.md

SwiftUI view refactor

  • Default to vanilla SwiftUI: local state in the view, shared dependencies in the environment, business logic in services or models. Add a view model only if one exists or is requested.
  • Extract dedicated View types for non-trivial sections. Keep computed some View helpers rare and small.
  • Keep a stable view tree. Put conditions inside sections and modifiers, not as if/else root swaps.
  • Keep business logic out of body, .task, .onAppear, .onChange, and .refreshable. Call small private methods.
  • Pass observables explicitly. Avoid bootstrapIfNeeded-style delayed setup.
Installs
11
GitHub Stars
15
First Seen
Jun 16, 2026