android-navigation-expert

Installation
SKILL.md

Type-Safe Compose Navigation 🧭🚀

A strict guideline prohibiting legacy string-based navigation in Jetpack Compose, enforcing the modern Kotlinx Serialization approach for robust, crash-free routing.

âš¡ When to Use

  • Creating a NavHost: Scaffolding the screen routing for a new app.
  • Passing Arguments: Sending IDs, details, or objects between screens.
  • Refactoring Navigation: Upgrading a codebase from string-based routes to Type-Safe routes.

🚫 The Anti-Pattern (String Routes)

NEVER DO THIS. AI Agents trained on older data routinely hallucinate this pattern. It is fragile, cannot pass complex objects easily, and crashes frequently if strings are mismatched:

// BAD - DO NOT USE
navController.navigate("profile/${user.id}")

✅ The Standard (Type-Safe Navigation)

ALWAYS DO THIS. Use Compose Navigation 2.8.0+ and kotlinx.serialization.

Installs
11
GitHub Stars
11
First Seen
Aug 6, 2026