Modular Clean Architecture template for iOS apps built with SwiftUI and Swift Package Manager on Swift 6.2 with default main-actor isolation. Use when scaffolding a new iOS feature, organizing a SwiftUI app into layered SPM packages (NetworkService, Endpoints, Repositories, UseCases, DIContainer, feature views), applying protocol-first cross-module dependencies, wiring up Builder-based feature instantiation, or migrating ObservableObject code to @Observable with Swift 6 concurrency and Swift Testing.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ios-clean-architecture:ios-clean-architectureThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This template provides a modular Clean Architecture pattern for iOS apps built with Swift 6.2 and SwiftUI. Here are the key characteristics:
This template provides a modular Clean Architecture pattern for iOS apps built with Swift 6.2 and SwiftUI. Here are the key characteristics:
The template follows a layered dependency structure where "outer layers depend on inner layers, never the reverse." Data flows unidirectionally from user interactions through ViewModels → UseCases → Repositories → NetworkServices.
@Published / ObservableObject patternEach responsibility occupies its own SPM package: NetworkService, Endpoints, Repositories, UseCases, DependencyContainer, feature-specific View packages, shared UI components, and preview utilities.
The template uses Swift Testing (not XCTest) with test doubles: MockNetworkService, FakeFeedUseCase, and SpyRouter classes that enable isolation of components during verification.
Do not write @MainActor manually in Swift 6.2 targets with default isolation enabled. Avoid force unwrapping except within Builder internals. Never allow ViewModels to call URLSession or Repositories directly—route through UseCases. Use .xcworkspace, not .xcodeproj alone.
Provides a checklist for code reviews covering functionality, security, performance, maintainability, tests, and quality. Use for pull requests, audits, team standards, and developer training.
npx claudepluginhub obadasemary/ios-clean-architecture-skill --plugin ios-clean-architecture