From swift-modern-dev
Use when starting a new iOS or macOS app, bootstrapping Package.swift, or scaffolding a modern SwiftUI architecture with Observation, SwiftData, NavigationStack, and Swift Testing.
How this skill is triggered — by the user, by Claude, or both
Slash command
/swift-modern-dev:swift-app-scaffoldThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Bootstrap a modern SwiftUI app without assuming a proprietary shared package, fixed workspace path, or organization-specific module layout.
Bootstrap a modern SwiftUI app without assuming a proprietary shared package, fixed workspace path, or organization-specific module layout.
| Prefer | Avoid |
|---|---|
| Deployment targets chosen from product requirements | Raising targets without confirming supported devices |
@Observable + NavigationStack | ObservableObject / NavigationView in new code |
| SwiftData when it fits the persistence model | Adding persistence before the data model requires it |
| Swift Testing for new unit tests | Shipping a new project without a test target |
| Explicit, reviewed package dependencies | Adding a shared package only for convenience |
Respect an existing repository's architecture and dependency policy when adding a target to an established codebase.
// swift-tools-version: 6.2
import PackageDescription
let package = Package(
name: "YourApp",
platforms: [
.iOS(.v18),
.macOS(.v15),
],
products: [
.library(name: "YourAppFeature", targets: ["YourAppFeature"]),
],
dependencies: [
// Add only reviewed dependencies required by the product.
],
targets: [
.target(name: "YourAppFeature"),
.testTarget(
name: "YourAppFeatureTests",
dependencies: ["YourAppFeature"]
),
]
)
Adjust tools and platform versions to the installed toolchain and product support policy. Pin dependencies according to the repository's supply-chain rules.
import SwiftUI
@main
struct YourApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
Add a SwiftData container only when the app has persistent models:
import SwiftData
WindowGroup {
ContentView()
}
.modelContainer(for: [Item.self])
YourApp/
├── App/
├── Features/
├── Models/
├── Services/
└── Resources/
YourAppTests/
Adapt the structure to the product. Prefer feature boundaries over catch-all utility folders as the app grows.
npx claudepluginhub pstuart/pstuart --plugin swift-modern-devUse when writing Swift or SwiftUI code, designing iOS/macOS architecture, modernizing legacy patterns, or choosing ViewModels, SwiftData, navigation, or concurrency APIs.
Generates a minimal SwiftUI iOS app scaffold with a single .xcodeproj via XcodeGen, skipping workspaces, packages, and tests unless requested.
Enforces opinionated SwiftUI modular MVVM-C architecture for iOS apps. Guides DependencyContainer, coordinators, route shells, and repository protocol enforcement.