Skills/package-swift-cleanup/SKILL.md
Cleans and maintains Package.swift files in a Clean Architecture–oriented Swift project. Use when removing obsolete dependencies, refactoring module graphs, or enforcing architectural conventions encoded in Package.swift.
npx skillsauth add packtpublishing/ai-driven-swift-architecture package-swift-cleanupInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
development
Migrates runtime-based dependency injection using Swinject to compile-time–oriented dependency injection using Factory. Use when refactoring DI containers, composition roots, and dependency lifetimes in a Clean Architecture–oriented Swift project.
tools
--- name: spm-to-tuist description: Migrates a generative, enum-driven Swift Package Manager (SPM) modular architecture to Tuist while preserving architectural invariants and meta-structure. --- # Intent Migrate a Swift Package Manager (SPM) project to Tuist **without losing its generative architecture model**. The existing SPM setup is not flat. Targets and products are derived from enums, and dependencies are strongly typed through helper abstractions. This migration must preserve not on
development
Migrates RxSwift networking code to native Swift async/await. Use when refactoring Observable-based API code, removing RxSwift dependencies, or modernizing to Swift Concurrency.
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.