/ios-swift-skills:swift-modern-architecture-skillfrom ios-swift-skills
Designs SwiftUI app architecture for Swift 6 with strict concurrency, targeting iOS 18/macOS 15. Covers Observation, SwiftData, structured concurrency, navigation state, dependency boundaries, and test seams.
Ships in ios-swift-skills. 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.
Read when SKILL.md points to them.
Design feature boundaries for the product's actual constraints. “Modern” means safe, testable, compatible, and maintainable—not replacing supported frameworks by reflex.
Ask for the real targets before generating code. For iOS 17, Observation and SwiftData are available, but this package's complete examples intentionally use the iOS 18 baseline. For older deployments, retain supported compatibility paths. Keep newer APIs behind availability checks where the project still supports older releases.
Activate when the user asks to design or modernize an app/feature architecture under the baseline above. Do not activate merely because a prompt mentions Swift, networking, persistence, concurrency, navigation, Core Data, Combine, Dispatch, or XCTest.
Before recommending a migration, establish:
| Concern | Good default for a new baseline app | Supported alternatives and reasons to keep them |
|---|---|---|
| UI observation | @Observable | ObservableObject/Combine for older targets, existing APIs, or publisher semantics |
| Persistence | SwiftData for a compatible model and requirements | Core Data for mature stores, established migrations, or capabilities the app already relies on; SQLite/GRDB or files when requirements fit better |
| Async work | async/await, task groups, actors | Dispatch and operation queues for C/Obj-C interop, queue-specific APIs, existing scheduling, or measured low-level needs |
| Unit tests | Swift Testing for new unit/integration tests | XCTest remains supported and is still needed for UI tests and common performance-test workflows |
| Navigation | Value-driven NavigationStack/NavigationSplitView | Existing coordinators or UIKit navigation when the app's platform/UI architecture requires them |
SwiftData can coexist with Core Data during an incremental migration. Swift Testing and XCTest can coexist in the same test target. Never present a supported framework as categorically obsolete.
Organize by feature and dependency direction, not by one global layer for every type:
App/
Features/
Weather/
WeatherScreen.swift
WeatherFeature.swift
WeatherClient.swift
Domain/
Persistence/
Networking/
@MainActor explicitly. Do not rely on a project's optional default-actor-isolation setting.@Observable reference in @State so SwiftUI owns its lifetime.@Bindable locally when child UI needs bindings.@Environment only for intentionally subtree-scoped dependencies.Sendable or actor-isolated as their shared mutable state requires.import Observation
import SwiftUI
@MainActor
@Observable
final class SignInFeature {
var email = ""
private(set) var isSubmitting = false
}
@MainActor
struct SignInScreen: View {
@State private var feature = SignInFeature()
var body: some View {
@Bindable var feature = feature
TextField("Email", text: $feature.email)
}
}
See the complete ownership example.
async let, and task groups when work belongs to an async operation.Task only when an object truly owns work across calls; cancel it on replacement and teardown.didSet for rapidly changing selection/search input.@MainActor; isolate shared mutable service state with actors.See the complete latest-request-wins example.
ModelContainer.ModelContext.save() as throwing. Propagate the error or present it; never use try? for user data writes.VersionedSchema and SchemaMigrationPlan for schema changes. An ad hoc launch-time loop is not a substitute for a migration plan.See the complete filtered-delete example and migration guidance.
Sendable client protocol around the feature's need, not an unbounded generic API client.Hashable route values and value-driven destinations.Do not combine persistence, observation, navigation, networking, and test-framework migrations into one unreviewable rewrite.
README.md (opens in a new tab)agents/openai.yaml (opens in a new tab)docs/IMPACT_COMPARISON.md (opens in a new tab)docs/INDEX.md (opens in a new tab)docs/PACKAGE_SUMMARY.md (opens in a new tab)docs/QUICK_START.md (opens in a new tab)examples/observable_ownership.swift (opens in a new tab)examples/prompts.md (opens in a new tab)examples/todo_filtered_delete.swift (opens in a new tab)examples/weather_request_cancellation.swift (opens in a new tab)references/anti-patterns.md (opens in a new tab)references/examples.md (opens in a new tab)references/modern-patterns.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
swiftui, swift-6, ios-18, macos-15, architecture-design, strict-concurrency
npx claudepluginhub fal3/swift-apple-skills --plugin ios-swift-skills14 skills in this plugin
/app-intents-widgetsDesign, implement, debug, and verify stable App Intents and WidgetKit integrations, including AppIntent, AppEntity, AppEnum, entity queries, AppShortcutsProvider, dependency injection, shared extension data, widget timelines, relevance, controls, Live Activity selection, deep links, handoff, confirmation, and privacy. Use when exposing app actions to Siri or Shortcuts, building configurable or interactive widgets, sharing state with extensions, or choosing the correct system surface for an action. Do not use for ordinary in-app buttons, generic SwiftUI layout, background scheduling without a widget or intent, SiriKit-only legacy work with no migration request, or Live Activity push-server implementation as the sole task./apple-evaluationsBuild, review, and debug generative AI quality regression suites with Apple's Evaluations framework, including Evaluation, datasets, metrics, Swift Testing integration, calibrated model judges, and tool-call trajectories. Use when measuring an Apple-platform intelligence feature, comparing prompts or models, or diagnosing misleading evaluation results. Do not use for ordinary deterministic unit tests, UI automation, performance profiling alone, model training, or an unrelated vendor's evaluation framework./cross-platform-app-development-skillUse when one Swift/SwiftUI product intentionally targets two or more of iOS, iPadOS, Mac Catalyst, macOS, watchOS, tvOS, or visionOS and needs shared-domain design, adaptive UI, capability boundaries, navigation, input, scenes, storage, or conditional compilation. Do not use for a single-platform feature or for non-Apple cross-platform frameworks./ios-accessibility-skillUse when iOS or iPadOS accessibility design, implementation, review, or testing involves VoiceOver, Voice Control, Switch Control, Full Keyboard Access, Dynamic Type, contrast, motion, focus, media alternatives, or Assistive Access. Do not use for generic visual styling or platform-neutral UI work with no accessibility requirement./ios-animation-graphics-skillDesign, implement, debug, and review accessible Apple-platform animation and graphics with SwiftUI animation, Canvas, TimelineView, matched geometry, phase/keyframe animators, Core Animation, and Lottie. Use for motion design, custom drawing, transitions, particles, animated symbols, UIKit/AppKit bridging, Reduce Motion, and animation performance. Prefer native SwiftUI for app UI; use Core Animation or Lottie only when their capabilities are needed. Do not use this skill for SpriteKit/Metal game engines, video rendering, or image editing unless animation integration is the specific task./iphone-duo-designUse when designing, adapting, implementing, or auditing an iOS app for iPhone Duo, including resizing, folding, vertical bars, reserved regions, state continuity, multiple scenes, camera behavior, and accessibility. Produce evidence-based readiness findings with SDK gates and fallbacks. Do not use for generic iPhone work without Duo or adaptive-layout requirements, Android foldables, Microsoft Surface Duo, Google Duo, or claims of Apple certification.Other plugins' skills for the same job