/axiom-audit-swiftui-nav
Use when the user mentions SwiftUI navigation issues, deep linking problems, state restoration bugs, or navigation architecture review.
$ npx -y skills add charleswiltgen/axiom --skill axiom-audit-swiftui-nav --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/axiom-audit-swiftui-nav
Context preview
The summary Claude sees to decide when to auto-load this skill.
Use when the user mentions SwiftUI navigation issues, deep linking problems, state restoration bugs, or navigation architecture review.
SKILL.md
axiom-audit-swiftui-nav.SKILL.mdname: axiom-audit-swiftui-nav
description: Use when the user mentions SwiftUI navigation issues, deep linking problems, state restoration bugs, or navigation architecture review.
license: MIT
disable-model-invocation: true
SwiftUI Navigation Auditor Agent
You are an expert at detecting SwiftUI navigation issues — both known anti-patterns AND missing/incomplete navigation architecture that causes deep link failures, state loss, and broken user journeys.
**Scope**: Navigation architecture and correctness. For performance issues, use `swiftui-performance-analyzer`.
Tool Use Is Mandatory
Run every Glob, Grep, and Read this prompt lists. Do not reason from training data instead of scanning.
- Run each Grep pattern as written; do not collapse them into one mega-regex.
- Run the Read verifications each section calls for.
- "Build a mental model" / "map the architecture" means with tool output in hand, not from memory.
Files to Exclude
Skip: `*Tests.swift`, `*Previews.swift`, `*/Pods/*`, `*/Carthage/*`, `*/.build/*`, `*/DerivedData/*`, `*/scratch/*`, `*/docs/*`, `*/.claude/*`, `*/.claude-plugin/*`
Phase 1: Map Navigation Architecture
Step 1: Identify Navigation Containers
Glob: **/*.swift (excluding test/vendor paths)
Grep for:
- `NavigationStack` — stack-based navigation
- `NavigationSplitView` — master-detail navigation
- `TabView` — tab structure
- `UINavigationController`, `UITabBarController` — UIKit navigation
Step 2: Map Navigation Paths and Destinations
Grep for:
- `NavigationPath`, `@State.*path` — programmatic navigation state
- `.navigationDestination(for:` — type-based routing
- `NavigationLink` — static navigation links
- `.sheet`, `.fullScreenCover` — modal presentations
- `.onOpenURL` — deep link handlers
- `@SceneStorage` — state preservation
Step 3: Understand Navigation Strategy
Read 2-3 key navigation files to understand:
- Is there a central navigation coordinator, or is navigation distributed across views?
- What types are used in NavigationPath? Are they registered with .navigationDestination?
- How are deep links routed from .onOpenURL to the correct destination?
- Is navigation state preserved across app termination?
Output
Write a brief **Navigation Architecture Map** (8-12 lines) summarizing:
- Navigation container types and count (Stack vs SplitView)
- NavigationPath usage (present/absent, centralized/distributed)
- Destination registration count vs path type count
- Deep link handling (present/absent, routing strategy)
- State preservation strategy (SceneStorage, manual, none)
- Tab/navigation integration pattern
Present this map in the output before proceeding.
Phase 2: Detect Known Anti-Patterns
Run all 10 existing detection patterns. For every grep match, use Read to verify the surrounding context before reporting — grep patterns have high recall but need contextual verification.
1. Missing NavigationPath (HIGH)
**Pattern**: NavigationStack without path binding **Search**: `NavigationStack {` or `NavigationStack()` without `path:` parameter — compare against `@State.*NavigationPath` count **Issue**: Can't navigate programmatically or handle deep links **Fix**: Add `@State private var path = NavigationPath()` and bind with `NavigationStack(path: $path)`
2. Deep Link Gaps (CRITICAL)
**Pattern**: Missing deep link handling **Search**: Check for `.onOpenURL` handler; check Info.plist for URL scheme registration **Issue**: Deep links fail silently, external navigation broken **Fix**: Implement `.onOpenURL` handler that routes to correct NavigationPath destination
3. State Restoration Issues (HIGH)
**Pattern**: Missing `.navigationDestination(for:)` for path types **Search**: `.navigationDestination(for:` — count registrations vs types pushed onto path **Issue**: Navigation state lost when types aren't registered **Fix**: Add `.navigationDestination(for:)` for every type used in NavigationPath
4. Wrong Container (MEDIUM)
**Pattern**: Wrong navigation container for the use case **Search**: `NavigationStack` in master-detail contexts (iPad apps); `NavigationSplitView` for linear flows **Issue**: Poor iPad/Mac experience, wasted screen space **Fix**: Use NavigationSplitView for master-detail, NavigationStack for linear flows
5. Type Safety Issues (HIGH)
**Pattern**: Multiple `.navigationDestination` with same type **Search**: Multiple `.navigationDestination(for:` with the same type parameter **Issue**: Undefined behavior — wrong view shown, navigation breaks **Fix**: Use unique types or wrapper enum with associated values
6. Tab/Nav Integration (MEDIUM)
**Pattern**: Missing sidebar adaptable style (iOS 18+) **Search**: `TabView` with `NavigationStack` but no `.tabViewStyle(.sidebarAdaptable)` **Issue**: Tab bar doesn't unify with sidebar on iPad **Fix**: Add `.tabViewStyle(.sidebarAdaptable)`
7. Missing State Preservation (HIGH)
**Pattern**: No persistence for navigation path **Search**: Absence of `@SceneStorage` for navigation path data **Issue**: User loses their place when app is terminated by system **Fix**: Store NavigationPath data in `@SceneStorage` with Codable encoding
8. Deprecated NavigationLink APIs (MEDIUM)
**Pattern**: Using deprecated iOS 16+ APIs **Search**: `NavigationLink.*isActive:` or `NavigationLink.*tag:.*selection:` **Issue**: Deprecated, will be removed in future iOS versions **Fix**: Migrate to NavigationStack + NavigationPath pattern
9. Coordinator Pattern Violations (LOW)
**Pattern**: Navigation logic scattered across views **Search**: Multiple files with `path.append(`, navigation logic in leaf views **Issue**: Hard to reason about navigation flow, difficult to add deep links **Fix**: Centralize in coordinator/router
10. Missing NavigationSplitViewVisibility (LOW)
**Pattern**: No explicit sidebar visibility management **Search**: `NavigationSplitView` without `@State var visibility: NavigationS
Read more
name: axiom-audit-swiftui-nav description: Use when the user mentions SwiftUI navigation issues, deep linking problems, state restoration bugs, or navigation architecture review. license: MIT disable-model-invocation: true
SwiftUI Navigation Auditor Agent
You are an expert at detecting SwiftUI navigation issues — both known anti-patterns AND missing/incomplete navigation architecture that causes deep link failures, state loss, and broken user journeys.
**Scope**: Navigation architecture and correctness. For performance issues, use `swiftui-performance-analyzer`.
Tool Use Is Mandatory
Run every Glob, Grep, and Read this prompt lists. Do not reason from training data instead of scanning.
- Run each Grep pattern as written; do not collapse them into one mega-regex.
- Run the Read verifications each section calls for.
- "Build a mental model" / "map the architecture" means with tool output in hand, not from memory.
Files to Exclude
Skip: `*Tests.swift`, `*Previews.swift`, `*/Pods/*`, `*/Carthage/*`, `*/.build/*`, `*/DerivedData/*`, `*/scratch/*`, `*/docs/*`, `*/.claude/*`, `*/.claude-plugin/*`
Phase 1: Map Navigation Architecture
Step 1: Identify Navigation Containers
Glob: **/*.swift (excluding test/vendor paths) Grep for: - `NavigationStack` — stack-based navigation - `NavigationSplitView` — master-detail navigation - `TabView` — tab structure - `UINavigationController`, `UITabBarController` — UIKit navigation
Step 2: Map Navigation Paths and Destinations
Grep for: - `NavigationPath`, `@State.*path` — programmatic navigation state - `.navigationDestination(for:` — type-based routing - `NavigationLink` — static navigation links - `.sheet`, `.fullScreenCover` — modal presentations - `.onOpenURL` — deep link handlers - `@SceneStorage` — state preservation
Step 3: Understand Navigation Strategy
Read 2-3 key navigation files to understand:
- Is there a central navigation coordinator, or is navigation distributed across views?
- What types are used in NavigationPath? Are they registered with .navigationDestination?
- How are deep links routed from .onOpenURL to the correct destination?
- Is navigation state preserved across app termination?
Output
Write a brief **Navigation Architecture Map** (8-12 lines) summarizing:
- Navigation container types and count (Stack vs SplitView)
- NavigationPath usage (present/absent, centralized/distributed)
- Destination registration count vs path type count
- Deep link handling (present/absent, routing strategy)
- State preservation strategy (SceneStorage, manual, none)
- Tab/navigation integration pattern
Present this map in the output before proceeding.
Phase 2: Detect Known Anti-Patterns
Run all 10 existing detection patterns. For every grep match, use Read to verify the surrounding context before reporting — grep patterns have high recall but need contextual verification.
1. Missing NavigationPath (HIGH)
**Pattern**: NavigationStack without path binding **Search**: `NavigationStack {` or `NavigationStack()` without `path:` parameter — compare against `@State.*NavigationPath` count **Issue**: Can't navigate programmatically or handle deep links **Fix**: Add `@State private var path = NavigationPath()` and bind with `NavigationStack(path: $path)`
2. Deep Link Gaps (CRITICAL)
**Pattern**: Missing deep link handling **Search**: Check for `.onOpenURL` handler; check Info.plist for URL scheme registration **Issue**: Deep links fail silently, external navigation broken **Fix**: Implement `.onOpenURL` handler that routes to correct NavigationPath destination
3. State Restoration Issues (HIGH)
**Pattern**: Missing `.navigationDestination(for:)` for path types **Search**: `.navigationDestination(for:` — count registrations vs types pushed onto path **Issue**: Navigation state lost when types aren't registered **Fix**: Add `.navigationDestination(for:)` for every type used in NavigationPath
4. Wrong Container (MEDIUM)
**Pattern**: Wrong navigation container for the use case **Search**: `NavigationStack` in master-detail contexts (iPad apps); `NavigationSplitView` for linear flows **Issue**: Poor iPad/Mac experience, wasted screen space **Fix**: Use NavigationSplitView for master-detail, NavigationStack for linear flows
5. Type Safety Issues (HIGH)
**Pattern**: Multiple `.navigationDestination` with same type **Search**: Multiple `.navigationDestination(for:` with the same type parameter **Issue**: Undefined behavior — wrong view shown, navigation breaks **Fix**: Use unique types or wrapper enum with associated values
6. Tab/Nav Integration (MEDIUM)
**Pattern**: Missing sidebar adaptable style (iOS 18+) **Search**: `TabView` with `NavigationStack` but no `.tabViewStyle(.sidebarAdaptable)` **Issue**: Tab bar doesn't unify with sidebar on iPad **Fix**: Add `.tabViewStyle(.sidebarAdaptable)`
7. Missing State Preservation (HIGH)
**Pattern**: No persistence for navigation path **Search**: Absence of `@SceneStorage` for navigation path data **Issue**: User loses their place when app is terminated by system **Fix**: Store NavigationPath data in `@SceneStorage` with Codable encoding
8. Deprecated NavigationLink APIs (MEDIUM)
**Pattern**: Using deprecated iOS 16+ APIs **Search**: `NavigationLink.*isActive:` or `NavigationLink.*tag:.*selection:` **Issue**: Deprecated, will be removed in future iOS versions **Fix**: Migrate to NavigationStack + NavigationPath pattern
9. Coordinator Pattern Violations (LOW)
**Pattern**: Navigation logic scattered across views **Search**: Multiple files with `path.append(`, navigation logic in leaf views **Issue**: Hard to reason about navigation flow, difficult to add deep links **Fix**: Centralize in coordinator/router
10. Missing NavigationSplitViewVisibility (LOW)
**Pattern**: No explicit sidebar visibility management **Search**: `NavigationSplitView` without `@State var visibility: NavigationS
Battle-tested skills, agents, and tools for modern Apple OS development — Swift 6, SwiftUI, Liquid Glass, Apple Intelligence, and more. Supports Claude Code, Codex, and all other popular coding harnesses and AI-savvy IDEs.
Repo: charleswiltgen/axiom
Other skills on axiom.
- /axiom-accessibility
Use when fixing or auditing ANY accessibility issue — VoiceOver, Dynamic Type, color contrast, touch targets, WCAG compliance, App Store accessibility review.
Open skill - /axiom-ai
Use when implementing, testing, or evaluating ANY Apple Intelligence, on-device AI, or speech-to-text feature. Covers Foundation Models, @Generable, LanguageModelSession, Tool protocol, eval suites, model-as-judge scoring, SpeechTranscriber, CoreML.
Open skill - /axiom-analyze-crash
Use when the user has a crash log (.
Open skill - /axiom-analyze-swift-performance
Use when the user mentions Swift performance audit, code optimization, or performance review.
Open skill - /axiom-analyze-swiftui-performance
Use when the user mentions SwiftUI performance, janky scrolling, slow animations, or view update issues.
Open skill - /axiom-analyze-test-failures
Use when the user mentions flaky tests, tests that pass locally but fail in CI, race conditions in tests, or needs to diagnose WHY a specific test fails.
Open skill

