/navigator:swiftui-navigation-navigatorfrom navigator
Guides SwiftUI navigation using the Navigator/NavigatorUI library: NavigationDestination enums, ManagedNavigationStack, NavigationLink(to:label:), deep linking, checkpoints, and dismissible views.
Ships in navigator. 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.
When assisting the user with SwiftUI navigation in a project that uses Navigator or the NavigatorUI library, follow the conventions and patterns below. The skill is agent-agnostic; apply it whenever the user mentions Navigator, NavigatorUI, SwiftUI navigation, deep linking, checkpoints, managed navigation stack, or navigation destinations.
Apply this skill when the user:
NavigationDestination (Hashable + View). Provide a body that returns the correct view for each case; use associated values for parameters. Do not use NavigationLink(value:label:) or NavigationLink(destination:label:) for destination-driven navigation when using Navigator's no-registration flow.NavigationLink(to: SomeDestination.case, label: { ... }), or the text shorthand NavigationLink("Title", to: SomeDestination.case) (Navigator 2.1.2+; title may be a String, LocalizedStringKey, or LocalizedStringResource). Navigator wraps the value internally; no per-type navigationDestination(for: MyType.self) registration is required.ManagedNavigationStack { ... } where a NavigationStack would go. It provides the Navigator in the environment and a single internal registration for all NavigationDestination types.@Environment(\.navigator) var navigator. Use the navigator for the current stack (from the closure of ManagedNavigationStack or from a child view). Do not assume the environment navigator is the root when inside a tab or presented view—it is the navigator for that stack.navigator.navigate(to: HomeDestinations.pageN(55)) or navigator.push(HomeDestinations.pageN(55)); override method with navigator.navigate(to: destination, method: .sheet) (or .managedSheet, .cover, .managedCover, .send)..navigate(to: $optionalDestination) or .navigate(trigger: $bool, destination: someDestination).NavigationCheckpoints and checkpoint(); attach with .navigationCheckpoint(KnownCheckpoints.home); return with navigator.returnToCheckpoint(KnownCheckpoints.home) or .navigationReturnToCheckpoint(trigger: $flag, checkpoint: KnownCheckpoints.home).navigator.send(RootTabs.home, HomeDestinations.page2) (or navigator.perform(route: KnownRoutes.profilePhoto)). Receive with .onNavigationReceive { (tab: RootTabs) in ... return .auto } or .onNavigationReceive(assign: $selectedTab); for destinations use .onNavigationReceive { (dest: HomeDestinations, navigator) in navigator.navigate(to: dest); return .auto } or .navigationAutoReceive(HomeDestinations.self).navigator.dismiss(). From a parent use dismissPresentedViews(), dismissAnyChildren(), or dismissAny() as appropriate. Custom sheets/covers presented outside navigate(to:) must be wrapped in ManagedPresentationView { content } or content.managedPresentationView() (or ManagedNavigationStack { content } if the sheet has its own stack) so Navigator can manage and dismiss them..navigationLocked() on a view to make global dismissAny() throw (e.g. during a transaction).For detailed explanations, code samples, and "why" notes, use the reference files:
NavigationLink(to: Destination.case); use ManagedNavigationStack; use checkpoints for "return to this place"; use send/receive for deep linking and tab switching; wrap custom presented views in ManagedPresentationView or .managedPresentationView() when Navigator should manage them.NavigationLink(destination:label:); use NavigationLink(value:label:) for destination types when aiming for no-registration flow (unless you explicitly register); present sheets or covers without wrapping when Navigator needs to dismiss or deep-link into the app.Create a root Navigator(configuration: NavigationConfiguration(...)) and apply .navigationRoot(navigator) at the root view. Register provided destinations and receive handlers (e.g. .onNavigationProvidedView(...), .onNavigationRoute(router), .onNavigationReceive(...)) above .navigationRoot(navigator) as needed.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub hmlongco/navigator --plugin navigatorOther plugins' skills for the same job