compose-navigation

Implement type-safe Jetpack Compose navigation with @Serializable routes and NavHost.

1|2|Updated Jan 25, 2026
One-click install
npx skills add https://github.com/jhparktime/OnGuard --skill compose-navigation-jhparktime
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: compose-navigation
Source: https://github.com/jhparktime/OnGuard/tree/main/.claude/skills/compose-navigation
Command: npx skills add https://github.com/jhparktime/OnGuard --skill compose-navigation-jhparktime

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Managing navigation in Jetpack Compose apps often leads to unsafe argument passing and brittle routes. This skill provides a type-safe navigation approach using Serializable routes, a NavHost, and a NavController to coordinate multi-screen flows with predictable data flow.

Core Features & Use Cases

  • Type-safe routes with @Serializable data classes and objects
  • Argument handling, deep links, and nested navigation graphs
  • Testing navigation flows with navigation-testing utilities and Compose hooks
  • Use cases include onboarding flows, profile/detail screens with arguments, and adaptive navigation for different form factors

Quick Start

Create a simple multi-screen app with a Home screen and a Profile screen navigated via a type-safe route.

Frequently Asked Questions about compose-navigation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement type-safe navigation in Jetpack Compose?

Type-safe navigation in Jetpack Compose is implemented using @Serializable data classes and objects to define routes, paired with a NavController and NavHost to coordinate multi-screen flows with predictable data passing.

How do I pass arguments between Compose screens without runtime crashes?

To pass arguments safely between Compose screens, define type-safe routes with @Serializable classes so the NavController can enforce correct argument types and prevent brittle, unsafe data passing during navigation.

Can I use nested navigation graphs and deep links with Compose Navigation?

Yes, Compose Navigation supports configuring deep links and structuring nested navigation graphs within a NavHost to organize complex multi-screen flows and handle external app entry points.

How do I test Jetpack Compose navigation flows across different screen sizes?

You can test Jetpack Compose navigation flows by utilizing navigation-testing utilities and Compose testing hooks to verify multi-screen route behavior, argument handling, and adaptive layouts across different form factors.

What is the best way to structure an onboarding flow with multiple screens in Compose?

The best way to structure a multi-screen onboarding flow in Compose is using a NavHost with type-safe @Serializable routes, allowing you to coordinate sequential screen transitions and pass data predictably.