{"name":"add-compose-nav-3","description":"Adds Jetpack Navigation 3 to a Compose project with typed routes, a saveable back stack, and a scene for a dialog or a wide list-detail. Use when the user wants Navigation 3, a NavDisplay, or to leave string routes behind.","category":"apps","tags":["android","jetpack-compose","navigation"],"models":["any"],"proven":false,"passing_families":0,"model_testing":"Not yet model-tested; testing Jan 2027","url":"https://theskillvault.ai/skills/add-compose-nav-3","api_url":"https://theskillvault.ai/api/skills/add-compose-nav-3","raw_url":"https://theskillvault.ai/api/skills/add-compose-nav-3/raw","body":"# Add Compose Navigation 3\n\nNavigation 3 uses a typed route per destination and a back stack you can save. String routes and a second graph for every dialog are the old shape.\n\n## When to use\n- The Compose project still moves between screens with string routes.\n- Each bottom destination should remember its own stack.\n- A dialog, a deep link, or a signed-out flow needs a real destination.\n\n## When not to use\n- Skip this when you are choosing a tab row or a rail. That choice is a separate skill.\n- Skip this when you are deciding columns or when a list sits beside a detail. That width choice is a separate skill. This skill only hosts the scene.\n- The project is React Native or SwiftUI. Do not rewrite it for this.\n\n## Steps\n1. Show destinations in a NavDisplay. Give each destination a typed route. Do not pass a raw string as the route.\n2. Store the back stack in a saveable holder so a rotation or process death does not forget the screen.\n3. Give each top-level destination its own stack. Switching destinations restores that stack instead of clearing it.\n4. A dialog or a sheet is a scene on the same stack. A list beside a detail on a wide screen is also a scene. Let the layout skill decide when the width counts as wide.\n5. Read arguments from the route when building a ViewModel. Send a result back to the previous entry as state or as an event.\n6. Keep a signed-out flow and a signed-in flow as separate graphs. Switch graphs when the condition changes, and do not leave a signed-in screen up after sign-out.\n\n## Gotchas\n- Do not include passwords, tokens, or private ids in sample routes or deep-link examples.\n- Mixing string routes with typed routes in the same stack makes the back stack lie. A migration error is leaving both in the graph.\n- A deep link should rebuild the stack beneath the opened screen, or Back dumps the person out of the product.\n- This is an independent how-to adapted from a Google LLC skill. It is not official Android documentation, and it was not run on a device for this library.\n\n## Portability\nIf you use Navigation 2, move that graph's routes to typed routes rather than running both stacks at once. If you use React Native, keep the React Navigation stack. A stack per destination still applies.\n\n## Done when\n- Destinations are typed routes shown in a NavDisplay.\n- Each top-level destination keeps its own saveable stack.\n- A dialog is a scene, and a deep link rebuilds the stack beneath it.\n\n## Example prompt\n\"Migrate this Compose graph off string routes onto Navigation 3. Use a NavDisplay, a saveable back stack, and a separate stack for each bottom destination.\"\n\n---\nAdapted from \"navigation-3\" by Google LLC in android/skills (Apache-2.0). The upstream licence leaves the copyright line unfilled. See LICENSE.txt and NOTICE.txt.","files":["LICENSE.txt","NOTICE.txt"],"license":"Apache-2.0","license_name":"Apache License 2.0","license_url":"https://www.apache.org/licenses/LICENSE-2.0","attribution":"Based on work by Google LLC (android/skills, navigation/navigation-3) (Copyright line in upstream LICENSE.txt is the unfilled Apache template 'Copyright [yyyy] [name of copyright owner]'. Skill metadata.author at this commit is Google LLC. No NOTICE file in the repository., Apache License 2.0), https://github.com/android/skills/tree/6daa53ef27fa2aa87827d183a85c06cedceca833/navigation/navigation-3; adapted by TheSkillVault, https://theskillvault.ai","install":{"claude_code":"curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/add-compose-nav-3/raw' -o ~/'.claude/skills/add-compose-nav-3/SKILL.md' && curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/add-compose-nav-3/files/LICENSE.txt' -o ~/'.claude/skills/add-compose-nav-3/LICENSE.txt' && curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/add-compose-nav-3/files/NOTICE.txt' -o ~/'.claude/skills/add-compose-nav-3/NOTICE.txt'","cursor":"curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/add-compose-nav-3/raw' -o '.cursor/skills/add-compose-nav-3/SKILL.md' && curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/add-compose-nav-3/files/LICENSE.txt' -o '.cursor/skills/add-compose-nav-3/LICENSE.txt' && curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/add-compose-nav-3/files/NOTICE.txt' -o '.cursor/skills/add-compose-nav-3/NOTICE.txt'","agents":"curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/add-compose-nav-3/raw' -o '.agents/skills/add-compose-nav-3/SKILL.md' && curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/add-compose-nav-3/files/LICENSE.txt' -o '.agents/skills/add-compose-nav-3/LICENSE.txt' && curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/add-compose-nav-3/files/NOTICE.txt' -o '.agents/skills/add-compose-nav-3/NOTICE.txt'","mcp_url":"https://theskillvault.ai/mcp","cursor_mcp_deeplink":"cursor://anysphere.cursor-deeplink/mcp/install?name=theskillvault&config=eyJ1cmwiOiJodHRwczovL3RoZXNraWxsdmF1bHQuYWkvbWNwIn0%3D","mcp_config":{"mcpServers":{"theskillvault":{"url":"https://theskillvault.ai/mcp"}}}},"bundles":[],"tested_on":[{"family":"chatgpt","name":"ChatGPT","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"claude","name":"Claude","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"gemini","name":"Gemini","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"grok","name":"Grok","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"llama","name":"Llama","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"deepseek","name":"DeepSeek","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"mistral","name":"Mistral","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"qwen","name":"Qwen","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"kimi","name":"Kimi K","outcome":null,"date":null,"source":null,"counts":false,"stale":false}],"proven_rule":{"threshold":5,"window_days":365,"computed_at":"2026-11-29T03:42:30.374Z"}}