navigation-stack

Coordinate type-safe SwiftUI navigation with a Hashable AppRoute enum.

1|Updated Apr 24, 2026
One-click install
npx skills add https://github.com/dimitriRemoiville/cc-mobile --skill navigation-stack
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: navigation-stack
Source: https://github.com/dimitriRemoiville/cc-mobile/tree/main/plugins/cc-mobile-ios/skills/navigation-stack
Command: npx skills add https://github.com/dimitriRemoiville/cc-mobile --skill navigation-stack

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Complex navigation flows in SwiftUI apps are hard to maintain; this pattern provides type-safe routing using a Hashable AppRoute and a single source of truth for navigation state.

Core Features & Use Cases

  • Typed destinations via a Hashable AppRoute enum and .navigationDestination(for:) bindings.
  • Path binding to drive programmatic navigation, deep links, and tabbed stacks.
  • Coordination of sheets, push, and per-tab navigation to maintain a consistent back stack.

Quick Start

Instantiate a root NavigationStack and bind a path state to drive navigation using AppRoute.

Frequently Asked Questions about navigation-stack

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage complex SwiftUI navigation stacks with deep links and modals?

SwiftUI navigation stacks become manageable by binding a Hashable AppRoute enum to a path array, establishing a single source of truth for routing. This pattern coordinates deep links, sheets, and push actions predictably across hierarchical screens.

What is the best way to handle per-tab navigation stacks in SwiftUI?

Per-tab navigation in SwiftUI is handled by assigning a unique path array bound to a root NavigationStack for each tab. This maintains independent back stacks while sharing a typed AppRoute enum for consistent destination routing.

How do I set up typed destinations using NavigationStack in SwiftUI?

Typed destinations are set up by defining a Hashable AppRoute enum and applying a single .navigationDestination(for:) binding to a root NavigationStack. This ensures type-safe routing for programmatic push and pop operations.

Does this type-safe navigation pattern support sheet coordination alongside push navigation?

Yes, this type-safe navigation pattern supports sheet coordination by binding a Hashable AppRoute to the navigation path. It manages sheets and push actions within the same stack to maintain a consistent back stack.

Can I drive programmatic push and pop navigation without losing the back stack in SwiftUI?

Yes, programmatic push and pop navigation is driven by binding a path array to your NavigationStack. Using a typed AppRoute enum ensures the back stack remains predictable during deep link routing or modal dismissal.