ios-architecture — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited ios-architecture (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
You are an iOS architecture expert. Apply the patterns and principles below when helping the user design, scaffold, or refactor an iOS application.
| 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 |
import Foundation only. They expose published state; the View observes it.NetworkError -> DomainError -> user-facing localized string. Never expose raw HTTP codes to the UI.Use this flowchart to decide which reference file to consult:
START
|
v
Is the question about project-wide architecture or choosing a pattern?
YES -> Read this file (SKILL.md) first, then the relevant reference.
NO -> Continue below.
|
v
Is the question about MVVM, @Observable, ViewModels, or View-ViewModel binding?
YES -> Read references/mvvm.md
|
v
Is the question about Clean Architecture, layers, Use Cases, domain entities, or DTOs?
YES -> Read references/clean.md
|
v
Is the question about TCA, Reducers, Store, @ObservableState, Effects, or ComposableArchitecture?
YES -> Read references/tca.md
|
v
Is the question about SPM modules, Package.swift, feature modules, or build times?
YES -> Read references/modular.md
|
v
Is the question about Repository, Coordinator, DI, error handling, POP, or code organization?
YES -> Read references/patterns.md
|
v
Read the most relevant reference based on context, or consult multiple if the question spans areas.MyApp/
├── App/
│ ├── MyAppApp.swift
│ └── AppDelegate.swift (if needed)
├── Features/
│ ├── Home/
│ │ ├── HomeView.swift
│ │ ├── HomeViewModel.swift
│ │ └── Components/ (small subviews)
│ ├── Profile/
│ │ ├── ProfileView.swift
│ │ └── ProfileViewModel.swift
│ └── Settings/
│ ├── SettingsView.swift
│ └── SettingsViewModel.swift
├── Models/
│ ├── User.swift
│ └── Product.swift
├── Services/
│ ├── NetworkService.swift
│ ├── AuthService.swift
│ └── Protocols/
│ ├── NetworkServiceProtocol.swift
│ └── AuthServiceProtocol.swift
├── Repositories/
│ ├── UserRepository.swift
│ └── ProductRepository.swift
├── Utilities/
│ ├── Extensions/
│ └── Helpers/
└── Resources/
├── Assets.xcassets
└── Localizable.xcstringsMyApp/
├── App/
│ ├── MyAppApp.swift
│ ├── DIContainer.swift
│ └── AppCoordinator.swift
├── Domain/ (NO framework imports)
│ ├── Entities/
│ │ ├── User.swift
│ │ └── Product.swift
│ ├── UseCases/
│ │ ├── FetchUserUseCase.swift
│ │ └── PlaceOrderUseCase.swift
│ ├── Repositories/ (protocols only)
│ │ ├── UserRepositoryProtocol.swift
│ │ └── ProductRepositoryProtocol.swift
│ └── Errors/
│ └── DomainError.swift
├── Data/
│ ├── Network/
│ │ ├── APIClient.swift
│ │ ├── Endpoints/
│ │ └── DTOs/
│ ├── Persistence/
│ │ ├── CoreDataStack.swift
│ │ └── UserDAO.swift
│ ├── Repositories/ (implementations)
│ │ ├── UserRepository.swift
│ │ └── ProductRepository.swift
│ └── Mappers/
│ ├── UserMapper.swift
│ └── ProductMapper.swift
├── Presentation/
│ ├── Features/
│ │ ├── Home/
│ │ │ ├── HomeView.swift
│ │ │ └── HomeViewModel.swift
│ │ └── Profile/
│ │ ├── ProfileView.swift
│ │ └── ProfileViewModel.swift
│ ├── Navigation/
│ │ └── Router.swift
│ └── DesignSystem/
│ ├── Components/
│ └── Theme.swift
└── Resources/MyApp/
├── App/
│ ├── MyAppApp.swift
│ └── AppFeature.swift (root reducer)
├── Features/
│ ├── Home/
│ │ ├── HomeFeature.swift (State, Action, Reducer)
│ │ └── HomeView.swift
│ ├── Profile/
│ │ ├── ProfileFeature.swift
│ │ └── ProfileView.swift
│ └── Auth/
│ ├── AuthFeature.swift
│ └── AuthView.swift
├── Shared/
│ ├── Models/
│ ├── Clients/ (Dependencies)
│ │ ├── APIClient.swift
│ │ └── UserDefaultsClient.swift
│ └── Components/
└── Resources/| Anti-Pattern | Problem | Fix |
|---|---|---|
| Massive ViewController/View | Unreadable, untestable | Extract ViewModel + services |
| ViewModel imports SwiftUI | Couples logic to UI framework | Import Foundation only |
| Singletons for everything | Hidden dependencies, hard to test | Protocol + DI |
| Feature A imports Feature B | Tight coupling, circular deps | Shared module or coordinator |
| Network calls in ViewModel | ViewModel does too much | Repository/Service layer |
| Force unwrapping optionals | Crashes in production | Guard/if-let + error handling |
| God model (one huge struct) | Hard to maintain | Split into domain entities |
| Skipping protocols | Cannot mock, cannot test | Protocol for every external dep |
| Architecture | Unit Test Target | What to Test |
|---|---|---|
| MVVM | ViewModels | State transitions, service calls, error handling |
| Clean | UseCases + ViewModels | Business logic in isolation, correct layer interaction |
| TCA | Reducers via TestStore | State changes, effects, action sequences |
| All | Repositories (with mocks) | Data mapping, caching logic, error propagation |
Read the appropriate reference file for detailed patterns, code examples, and implementation guidance:
references/mvvm.md -- MVVM with @Observable, ViewModel patterns, testingreferences/clean.md -- Clean Architecture layers, DI, Use Casesreferences/tca.md -- The Composable Architecture patternsreferences/modular.md -- SPM modules, feature modules, build optimizationreferences/patterns.md -- Repository, Coordinator, error handling, POP, DI, code organization~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.