compose-multiplatform-patterns

Implement type-safe navigation and lifecycle-aware state management for Compose Multiplatform applications.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/luongldptit/move-ticket --skill compose-multiplatform-patterns-luongldptit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: compose-multiplatform-patterns
Source: https://github.com/luongldptit/move-ticket/tree/main/.agent/skills/compose-multiplatform-patterns
Command: npx skills add https://github.com/luongldptit/move-ticket --skill compose-multiplatform-patterns-luongldptit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the common pain points of building inconsistent, slow, or hard-to-maintain cross-platform user interfaces with Compose Multiplatform and Jetpack Compose, eliminating guesswork around state handling, navigation, and platform-specific UI implementation.

Core Features & Use Cases

  • State Management: Implements lifecycle-safe ViewModel + StateFlow patterns and event sinks for complex UI logic.
  • Navigation: Provides type-safe routing for Compose Navigation 2.8+ and dialog/bottom sheet navigation patterns.
  • Performance & Theming: Covers recomposition optimization, Material 3 dynamic theming, and KMP platform-specific UI via expect/actual.
  • Use Case: A developer building a cross-platform todo app can use these patterns to share 90% of UI code across Android, iOS and Desktop while handling platform-specific status bar styling natively.

Quick Start

Use the compose-multiplatform-patterns skill to implement type-safe navigation and optimized state management for your new cross-platform Compose application.

Frequently Asked Questions about compose-multiplatform-patterns

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

FAQPage Schema
What is the best way to implement type-safe routing in Compose Multiplatform?

Type-safe navigation in Compose Multiplatform uses Compose Navigation 2.8+ to enable compiler-verified routing. It provides structured patterns for navigating between screens, managing dialog overlays, and handling bottom sheet navigation across shared Android, iOS, and Desktop targets.

How do I handle platform-specific UI integration in a KMP project?

Rendering performance optimization in Jetpack Compose focuses on efficient recomposition practices to eliminate UI bottlenecks. It applies techniques to minimize unnecessary state reads and recompositions, ensuring smooth cross-platform rendering performance in KMP projects.

Does Compose Multiplatform support Material 3 dynamic theming across platforms?

Prerequisite setup for Compose Multiplatform requires initializing a KMP project with shared Android, iOS, and Desktop targets and configuring Jetpack Compose dependencies to establish a unified cross-platform UI codebase.

Can I use Jetpack Compose ViewModels with lifecycle-aware state collection in KMP?

Jetpack Compose ViewModels integrate with KMP through lifecycle-aware state collection using StateFlow. This pattern ensures UI state is safely collected and managed across shared cross-platform targets without causing memory leaks or inconsistent UI states.