kotlin-navigation-compose-multiplatform

Model navigation patterns for Compose Multiplatform with typed routes and NavOptions.

1|Updated Apr 22, 2026
One-click install
npx skills add https://github.com/cedric-champeix/SpoonFeeder --skill kotlin-navigation-compose-multiplatform
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kotlin-navigation-compose-multiplatform
Source: https://github.com/cedric-champeix/SpoonFeeder/tree/main/.claude/skills/kotlin-navigation-compose-multiplatform
Command: npx skills add https://github.com/cedric-champeix/SpoonFeeder --skill kotlin-navigation-compose-multiplatform

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides a structured approach to designing and reviewing navigation in Compose Multiplatform projects, ensuring clear route ownership, predictable back-stack behavior, and minimal argument passing.

Core Features & Use Cases

  • Clear route modeling with explicit destinations and typed parameters.
  • Centralized NavController ownership and event-based navigation to avoid coupling leaf composables to navigation logic.
  • Back-stack discipline with explicit popUpTo, saveState, and restoreState patterns, plus robust deep-link handling.
  • Multiplatform routing guidelines that separate shared routing logic from platform entry concerns and support adaptive UI.
  • Use cases span from simple screen transitions to complex gated flows and deep links across Android and shared code.

Quick Start

Integrate these guidelines into your project to establish a typed route model and centralized navigation ownership.

Frequently Asked Questions about kotlin-navigation-compose-multiplatform

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

FAQPage Schema
How do I manage back-stack ownership and navigation in Compose Multiplatform?

Back-stack ownership in Compose Multiplatform requires a single NavController model to shape history. You enforce predictable behavior by using explicit NavOptions like popUpTo, saveState, and restoreState for screen transitions.

How do I structure typed routes and arguments for Kotlin Multiplatform navigation?

You structure typed routes by modeling explicit destinations with minimal, typed parameters. This approach enforces argument discipline and prevents passing complex objects directly through NavController routing logic.

Does the navigation2 integration support deep links in shared Compose Multiplatform code?

Yes, the stable navigation2 integration supports robust deep-link handling across Android and shared code. It separates shared routing logic from platform-specific entry concerns to maintain coherent multiplatform routing.

What is the best way to avoid coupling leaf composables to navigation logic in Kotlin Multiplatform?

The best way to decouple leaf composables is by establishing centralized NavController ownership and using event-based navigation. This ensures screens emit events rather than directly triggering routing actions.

Can I use explicit NavOptions like launchSingleTop for multiplatform routing?

Yes, you can and should use explicit NavOptions such as launchSingleTop to shape history. Applying these options ensures predictable back-stack behavior and avoids duplicate screen instances during navigation.

Why does my Compose Multiplatform navigation break when passing complex arguments?

Navigation breaks because the approach requires minimal argument passing and typed routes. You must enforce argument discipline by avoiding complex objects and relying on typed parameters in your route model.