compose-multiplatform-patterns

Provide Compose Multiplatform patterns for shared UI development across Android, iOS, Desktop, and Web.

1|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/TakMczk/copilot-cli-ecc --skill compose-multiplatform-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: compose-multiplatform-patterns
Source: https://github.com/TakMczk/copilot-cli-ecc/tree/main/.github/skills/compose-multiplatform-patterns
Command: npx skills add https://github.com/TakMczk/copilot-cli-ecc --skill compose-multiplatform-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides essential patterns and best practices for developing user interfaces using Jetpack Compose and Compose Multiplatform, enabling efficient UI development across multiple platforms.

Core Features & Use Cases

  • State Management: Demonstrates ViewModel integration with StateFlow and the Event Sink pattern for robust state handling.
  • Navigation: Illustrates type-safe navigation with @Serializable routes and handling dialogs/bottom sheets.
  • Composable Design: Offers guidance on slot-based APIs and correct Modifier ordering for flexible and performant UI components.
  • KMP UI: Shows how to use expect/actual for platform-specific composables.
  • Performance: Covers stable types, key(), derivedStateOf, and avoiding allocations.
  • Theming: Includes Material 3 dynamic theming examples.

Quick Start

Activate this skill to get guidance on implementing state management using ViewModels and StateFlow in Compose Multiplatform.

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 with ViewModels and StateFlow in Compose Multiplatform?

Manage state in Compose Multiplatform by integrating ViewModels with StateFlow and the Event Sink pattern for robust state handling. This ensures consistent state propagation across shared UIs on Android, iOS, Desktop, and Web.

How do I implement type-safe navigation using Jetpack Compose?

Implement type-safe navigation in Jetpack Compose by using @Serializable routes. This Skill provides patterns for defining type-safe routes and handling dialogs and bottom sheets within a shared Compose Multiplatform UI architecture.

Does Compose Multiplatform support platform-specific UI components?

Yes, Compose Multiplatform supports platform-specific UI components using expect/actual declarations. This allows you to define shared composable interfaces while providing actual platform-specific implementations for different targets like Android and iOS.

What's the best way to optimize Jetpack Compose performance in a shared UI?

Optimize Jetpack Compose performance by using stable types, the key() function, and derivedStateOf. Additionally, avoid unnecessary allocations in your composables to ensure efficient recomposition across all Compose Multiplatform targets.

How do I apply Material 3 dynamic theming across KMP applications?

Apply Material 3 dynamic theming across KMP applications by utilizing the Material 3 theming examples provided. This ensures your shared Compose Multiplatform UI maintains a consistent and dynamic visual style across different platforms.

What are the best practices for designing flexible Composable functions?

Design flexible Composable functions by adopting slot-based APIs and correct Modifier ordering. Following these composable design principles ensures your UI components remain highly reusable, flexible, and performant within your shared UI architecture.