compose-multiplatform-patterns

Implement type-safe navigation and ViewModel state management for Compose Multiplatform UIs.

Updated May 9, 2026
One-click install
npx skills add https://github.com/RambleRainbow/jd --skill compose-multiplatform-patterns-ramblerainbow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: compose-multiplatform-patterns
Source: https://github.com/RambleRainbow/jd/tree/main/.claude/skills/compose-multiplatform-patterns
Command: npx skills add https://github.com/RambleRainbow/jd --skill compose-multiplatform-patterns-ramblerainbow

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Building shared UIs for Android, iOS, Desktop and Web with Compose Multiplatform or Jetpack Compose often leads to inconsistent state handling, unoptimized performance, duplicated platform-specific code, and navigation bugs that require hours of debugging and rework.

Core Features & Use Cases

  • Production-Ready State Management: Implement lifecycle-safe UI state with ViewModel, StateFlow, and event sink patterns for both KMP and native Android Compose projects.
  • Type-Safe Navigation: Set up compile-time verified navigation for screens, dialogs and bottom sheets using modern Compose Navigation 2.8+ APIs to eliminate runtime route errors.
  • Performance & Cross-Platform Consistency: Apply proven patterns for skippable recomposition, Material 3 dynamic theming, and expect/actual platform UI adjustments to deliver smooth, native-feeling experiences across all target platforms.
  • Use Case: If you are building a shared e-commerce product browsing screen that runs on Android and iOS, use this skill to implement consistent state handling for product search, type-safe navigation to product detail pages, and platform-specific status bar styling without rewriting UI logic for each platform.

Quick Start

Use the compose-multiplatform-patterns skill to implement a type-safe navigation flow and optimized state management for your shared KMP product list screen.

Frequently Asked Questions about compose-multiplatform-patterns

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

FAQPage Schema
How do I manage state safely in Compose Multiplatform across different platforms?

Set up type-safe navigation in Jetpack Compose using compile-time verified navigation APIs from Compose Navigation 2.8+. This verifies routes for screens, dialogs, and bottom sheets at compile time, eliminating runtime route errors across your shared UI codebase.

How do I optimize Jetpack Compose performance for skippable recomposition?

Optimize Jetpack Compose performance by applying proven patterns for skippable recomposition. This prevents unnecessary recompositions, ensuring smooth and native-feeling experiences across all target platforms in your cross-platform application.

Can I use Material 3 dynamic theming in a Kotlin Multiplatform shared UI?

Yes, you can apply Material 3 dynamic theming in Kotlin Multiplatform shared UIs. The skill provides patterns to implement consistent theming alongside expect/actual platform UI adjustments for native-feeling cross-platform experiences.

What is the best way to handle platform-specific UI differences in Compose Multiplatform?

Handle platform-specific UI differences in Compose Multiplatform using expect/actual platform UI adjustments. This allows targeted modifications like platform-specific status bar styling without rewriting shared UI logic for each target platform.

Does this Compose Multiplatform skill work for native Android projects?

Yes, the patterns apply to both Compose Multiplatform and native Android Jetpack Compose projects. It covers state management with ViewModel and StateFlow, type-safe navigation, and performance optimization suitable for single-platform or cross-platform codebases.