Skillshub android-navigation-type-safe
Standards for Jetpack Navigation Compose (Type-safe). Use when implementing type-safe navigation graphs in Jetpack Compose for Android. (triggers: **/*NavHost.kt, **/*Graph.kt, NavHost, navController, @Serializable)
install
source · Clone the upstream repo
git clone https://github.com/ComeOnOliver/skillshub
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ComeOnOliver/skillshub "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/HoangNguyen0403/agent-skills-standard/android-navigation-type-safe" ~/.claude/skills/comeonoliver-skillshub-android-navigation-type-safe && rm -rf "$T"
manifest:
skills/HoangNguyen0403/agent-skills-standard/android-navigation-type-safe/SKILL.mdsource content
Android Navigation Standards
Priority: P0
Implementation Guidelines
Type-Safe Navigation
- Library: Navigation Compose 2.8.0+.
- Routes: Use
objects/classes instead of String routes.@Serializable - Arguments: No manual bundle parsing. Use
..toRoute<T>()
Structure
- Graphs: Split large apps into nested navigation graphs (
extension functions).navigation - Hoisting: Hoist navigation events out of Screens. Composable screens should accept callbacks (
).onNavigateToX
Anti-Patterns
- No String Routes: Use @Serializable typed objects/classes for destinations.
- No NavController in Composables: Hoist navigation events to screen-level callbacks.