Loading...
Loading...
Opinionated SwiftUI architecture enforcement for iOS 17+ apps using Clean MVVM + Coordinator pattern. Enforces Airbnb's @Equatable diffing, @Observable state, NavigationStack coordinators, and Clean Architecture layer boundaries. This skill should be used when writing, reviewing, or refactoring SwiftUI code. Triggers on tasks involving SwiftUI views, ViewModels, navigation, state management, dependency injection, or iOS app architecture.
npx skill4agent add pproenca/dot-skills swift-ui-architect┌─────────────────────────────────────────────────────┐
│ Presentation Layer (SwiftUI Views) │
│ ├── Views: @Equatable, decomposed, minimal bodies │
│ ├── ViewModels: @Observable classes via @State │
│ └── Coordinators: NavigationStack + enum routes │
├─────────────────────────────────────────────────────┤
│ Domain Layer (Pure Swift) │
│ ├── Use Cases / Interactors (stateless, protocol) │
│ ├── Domain Models (value types, Equatable) │
│ └── Repository Protocols (abstractions only) │
├─────────────────────────────────────────────────────┤
│ Data Layer (Implementation) │
│ ├── Repository Implementations │
│ ├── Network Services │
│ └── Persistence (SwiftData / CoreData) │
└─────────────────────────────────────────────────────┘@ObservableObservableObject@PublishedNavigationStackNavigationLink(destination:)@EquatableAnyView| Priority | Category | Impact | Prefix | Rules |
|---|---|---|---|---|
| 1 | View Identity & Diffing | CRITICAL | | 6 |
| 2 | State Architecture | CRITICAL | | 7 |
| 3 | View Composition | HIGH | | 6 |
| 4 | Navigation & Coordination | HIGH | | 5 |
| 5 | Layer Architecture | HIGH | | 6 |
| 6 | Dependency Injection | MEDIUM-HIGH | | 4 |
| 7 | List & Collection Performance | MEDIUM | | 4 |
| 8 | Async & Data Flow | MEDIUM | | 5 |
diff-equatable-viewsdiff-closure-skipdiff-reference-typesdiff-identity-stabilitydiff-avoid-anyviewdiff-printchanges-debugstate-observable-classstate-ownershipstate-single-sourcestate-scoped-observationstate-binding-minimalstate-environment-globalstate-no-publishedview-body-complexityview-extract-subviewsview-no-logic-in-bodyview-minimal-dependenciesview-viewbuilder-compositionview-no-init-sideeffectsnav-coordinator-patternnav-routes-enumnav-deeplink-supportnav-modal-sheetsnav-no-navigationlinklayer-dependency-rulelayer-usecase-protocollayer-repository-protocollayer-model-value-typeslayer-no-view-repositorylayer-viewmodel-boundarydi-environment-injectiondi-protocol-abstractiondi-container-compositiondi-mock-testinglist-constant-viewcountlist-filter-in-modellist-lazy-stackslist-id-keypathdata-task-modifierdata-async-initdata-error-loadabledata-combine-avoiddata-cancellation| File | Description |
|---|---|
| references/_sections.md | Category definitions and ordering |
| assets/templates/_template.md | Template for new rules |
| metadata.json | Version and reference information |