swift-navigation-swiftui

Drive SwiftUI navigation flows with optional or enum destinations.

16|2|Updated Jan 1, 2026
One-click install
npx skills add https://github.com/nonameplum/agent-skills --skill swift-navigation-swiftui
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swift-navigation-swiftui
Source: https://github.com/nonameplum/agent-skills/tree/main/swift-navigation/SwiftUINavigation
Command: npx skills add https://github.com/nonameplum/agent-skills --skill swift-navigation-swiftui

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

SwiftUI navigation patterns can become complex and hard to test when state and navigation decisions are spread across UI code. This skill provides a cohesive, state-driven approach to driving navigation across views.

Core Features & Use Cases

  • Type-safe navigation flows driven by optional or enum destinations.
  • Unified handling of NavigationLink, navigationDestination, sheets, popovers, and covers.
  • Clear, testable usage patterns with progressive documentation and examples.
  • Practical guidance for building deterministic navigation in SwiftUI apps.

Quick Start

Open your SwiftUI project and define an optional destination state. Use NavigationLink(item: $destination) to drive navigation, and .navigationDestination or .sheet/.popover/.fullScreenCover for additional presentations. Start with a simple example to navigate to a detail view from a list.

Frequently Asked Questions about swift-navigation-swiftui

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

FAQPage Schema
How do I manage SwiftUI navigation state across sheets and navigationDestination?

Manage SwiftUI navigation by modeling destinations as optional values or enums bound to app state. This state-driven approach unifies handling across NavigationLink, navigationDestination, sheets, popovers, and covers for deterministic routing.

What is the best way to handle complex SwiftUI routing flows deterministically?

Complex SwiftUI routing flows are handled deterministically by driving navigation from optional or enum destination states. This prevents scattered UI navigation decisions and ensures routing remains testable across simple and complex screens.

How do I test SwiftUI navigation logic without rendering the UI?

Test SwiftUI navigation logic by extracting routing decisions into bound app state using optional or enum destinations. State-driven navigation allows you to verify routing paths directly against state changes without UI rendering.

Can I use enum destinations to drive SwiftUI sheet and popover presentations?

Enum destinations can drive SwiftUI sheet and popover presentations by binding presentation modifiers to app state. Optional CasePaths or related libraries may be integrated to support advanced enum routing patterns.

Do I need external dependencies to implement type-safe SwiftUI navigation?

No external dependencies are required to implement type-safe SwiftUI navigation; it requires only SwiftUI and standard tooling. Optional CasePaths or related libraries may be used for advanced enum routing scenarios.