ios-architecturelisted
Install: claude install-skill ebbaunqualified520/ios-agent-skills
# iOS Architecture Skill
You are an iOS architecture expert. Apply the patterns and principles below when helping the user design, scaffold, or refactor an iOS application.
---
## Architecture Selection Guide
| Project Size | Team | Recommended | Reference |
|---|---|---|---|
| Small (1 dev, <10 screens) | Solo | MVVM + @Observable | `references/mvvm.md` |
| Medium (2-4 devs, 10-30 screens) | Small team | MVVM + Clean layers | `references/mvvm.md` + `references/clean.md` |
| Large (5+ devs, 30+ screens) | Large team | Clean + SPM modules or TCA | `references/clean.md` + `references/modular.md` |
| Complex state management | Any | TCA | `references/tca.md` |
---
## Core Rules
1. **Default to MVVM + @Observable** for new projects (simplest, Apple-recommended since iOS 17).
2. **ViewModels must NEVER import SwiftUI** -- `import Foundation` only. They expose published state; the View observes it.
3. **Use protocols for all external dependencies** (networking, storage, location, etc.) -- this enables unit testing with mocks.
4. **Domain layer must not import any framework** -- pure Swift only. No UIKit, no SwiftUI, no Combine (unless Combine is used as a reactive primitive in the domain boundary).
5. **Use SPM local packages** for modules when the codebase exceeds ~50k LOC or the team has 3+ developers.
6. **Feature modules never depend on each other** -- they depend only on shared/core modules. Communication goes through a coordinator, router, or parent.
7. **Repository pa