Individual skill
swift-refactor
Swift and SwiftUI refactoring patterns aligned with the iOS 26 / Swift 6.2 clinic modular MVVM-C architecture (Airbnb + OLX SPM layout). Enforces @Observable ViewModels/coordinators, App-target `DependencyContainer` + route shells, Domain repository/coordinator/error-routing protocols, and Data-owned I/O with stale-while-revalidate plus optimistic queued sync boundaries. Use when refactoring existing SwiftUI code into the clinic architecture.
skills/.experimental/swift-refactor/SKILL.md
Source commit cf93c57cac89d6fc3e4194686000411567f5caf3
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- No
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Not checked yet
- Last checked
- Nov 5, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 222
- Repository last updated
- Aug 15, 2026
- License
- MIT
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- engineering Derived category
- data Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 12,787 bytesSKILL.mdcore · 12,787 bytesassets/templates/_template.mddoc · 1,007 bytesmetadata.jsonasset · 883 bytesreferences/_sections.mddoc · 3,471 bytesreferences/api-alert-confirmation-dialog.mddoc · 3,028 bytesreferences/api-environment-object-removal.mddoc · 2,407 bytesreferences/api-list-foreach-identifiable.mddoc · 2,421 bytesreferences/api-navigationstack-migration.mddoc · 2,073 bytesreferences/api-observable-macro.mddoc · 3,243 bytesreferences/api-onchange-signature.mddoc · 2,167 bytesreferences/api-toolbar-migration.mddoc · 2,594 bytesreferences/arch-environment-key-injection.mddoc · 2,429 bytesreferences/arch-feature-module-extraction.mddoc · 2,356 bytesreferences/arch-model-view-separation.mddoc · 3,579 bytesreferences/arch-protocol-dependencies.mddoc · 3,391 bytesreferences/arch-viewmodel-elimination.mddoc · 3,331 bytesreferences/data-cancellation.mddoc · 2,808 bytesreferences/data-error-loadable.mddoc · 3,016 bytesreferences/data-task-modifier.mddoc · 2,034 bytesreferences/di-container-composition.mddoc · 2,749 bytesreferences/di-mock-testing.mddoc · 3,018 bytesreferences/diff-closure-skip.mddoc · 2,535 bytesreferences/diff-equatable-views.mddoc · 2,640 bytesreferences/diff-identity-stability.mddoc · 2,482 bytesreferences/diff-printchanges-debug.mddoc · 2,505 bytesreferences/layer-dependency-rule.mddoc · 2,610 bytesreferences/layer-no-view-repository.mddoc · 1,581 bytesreferences/layer-repository-protocol.mddoc · 3,309 bytesreferences/layer-usecase-protocol.mddoc · 2,062 bytesreferences/layer-viewmodel-boundary.mddoc · 2,953 bytesreferences/list-constant-viewcount.mddoc · 2,569 bytesreferences/list-filter-in-model.mddoc · 2,490 bytesreferences/list-id-keypath.mddoc · 1,925 bytesreferences/list-lazy-stacks.mddoc · 1,921 bytesreferences/nav-centralize-destinations.mddoc · 3,693 bytesreferences/nav-path-state-management.mddoc · 2,956 bytesreferences/nav-sheet-item-pattern.mddoc · 2,304 bytesreferences/nav-split-view-adoption.mddoc · 2,850 bytesreferences/nav-value-based-links.mddoc · 3,255 bytesreferences/state-binding-extraction.mddoc · 2,062 bytesreferences/state-derived-over-stored.mddoc · 1,977 bytesreferences/state-onappear-to-task.mddoc · 2,059 bytesreferences/state-remove-observation.mddoc · 2,904 bytesreferences/state-scope-minimization.mddoc · 1,944 bytesreferences/state-stateobject-placement.mddoc · 2,859 bytesreferences/swift-camel-case-naming.mddoc · 1,576 bytesreferences/swift-closures.mddoc · 2,159 bytesreferences/swift-for-in-loops.mddoc · 1,542 bytesreferences/swift-functions-clear-names.mddoc · 1,857 bytesreferences/swift-let-vs-var.mddoc · 1,439 bytesreferences/swift-optionals.mddoc · 1,820 bytesreferences/swift-string-interpolation.mddoc · 1,559 bytesreferences/swift-structs-vs-classes.mddoc · 1,585 bytesreferences/type-force-unwrap-elimination.mddoc · 1,871 bytesreferences/type-phantom-types.mddoc · 2,933 bytesreferences/type-result-over-optionals.mddoc · 2,100 bytesreferences/type-tagged-identifiers.mddoc · 1,977 bytesreferences/view-body-complexity.mddoc · 4,081 bytesreferences/view-computed-to-struct.mddoc · 2,869 bytesreferences/view-conditional-content.mddoc · 2,355 bytesreferences/view-eliminate-anyview.mddoc · 2,540 bytesreferences/view-extract-subviews.mddoc · 3,859 bytesreferences/view-modifier-extraction.mddoc · 2,732 bytesreferences/view-preference-keys.mddoc · 2,903 bytes
Read excerpt
# Swift/SwiftUI Refactor (Modular MVVM-C)
Comprehensive refactoring guide for migrating Swift/SwiftUI code to modular MVVM-C with local SPM package boundaries and App-target composition root wiring.
## Mandated Architecture Stack
```
┌───────────────────────────────────────────────────────────────┐
│ App target: DependencyContainer, Coordinators, Route Shells │
├───────────────────────────────────────────────────────────────┤
│ Feature modules: View + ViewModel (Domain + DesignSystem deps)│
├───────────────────────────────────────────────────────────────┤
│ Data package: repositories, remote/local stores, sync, retry │
├───────────────────────────────────────────────────────────────┤