android-navigation-3
/android-navigation-3
Install and migrate to Jetpack Navigation 3. Use when implementing Navigation 3 patterns including NavDisplay, NavKey routes, deep links, multiple backstacks, scenes (dialogs, bottom sheets), or migrating from Navigation 2.
- Author
- HoangNguyen0403 ↗
- Repository
- agent-skills-standard ↗
- Licence
- MIT
- Last repository change
- 22.10.2026
Assessment and security
- Files in this package
- 4
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 22.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Install and migrate to Jetpack Navigation 3. Use when implementing Navigation 3 patterns including NavDisplay, NavKey routes, deep links, multiple backstacks, scenes (dialogs, bottom sheets), or migrating from Navigation 2.
Original author description
Install and migrate to Jetpack Navigation 3. Use when implementing Navigation 3 patterns including NavDisplay, NavKey routes, deep links, multiple backstacks, scenes (dialogs, bottom sheets), or migrating from Navigation 2.
How it works
- Priority: P1 (HIGH)
- Core concepts
- Basic usage
- Migration from Navigation 2
- Common patterns
- Verification
- Anti-Patterns
- References
SKILL.md preview
---
name: android-navigation-3
description: Install and migrate to Jetpack Navigation 3. Use when implementing Navigation 3 patterns including NavDisplay, NavKey routes, deep links, multiple backstacks, scenes (dialogs, bottom sheets), or migrating from Navigation 2.
metadata:
triggers:
files:
- '**/*NavHost.kt'
- '**/*Navigation*.kt'
- '**/*Screen.kt'
keywords:
- Navigation 3
- NavDisplay
- NavKey
- NavEntry
- migrate navigation
- multiple backstacks
- nav3
---
# Jetpack Navigation 3
## **Priority: P1 (HIGH)**
Guide for implementing and migrating to Navigation 3 in Jetpack Compose.
## Core concepts
Navigation 3 replaces the previous `NavHost`/`NavController` pattern with a simpler, state-driven approach:
- **Routes** are Kotlin data objects/classes (not strings).
- **Back stack** is a plain `mutableStateListOf<Any>`.
- **`NavDisplay`** renders the current route based on a lambda.
## Basic usage
```kotlin
val backStack = remember { mutableStateListOf<Any>(RouteHome) }
NavDisplay(
backStack = backStack,
onBack = { backStack.removeLastOrNull() },
entryProvider = { key ->
when (key) {
is RouteHome -> NavEntry(key) { HomeScreen(onNavigate = { backStack.add(it) }) }
is RouteDetail -> NavEntry(key) { DetailScreen(key.id) }
else -> error("Unknown route: $key")
}
}
)
```
## Migration from Navigation 2
See [migration guide](references/migration-guide.md) for step-by-step conversion from `NavHost`/`NavController` to `NavDisplay`.
Key changes:
1. Replace string routes with data objects/classes.
2. Replace `NavHost` with `NavDisplay`.
3. Replace `NavController.navigate()` with direct list manipulation.
4. Replace `navArgument` with data class properties.
## Common patterns
See [recipes](references/recipes.md) for code examples:
- Basic navigation with arguments
- Bottom navigation with multiple backstacks
- Deep links (basic and with synthetic backstack)
- Dialogs and bottom sheets
- Conditional navigation (auth flows)
- Returning results between screens
- Modularized navigation with Hilt or Koin
## Verification
- [ ] Routes are data objects/classes, no string-based routing.
- [ ] Back stack is a `mutableStateListOf<Any>`.
- [ ] `NavDisplay` handles all routes in `entryProvider`.
- [ ] `./gradlew build` succeeds.
## Anti-Patterns
- **No string-based routes**: Use Kotlin data objects/classes for type safety.
- **No NavController for new projects**: Use `NavDisplay` with a state list.
- **No `remember { navController() }`**: Navigation 3 doesn't use NavController.
## References
- [Migration Guide (Nav2 → Nav3)](references/migration-guide.md)
- [Recipes](references/recipes.md)
Files in this package (4)
- SKILL.md 3 KB
- evals/evals.json 3 KB
- references/migration-guide.md 3 KB
- references/recipes.md 4 KB
Versions
The database has no other skills named android-navigation-3.
Database snapshot: 13.11.2026 · package version 1cfb89d9f94a (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100navigation
Navigation for Android and Kotlin Multiplatform/iOS apps - all three approaches in one place. (A) Jetpack Navigation Compose (androidx.navigation - NavController, NavHost, composable<Route>, type-safe @Serializable routes, nested graphs, bottom nav, deep links, results via… - 95navigation3
Implement navigation in Jetpack Compose using Navigation 3. Use when asked to build state-driven navigation, manage back stacks, scope ViewModels, implement adaptive layouts, or migrate from Navigation Compose. - 100android-compose
Build high-performance declarative UI with Jetpack Compose. Use when writing Composable functions, optimizing recomposition, hoisting state, or working with LazyColumn and side effects; defer deep-link and navigation routing to android-navigation. - 100flutter-navigation
Flutter navigation and routing — Navigator 1.0 (push/pop, returning results) vs Router API, go_router setup (GoRoute, path and query parameters, nested routes, ShellRoute and StatefulShellRoute for bottom navigation with preserved stacks), redirects for authentication with… - 100android-compose
Jetpack Compose framework guardrails, patterns, and best practices for AI-assisted development. Use when working with Android Compose projects, or when the user mentions Jetpack Compose. Provides composable patterns, state management, Material 3, navigation, and lifecycle guidelines. - 100flutter-navigation
Implement navigation patterns with go_router, deep linking, and named routes in Flutter. Use when building navigation, deep linking, or routing.