Skip to content
Development
Skill

/android-navigation-type-safe

Implement type-safe Jetpack Navigation Compose routes using Kotlin serialization. Use only when defining typed Compose destinations and arguments; defer XML navigation, deep links, animations, and generic auth or bottom-navigation work.

From plugin
agent-skills-standard
538200 skills1 MCP
Install
$ npx -y skills add hoangnguyen0403/agent-skills-standard --skill android-navigation-type-safe --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/android-navigation-type-safe

Context preview

The summary Claude sees to decide when to auto-load this skill.

Implement type-safe Jetpack Navigation Compose routes using Kotlin serialization. Use only when defining typed Compose destinations and arguments; defer XML navigation, deep links, animations, and generic auth or bottom-navigation work.

SKILL.md

android-navigation-type-safe.SKILL.md
name: android-navigation-type-safe
description: Implement type-safe Jetpack Navigation Compose routes using Kotlin serialization. Use only when defining typed Compose destinations and arguments; defer XML navigation, deep links, animations, and generic auth or bottom-navigation work.
metadata:
  triggers:
    files:
    - '**/*NavHost.kt'
    - '**/*Graph.kt'
    keywords:
    - NavHost
    - navController
    - "@Serializable"

Android Navigation Standards

**Priority: P0 (CRITICAL)**

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

  • **No String Routes**: Use @Serializable typed objects/classes for destinations.
  • **No NavController in Composables**: Hoist navigation events to screen-level callbacks.

References

  • [Route Definitions](references/implementation.md)

Required route example

  • For a product detail argument, define `@Serializable data class ProductDetail(val productId: Long)` and navigate with the typed destination; retrieve it with `toRoute<ProductDetail>()`.

Canonical response anchors

When this skill applies, preserve the following domain terminology or equivalent concrete examples in the answer when relevant:

  • Define ProductDetail(val productId
Read more
Ships withagent-skills-standard

The portable SDLC standards layer for AI coding agents. Sync once, then work in your own runtime.

Get the whole plugin

Other skills on agent-skills-standard.