Core principle 85% of navigation problems stem from path state management errors, view identity issues, or placement mistakes—not SwiftUI defects.
Works with
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionaxiom-swiftui-nav-diagExecute the skills CLI command in your project's root directory to begin installation:
Fetches axiom-swiftui-nav-diag from charleswiltgen/axiom and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate axiom-swiftui-nav-diag. Access via /axiom-swiftui-nav-diag in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
0
total installs
0
this week
767
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
767
stars
Core principle 85% of navigation problems stem from path state management errors, view identity issues, or placement mistakes—not SwiftUI defects.
SwiftUI's navigation system is used by millions of apps and handles complex navigation patterns reliably. If your navigation is failing, not responding, or behaving unexpectedly, the issue is almost always in how you're managing navigation state, not the framework itself.
This skill provides systematic diagnostics to identify root causes in minutes, not hours.
If you see ANY of these, suspect a code issue, not framework breakage:
Navigation tap does nothing (link present but doesn't push)
Back button pops to wrong screen or root
Deep link opens app but shows wrong screen
Navigation state lost when switching tabs
Navigation state lost when app backgrounds
Same NavigationLink pushes twice
Navigation animation stuck or janky
Crash with navigationDestination in stack trace
❌ FORBIDDEN "SwiftUI navigation is broken, let's wrap UINavigationController"
Critical distinction NavigationStack behavior is deterministic. If it's not working, you're modifying state incorrectly, have view identity issues, or navigationDestination is misplaced.
ALWAYS run these checks FIRST (before changing code):
// 1. Add NavigationPath logging
NavigationStack(path: $path) {
RootView()
.onChange(of: path.count) { oldCount, newCount in
print("📍 Path changed: \(oldCount) → \(newCount)")
// If this never fires, link isn't modifying path
// If it fires unexpectedly, something else modifies path
}
}
// 2. Check navigationDestination is visible
// Put temporary print in destination closure
.navigationDestination(for: Recipe.self) { recipe in
let _ = print("🔗 Destination for Recipe: \(recipe.name)")
RecipeDetail(recipe: recipe)
}
// If this never prints, destination isn't being evaluated
// 3. Check NavigationLink is inside NavigationStack
// Visual inspection: Trace from NavigationLink up view hierarchy
// Must hit NavigationStack, not another container first
// 4. Check path state location
// @State must be in stable view (not recreated each render)
// Must be @State, @StateObject, or @Observable — not local variable
// 5. Test basic case in isolation
// Create minimal reproduction
NavigationStack {
NavigationLink("Test", value: "test")
.navigationDestination(for: String.self) { str in
Text("Pushed: \(str)")
}
}
// If this works, problem is in your specific setup
| Observation | Diagnosis | Next Step |
|---|---|---|
| onChange never fires on tap | NavigationLink not in NavigationStack hierarchy | Pattern 1a |
| onChange fires but view doesn't push | navigationDestination not found/loaded | Pattern 1b |
| onChange fires, view pushes, then immediate pop | View identity issue or path modification | Pattern 2a |
| Path changes unexpectedly (not from tap) | External code modifying path | Pattern 2b |
| Deep link path.append() doesn't navigate | Timing issue or wrong thread | Pattern 3b |
| State lost on tab switch | NavigationStack shared across tabs | Pattern 4a |
| Works first time, fails on return | View recreation issue | Pattern 5a |
Before changing ANY code, identify ONE of these:
Use this to reach the correct diagnostic pattern in 2 minutes:
Navigation problem?
├─ Navigation tap does nothing?
│ ├─ NavigationLink inside NavigationStack?
│ │ ├─ No → Pattern 1a (Link outside Stack)
│ │ └─ Yes → Check navigationDestination
│ │
│ ├─ navigationDestination registered?
│ │ ├─ Inside lazy container? → Pattern 1b (Lazy Loading)
│ │ ├─ Type mismatch? → Pattern 1c (Type Registration)
│ │ └─ Blocked by sheet/popover? → Pattern 1d (Modal Blocking)
│ │
│ └─ Using view-based link?
│ └─ → Pattern 1e (Deprecated API)
│
├─ Unexpected pop back?
│ ├─ Immediate pop after push?
│ │ ├─ View body recreating path? → Pattern 2a (Path Recreation)
│ │ ├─ @State in wrong view? → Pattern 2a (State Location)
│ │ └─ ForEach id changing? → Pattern 2c (Identity Change)
│ │
│ ├─ Pop when shouldn't?
│ │ ├─ External code calling removeLast? → Pattern 2b (Unexpected Modification)
│ │ ├─ Task cancelled? → Pattern 2b (Async Cancellation)
│ │ └─ MainActor issue? → Pattern 2d (Threading)
│ │
│ └─ Back button behavior wrong?
│ └─ → Pattern 2e (Stack Corruption)
│
├─ Deep link not working?
│ ├─ URL not received?
│ │ ├─ onOpenURL not called? → Check URL scheme in Info.plist
│ │ └─ Universal Links issue? → Check apple-app-site-association
│ │
│ ├─ URL received, path not updated?
│ │ ├─ path.append not on MainActor? → Pattern 3a (Threading)
│ │ ├─ Timing issue (app not ready)? → Pattern 3b (Initialization)
│ │ └─ NavigationStack not created yet? → Pattern 3b (Lifecycle)
│ │
│ └─ Path updated, wrong screen shown?
│ ├─ Wrong path order? → Pattern 3c (Path Construction)
│ ├─ Wrong type appended? → Pattern 3c (Type Mismatch)
│ └─ Item not found? → Pattern 3d (Data Resolution)
│
├─ State lost?
│ ├─ Lost on tab switch?
│ │ ├─ Shared NavigationStack? → Pattern 4a (Shared State)
│ │ └─ Tab recreation? → Pattern 4a (Tab Identity)
│ │
│ ├─ Lost on background/foreground?
│ │ ├─ No SceneStorage? → Pattern 4b (No Persistence)
│ │ └─ Decode failure? → Pattern 4c (Decode Error)
│ │
│ └─ Lost on rotation/size change?
│ └─ → Pattern 4d (Layout Recreation)
│
├─ NavigationSplitView issue?
│ ├─ Sidebar not visible on iPad?
│ │ ├─ columnVisibility not set? → Pattern 6a (Column Visibility)
│ │ └─ Compact size class? → Pattern 6a (Automatic Adaptation)
│ │
│ ├─ Detail shows blank on iPad?
│ │ ├─ No default detail view? → Pattern 6b (Missing Detail)
│ │ └─ Selection binding nil? → Pattern 6b (Selection State)
│ │
│ └─ Works on iPhone, broken on iPad?
│ └─ → Pattern 6c (Platform Adaptation)
│
└─ Crash?
├─ EXC_BAD_ACCESS in navigation code?
│ └─ → Pattern 5a (Memory Issue)
│
├─ Fatal error: type not registered?
│ └─ → Pattern 5b (Missing Destination)
│
└─ Decode failure on restore?
└─ → Pattern 5c (Restoration Crash)
Before proceeding to a pattern:
Time cost 5-10 minutes
// Check view hierarchy — NavigationLink must be INSIDE NavigationStack
// ❌ WRONG — Link outside stack
struct ContentView: View {
var body: some View {
VStack {
NavigationLink("Go", value: "test") // Outside stack!
NavigationStack {
Text("Root")
}
}
}
}
// Check: Add background color to NavigationStack
NavigationStack {
Color.red // If link is on red, it's inside
}
// ✅ CORRECT — Link inside stack
struct ContentView: View {
var body: some View {
NavigationStack {
VStack {
NavigationLink("Go", value: "test") // Inside stack
Text("Root")
}
.navigationDestination(for: String.self) { str in
Text("Pushed: \(str)")
}
}
}
}
Time cost 10-15 minutes
// ❌ WRONG — Destination inside lazy container (may not be loaded)
ScrollView {
LazyVStack {Prerequisites
Time Estimate
15-45 minutes depending on use case complexity
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
anthropics/claude-code
mblode/agent-skills
github/awesome-copilot
leonxlnx/taste-skill
sickn33/antigravity-awesome-skills
erichowens/some_claude_skills
Solid pick for teams standardizing on skills: axiom-swiftui-nav-diag is focused, and the summary matches what you get after install.
axiom-swiftui-nav-diag is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
We added axiom-swiftui-nav-diag from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
I recommend axiom-swiftui-nav-diag for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
axiom-swiftui-nav-diag reduced setup friction for our internal harness; good balance of opinion and flexibility.
Useful defaults in axiom-swiftui-nav-diag — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
Registry listing for axiom-swiftui-nav-diag matched our evaluation — installs cleanly and behaves as described in the markdown.
axiom-swiftui-nav-diag fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
axiom-swiftui-nav-diag is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
Keeps context tight: axiom-swiftui-nav-diag is the kind of skill you can hand to a new teammate without a long onboarding doc.
showing 1-10 of 28