/apple-dev:add-approuterfrom apple-dev
Adopt AppRouter (github.com/dimillian/AppRouter) for type-safe SwiftUI navigation with sheets and deep linking. Use when starting an app's nav layer or replacing ad-hoc `NavigationStack` path management. SimpleRouter or tab Router.
Ships in apple-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.
Read when SKILL.md points to them.
@State paths, sheet flags, and tab indices are scattered across views.NavigationStack with local @State is enough..fullScreenCover, multiple simultaneous sheets, or sheets that are part of the URL.https://github.com/dimillian/AppRouter, pin from 1.0.0.Package.swift: .package(url: "https://github.com/dimillian/AppRouter", from: "1.0.0").import AppRouter in the file that defines your router root.DestinationType: Hashable enum of push destinations. One requirement, static func from(path:fullPath:parameters:) -> Self?, used by the URL parser. Return nil if you skip deep linking.SheetType: Hashable & Identifiable enum of sheets. No methods. Common pattern, var id: Int { hashValue }.TabType: Hashable, CaseIterable, Identifiable, Sendable enum of tabs, with var icon: String (SF Symbol). Only needed for Router.SimpleRouter<Destination, Sheet> for one stack. Router<Tab, Destination, Sheet> for a tab app with one independent stack per tab.Both routers are @Observable @MainActor final class. Sheets, one slot, shared across tabs in Router.
enum Destination: DestinationType and enum Sheet: SheetType for the app's navigation vocabulary. Add enum AppTab: TabType only if you have tabs.@State. Inject with .environment(router). For tabs, also set .environment(\.currentTab, router.selectedTab).NavigationStack(path: $router.path) (Simple) or NavigationStack(path: $router[tab]) (tabs). Bind sheets with .sheet(item: $router.presentedSheet). In children, read with @Environment(SimpleRouter<Destination, Sheet>.self) and call router.navigateTo(.foo) or router.presentSheet(.bar).references/simple-and-tab-router.md: full worked examples of SimpleRouter and Router.references/deep-linking.md: URL format, onOpenURL, contextual routing, parameter limits.myapp://users/detail?id=u1 lands on the wrong destination or returns false. Cause: URL.deepLink uses String(describing:) per case; only argumentless cases serialize cleanly, and context prefixes silently skip when from(...) returns nil. Fix: build URLs with URLComponents, use fullPath to disambiguate inside from(...). See references/deep-linking.md.presentSheet overwrites. Fix: dismiss first, or push a NavigationStack inside the sheet for multi-step flows.router.navigate(to: url) lands in the wrong tab. Cause: navigate(to: URL) always writes into selectedTab. Fix: set router.selectedTab first; parse the tab from the URL host yourself.myapp://detail/detail. Cause: parser uses fullPath.firstIndex(of: path) so both calls see the same previous token. Fix: known gap, use distinct tokens (item, subitem) or pass position via a query parameter.router.navigate(to: url) returns false and nothing happens. Cause: every from(...) returned nil. Fix: log the parse result; ensure at least one path token resolves..fullScreenCover, no popover.[Destination] only; present sheets after navigating.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub joaquincampo/my-plugins --plugin apple-dev8 skills in this plugin
/foundation-models-integrationAdd Apple's on-device Foundation Models (Apple Intelligence) to a SwiftUI app: streaming, `@Generable` structured output, `Tool` protocol, availability checks. iOS / iPadOS / macOS / visionOS 26+. Triggers on `SystemLanguageModel`, `LanguageModelSession`, `@Generable`./ios26-liquid-glass-adoptionAdopt iOS 26 / iPadOS 26 / macOS 26 SwiftUI APIs: Liquid Glass, modernized toolbars and tab bars, matched transitions, scroll position. Triggers: `glassEffect`, `buttonStyle(.glass)`, `ToolbarSpacer`, `matchedTransitionSource`, `tabBarMinimizeBehavior`./modular-package-skeleton