No slash command · from apple-plugin
Handles SwiftUI navigation patterns: NavigationStack with value-based routing, NavigationSplitView for iPad/Mac, TabView, sheets, popovers, alerts, deep links (custom URL schemes, Universal Links), state restoration, and UIKit interop.
Ships in apple-plugin. 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.
NavigationStack(path: $router.path) + a Route enum + .navigationDestination(for: Route.self) → value-based routing with a router. Add a case to the enum and its destination; never push with NavigationLink(destination:) alongside it.NavigationSplitView → sidebar / content / detail driven by selection state.TabView with one stack per tab → each tab owns its own path.UINavigationController / coordinators → push UIHostingControllers through the coordinator.StackState / @Presents navigation in reducers.Never use the deprecated NavigationView in new code.
enum OrdersRoute: Hashable {
case detail(Order.ID)
case edit(Order.ID)
}
@MainActor @Observable
final class OrdersRouter {
var path: [OrdersRoute] = []
func show(_ route: OrdersRoute) { path.append(route) }
func popToRoot() { path.removeAll() }
}
NavigationStack(path: $router.path) {
OrdersList()
.navigationDestination(for: OrdersRoute.self) { route in
switch route {
case .detail(let id): OrderDetail(id: id)
case .edit(let id): OrderEditor(id: id)
}
}
}
Codable for restoration.NavigationLink(value: OrdersRoute.detail(order.id)) { OrderRow(order: order) } for user taps; router.show(...) for programmatic navigation.navigationDestination once per value type, on a view inside the stack — not inside a lazy container..navigationTitle, .navigationBarTitleDisplayMode (iOS); toolbar items with ToolbarItem(placement:) using semantic placements (.primaryAction, .confirmationAction, .cancellationAction).NavigationSplitView { Sidebar(selection: $selection) } detail: { Detail(id: selection) }; selection drives the detail, a NavigationStack inside the detail column handles deeper pushes.TabView(selection: $tab) with the Tab API (Tab("Orders", systemImage: "list.bullet", value: .orders) { … }) when the deployment target allows it, else .tabItem. .tabViewStyle(.sidebarAdaptable) turns tabs into a sidebar on iPad and Mac..sheet(item: $editing) with an Identifiable item rather than a boolean + optional pair; .fullScreenCover (iOS) only for immersive flows; .popover (anchored on iPad / Mac, a sheet on iPhone); .inspector for a trailing detail panel on iPad / Mac.@Environment(\.dismiss); return results through a callback or the shared model, not by reaching into the presenter..alert / .confirmationDialog with presenting: data; destructive actions use role: .destructive and confirmation..presentationDetents([.medium, .large]) only where the design calls for it.CFBundleURLTypes; Universal Links need the Associated Domains entitlement (applinks:example.com) and an apple-app-site-association file served by the backend..onOpenURL { url in router.handle(url) } at the root (plus .onContinueUserActivity(NSUserActivityTypeBrowsingWeb) if needed).Route with URLComponents; check scheme and host exactly, validate every parameter (type, range, ownership) and fall back to the root for anything unknown. Never navigate to a screen that performs an action (payment, delete, sign-in with a token) without the user confirming in-app.@SceneStorage for small per-scene state (selected tab, a Codable path encoded to Data). Restore defensively: drop routes whose data no longer exists.What SKILL.md sets; muted values are Claude Code's defaults
7 skills in this plugin
/apple-testingTesting Apple apps: what to unit-test in a SwiftUI app (observable models, services, mappers, reducers), MainActor-isolated tests, SwiftData and Core Data in memory, protocol doubles for system services, TCA TestStore, XCUITest UI tests (launch arguments, accessibility identifiers, page objects), snapshot tests with swift-snapshot-testing, previews as smoke tests, running tests per platform with xcodebuild and test plans, coverage. Builds on swift-foundation:swift-testing for framework basics.
Use this skill to:
- Test app logic without launching the UI.
- Write UI tests that survive layout changes.
- Run the right scheme and destination for each platform target.
Do NOT use this skill for:
- Swift Testing / XCTest basics — see swift-foundation:swift-testing.
- Server-side Swift tests — see swift-plugin.
/ios-ipadosiPhone and iPad specifics for Apple apps: device families and size classes, adaptive layouts across iPhone, iPad and foldable iPhone screens, iPad multitasking and resizable windows, multiple scenes, pointer, hardware keyboard shortcuts, drag and drop, Apple Pencil, app lifecycle and background work (BGTaskScheduler, background URLSession), push and local notifications, permissions and Info.plist usage descriptions, privacy manifests, WidgetKit / Live Activities / App Intents extensions, Mac Catalyst and "Designed for iPad" on Mac.
Use this skill to:
- Make a screen correct on every iPhone and iPad size the target supports.
- Add a system capability (notifications, background refresh, location, camera) with the right plist keys and permission flow.
- Add or extend a widget, Live Activity or App Intent.
Do NOT use this skill for:
- Mac-native (AppKit / SwiftUI macOS) targets — see apple-plugin:macos-app.
- watchOS targets — see apple-plugin:watchos-app.
/macos-appmacOS app specifics: SwiftUI scenes on the Mac (WindowGroup, Window, DocumentGroup, Settings, MenuBarExtra, UtilityWindow), opening and managing windows, menus and commands (CommandMenu, CommandGroup, keyboard shortcuts, focused values), Mac-idiomatic UI (Table, Inspector, toolbars, sidebar, context menus, hover), document-based apps and file access, App Sandbox and security-scoped bookmarks, hardened runtime and notarization constraints, AppKit interop, login items and menu-bar apps, Mac Catalyst vs native.
Use this skill to:
- Make a feature feel native on the Mac instead of a stretched iPad screen.
- Add windows, menu commands, settings and keyboard shortcuts.
- Read and write user files correctly under the App Sandbox.
Do NOT use this skill for:
- iPad apps running on Mac via Catalyst or "Designed for iPad" — see apple-plugin:ios-ipados.
- Shared SwiftUI view rules — see apple-plugin:swiftui-conventions.
/swiftui-conventionsSwiftUI conventions for Apple apps: app and scene structure, view composition and identity, modifiers and custom ViewModifiers, layout (stacks, Grid, ViewThatFits, Layout), lists and lazy containers, async work with .task, environment values (@Entry), design-system tokens from the asset catalog, Dynamic Type, Dark Mode, accessibility, String Catalog localization, #Preview, UIKit / AppKit interop, performance. Platform specifics live in ios-ipados, macos-app and watchos-app.
Use this skill to:
- Build screens out of small, previewable views that match the rest of the app.
- Keep side effects out of view bodies.
- Make every new screen accessible, localized and theme-aware.
- Bridge to UIKit / AppKit only where SwiftUI cannot do the job.
Do NOT use this skill for:
- Where state lives and how it flows — see apple-plugin:swiftui-state.
- Navigation, deep links, sheets — see apple-plugin:swiftui-navigation.
- Tests and previews as tests — see apple-plugin:apple-testing.
/swiftui-stateState and data flow in SwiftUI apps: Observation (@Observable, @State, @Bindable, @Environment), legacy ObservableObject (@StateObject, @ObservedObject, @EnvironmentObject, @Published) in existing code, ownership rules, MainActor-isolated models, dependency injection, SwiftData (@Model, ModelContainer, ModelContext, @Query, migrations) and Core Data in existing apps, The Composable Architecture when installed. Detect and follow the pattern in place.
Use this skill to:
- Decide who owns a piece of state and how it reaches a view.
- Write observable models that update only the views that read them.
- Persist data with SwiftData or the project's existing store.
- Inject services so models are testable.
Do NOT use this skill for:
- View composition and layout — see apple-plugin:swiftui-conventions.
- Navigation state — see apple-plugin:swiftui-navigation.
/watchos-appwatchOS app specifics: single-target SwiftUI watch apps (companion or independent), glanceable design for small screens, navigation on the watch, the Digital Crown, complications and Smart Stack widgets with WidgetKit, background refresh and extended runtime sessions, workouts and HealthKit, WatchConnectivity with the iPhone app, networking and data sync constraints, notifications, power and performance limits.
Use this skill to:
- Build a watch screen that is useful in a two-second glance.
- Add or update a complication / Smart Stack widget.
- Share data between the iPhone and the watch correctly.
- Run workout or health features within watchOS limits.
Do NOT use this skill for:
- iPhone / iPad targets — see apple-plugin:ios-ipados.
- Shared SwiftUI view rules — see apple-plugin:swiftui-conventions.
npx claudepluginhub aratkruglik/claude-sdlc --plugin apple-pluginOther plugins' skills for the same job