Android navigation type safe
Skill ComeOnOliver/skillshub/skills/HoangNguyen0403/agent-skills-standard/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)From its SKILL.md
npx -y skills add ComeOnOliver/skillshub --skill android-navigation-type-safeAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
1.0 KB, 168 tokens by cl100k_base, as published. Nobody here has run it
Android Navigation Standards
Priority: P0
Implementation Guidelines
Type-Safe Navigation
- Library: Navigation Compose 2.8.0+.
- Routes: Use
@Serializableobjects/classes instead of String routes. - Arguments: No manual bundle parsing. Use
.toRoute<T>().
Structure
- Graphs: Split large apps into nested navigation graphs (
navigationextension functions). - 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.
References
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.