mcpbeat

Android Navigation Type Safe

hoangnguyen0403/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.

1k tokens
context cost
the whole folder, loaded on every use
3
files
instructions only
0
copies elsewhere
how many repositories repackaged it
536
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/HoangNguyen0403/agent-skills-standard --skill android-navigation-type-safe

What comes with it

4 034 bytes besides the instruction
evals/evals.json
references/implementation.md

The instruction itself

9 sections, as written by the author

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

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

How to use it

Copy the folder

Take hoangnguyen0403/android-navigation-type-safe from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.