swiftpm-modularization
Installation
SKILL.md
SwiftPM Modularization
When to invoke
- Starting a new Swift App project and deciding how to split modules.
- Writing the first version of
Package.swift. - Wanting to reserve the option of shipping core logic to Android / cross-platform later.
- Introducing CloudKit / GameKit / StoreKit and deciding the import scope.
- User asks "single Package or multiple", "should the App target be thin", "how do I wire DI".
Default decisions
Single Package + multiple targets
- Put all modules in one Swift Package, splitting by target (named e.g.
<Project>Kit). - Don't start with multiple Packages — they only add
Package.swiftmaintenance cost and CI resolution time.