swiftui-nav

Architect SwiftUI navigation with NavigationStack, split views, and deep linking.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/derKlinke/codex-config --skill swiftui-nav-derklinke
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swiftui-nav
Source: https://github.com/derKlinke/codex-config/tree/main/skills/ios-swiftui-nav
Command: npx skills add https://github.com/derKlinke/codex-config --skill swiftui-nav-derklinke

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers architect robust SwiftUI navigation by enabling choices between NavigationStack, NavigationSplitView, and tab-based navigation, while providing patterns for deep linking and state restoration.

Core Features & Use Cases

  • Pattern variety: Support for single-stack navigation, multi-column layouts, per-tab stacks, and an optional router/coordinator when needed.
  • Deep linking and restoration: Guidance for URL handling and preserving navigation state across launches.
  • Code review guidance: Anti-patterns and best practices to ensure reliable navigation behind the scenes.

Quick Start

Use the swiftui-nav skill to outline your app's navigation approach and generate a basic NavigationStack example with deep linking.

Frequently Asked Questions about swiftui-nav

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

FAQPage Schema
How do I handle deep linking in a SwiftUI NavigationStack?

Handle deep linking in a SwiftUI NavigationStack by using the onOpenURL modifier to parse incoming URLs and appending type-safe destinations to a NavigationPath. This allows programmatic routing to specific views while preserving the navigation hierarchy.

What is the best way to manage state restoration across SwiftUI navigation patterns?

State restoration across SwiftUI navigation patterns is managed by serializing your NavigationPath or router state during scene changes and hydrating it upon launch. This preserves the user's exact navigation stack across single-stack, split-view, and tab-based layouts.

Can I use a coordinator pattern with NavigationSplitView and tab-based layouts?

Yes, you can use a coordinator pattern with NavigationSplitView and tab-based layouts by implementing per-tab or per-layout navigation stacks. This isolates routing logic, ensuring each tab or column maintains its own independent NavigationPath for programmatic routing.

How do I set up type-safe destinations with navigationDestination in SwiftUI?

Set up type-safe destinations with navigationDestination by associating specific data types to view builders within your NavigationStack. This ensures that appending a typed value to your NavigationPath automatically triggers the correct view presentation.

Does this approach support iOS apps requiring complex NavigationSplitView and tab-based structures?

Yes, this approach supports iOS apps using SwiftUI on iOS 18+ requiring complex navigation patterns. It specifically architectures robust routing for single-stack, multi-column split-view, and tab-based structures simultaneously.