/swift-modern-dev:swift-app-scaffoldfrom swift-modern-dev
Bootstraps new SwiftUI iOS/macOS apps with modern architecture: @Observable, NavigationStack, SwiftData, and Swift Testing. Scaffolds Package.swift, app entry, and feature-based folder structure.
Ships in swift-modern-dev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
New test files, test targets requiring new files, and test-only helpers/fixtures require explicit user authorization. A request to implement, fix, test, or verify does not by itself authorize their creation. Prefer existing tests and direct runtime checks; ask only when a specific new test has concrete benefit. Run checks appropriate to the change and repeat only after relevant changes, failures, or unresolved concerns.
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 when new unit tests are authorized | Creating new test files without authorization |
| 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"),
// Add a test target only when its new test files are explicitly authorized.
]
)
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.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
swiftui, ios, macos, scaffolding, package-swift, app-bootstrap
7 skills in this plugin
/ios-accessibilityUse when implementing or auditing VoiceOver, Dynamic Type, accessibility labels, focus, contrast, or Hit-testing for SwiftUI iOS/macOS apps./memory-leak-diagnosisUse when investigating memory growth, retain cycles, leaks in Instruments, Task cancellation issues, or ARC problems in Swift 6 apps./swift-anti-pattern-guardUse when reviewing Swift code for outdated patterns, modernizing a project, running architecture health checks, or grepping for ObservableObject, DispatchQueue.main, NavigationView, or Core Data.npx claudepluginhub pstuart/pstuart --plugin swift-modern-devOther plugins' skills for the same job