Cleans and maintains Package.swift files in a Clean Architecture–oriented Swift project...
This project uses Package.swift files not only as dependency manifests, but as architectural artifacts.
Package files encode:
This structure is not standard Swift Package Manager usage and must be handled explicitly.
Modules such as BasketData, ProductData, and UserData belong to the Data layer.
They provide infrastructure implementations (repositories, services, data sources) scoped by domain.
Rules:
Dependencies are classified using enums:
ExternalModule → third-party libraries (e.g. RxSwift)Utility → cross-cutting technical packages (e.g. Networking / API)AbstractionModule → domain-facing contracts (interfaces)These enums are semantic, not incidental.
When a dependency is removed from the codebase:
Required actions:
Package.dependenciesForbidden actions:
Package.swift must describe the current architecture, not its history.
Any dependency classification entry (external, abstraction, or utility) that is no longer referenced by any target must be removed.
This includes:
Leaving unused architectural constructs in Package.swift is considered a structural error.
This cleanup must be applied consistently:
Partial cleanup is not acceptable.
Before considering Package.swift cleanup complete:
The goal of this Skill is to ensure that Package.swift remains:
This Skill prioritizes semantic clarity over mechanical cleanup.