mcpField
N
navigation-3

navigation-3

github.com/androidDevelopment10.0k3.3k installsUpdated 2d ago
Repository

About navigation-3

A skill with migration guidance, documentation pointers, and recipes for Android Navigation 3. It helps Android developers implement and adapt navigation patterns in Compose, from back stacks and deep links to adaptive layouts.

Key features

  1. 01Navigation 2 migration guidance
  2. 02Compose navigation recipes
  3. 03Deep-link handling patterns
  4. 04Adaptive scenes and layouts
  5. 05Back-stack and state examples

Use cases

  1. 01Migrating an app from Navigation 2
  2. 02Adding deep links with arguments
  3. 03Building adaptive list-detail screens
  4. 04Retaining separate tab back stacks

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/android/skills --skill navigation-3

After installing, type/navigation-3in Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/android/guide/navigation/
type-safe-destinations.md
references/android/guide/navigation/navigation-3/
index.md
migration-guide.md
references/android/guide/navigation/navigation-3/recipes/
animations.md
basic.md
basicdsl.md
basicsaveable.md
bottomsheet.md
common-ui.md
conditional-transitions.md
conditional.md
deeplinks-custommatcher.md
deeplinks-staticuri.md
deeplinks-syntheticbackstack.md
deeplinks-uriarguments.md
dialog.md
lifecycle-owner.md
material-listdetail.md
material-supportingpane.md
modular-hilt.md
modular-koin.md
multiple-backstacks.md
passingarguments.md
results-event.md
results-state.md
scenes-listdetail.md
scenes-twopane.md

Details

From the project README

Migration guide

  • Navigation 2 to Navigation 3 migration guide: Step-by-step guide to migrate an Android application from Navigation 2 to Navigation 3, covering dependency updates, route changes, state management, and UI component replacements.
Requirements

Developer documentation

  • Navigation 3. Search documentation for more information on basics, saving and managing navigation state, modularizing navigation code, creating custom layouts using Scenes, animating between destinations, or applying logic or wrappers to destinations.

Recipes

Code examples showcasing common patterns.

Basic API usage
Common UI
  • Common UI: Demonstrates how to implement a common navigation UI pattern with a bottom navigation bar and multiple back stacks, where each tab in the navigation bar has its own navigation history.
Deep links
Scenes
Use built-in Scenes
  • Dialog: Shows how to create a Dialog.
Create custom Scenes
  • BottomSheet: Shows how to create a BottomSheet destination.
  • List-Detail Scene: Demonstrates how to implement adaptive list-detail layouts using the Navigation 3 Scenes API.
  • Two pane Scene: Demonstrates how to implement adaptive two-pane layouts using the Navigation 3 Scenes API.
Material Adaptive
  • Material List-Detail: Demonstrates how to implement an adaptive list-detail layout using Material 3 Adaptive.
  • Material Supporting Pane: Demonstrates how to implement an adaptive supporting pane layout using Material 3 Adaptive.
Animations
  • Animations: Shows how to override the default animations for all destinations and a single destination.
  • Conditional Transitions: Shows how to implement conditional transition animations.
Common back stack behavior
  • Multiple back stacks: Shows how to create multiple top level routes, each with its own back stack. Top level routes are displayed in a navigation bar allowing users to switch between them. State is retained for each top level route, and the navigation state persists config changes and process death.
Conditional navigation
  • Conditional navigation: Switch to a different navigation flow when a condition is met. For example, for authentication or first-time user onboarding.
Lifecycle
Architecture
Working with ViewModel
Passing navigation arguments
  • Basic ViewModel : Navigation arguments are passed to a ViewModel constructed using viewModel()
Returning results

Comments

Markdown supported