Agent skill

Android Navigation

Standards for Jetpack Navigation Compose (Type-safe)

Stars 163
Forks 31

Install this agent skill to your Project

npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/navigation

Metadata

Additional technical details for this skill

labels
android navigation compose
triggers
{
    "files": [
        "**/*NavHost.kt",
        "**/*Graph.kt"
    ],
    "keywords": [
        "NavHost",
        "navController",
        "@Serializable"
    ]
}

SKILL.md

Android Navigation Standards

Priority: P0

Implementation Guidelines

Type-Safe Navigation

  • Library: Navigation Compose 2.8.0+.
  • Routes: Use @Serializable objects/classes instead of String routes.
  • Arguments: No manual bundle parsing. Use .toRoute<T>().

Structure

  • Graphs: Split large apps into nested navigation graphs (navigation extension functions).
  • Hoisting: Hoist navigation events out of Screens. Composable screens should accept callbacks (onNavigateToX).

Anti-Patterns

  • Hardcoded Strings: **No String Routes**: Use Typed Objects.
  • Passing NavController: **No NavController in UI**: Hoist events.

References

  • Route Definitions

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results