Skip to content
affaan-m avatar

Compose Multiplatform Patterns

Patterns for shared Compose UI covering state, navigation, theming, and recomposition performance.

CCM score
73 of 100
skills.sh installs
12.2K
GitHub stars
312.6K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers state management, type-safe navigation, slot-based composable design, and expect/actual platform UI across Android, iOS, Desktop, and Web
  • Includes a ViewModel with a single immutable state object, a sealed event sink, and @Serializable route definitions for Compose Navigation 2.8+
  • Enforces stateless composables, @Immutable models, stable lazy-list keys, and derivedStateOf to limit unnecessary recomposition
  • Designed for KMP and Android projects building Compose or Jetpack Compose UI, state, navigation, or Material 3 theming

Install

$ npx -y skills add affaan-m/ecc --skill compose-multiplatform-patterns -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Compose Multiplatform Patterns

Patterns for building shared UI across Android, iOS, Desktop, and Web using Compose Multiplatform and Jetpack Compose. Covers state management, navigation, theming, and performance.

When to Activate

  • Building Compose UI (Jetpack Compose or Compose Multiplatform)
  • Managing UI state with ViewModels and Compose state
  • Implementing navigation in KMP or Android projects
  • Designing reusable composables and design systems
  • Optimizing recomposition and rendering performance

State Management

ViewModel + Single State Object

Use a single data class for screen state. Expose it as StateFlow and collect in Compose:

data class ItemListState(
    val items: List<Item> = emptyList(),
    val isLoading: Boolean = false,
    val error: String? = null,
    val searchQuery: String = ""
)

class ItemListViewModel(
    private val getItems: GetItemsUseCase
) : ViewModel() {
    private val _state = MutableStateFlow(ItemListState())
    val state: StateFlow<ItemListState> = _state.asStateFlow()

    fun onSearch(query: String) {
        _state.update { it.copy(searchQuery = query) }
        loadItems(query)
    }

Details

Repository
github.com/affaan-m/ecc
Categories
Mobile Apps, Frontend & UI Code
First seen
Jul 14, 2026

Questions

What is compose-multiplatform-patterns and what does it cover?

compose-multiplatform-patterns is an agent skill with patterns for building shared UI across Android, iOS, Desktop and Web using Compose Multiplatform and Jetpack Compose. It covers state management with ViewModels, type-safe navigation, theming, composable design and recomposition performance.

How do I install the compose-multiplatform-patterns skill?

Run npx -y skills add affaan-m/ecc --skill compose-multiplatform-patterns -y in your project. Once installed, the agent can help you write Compose UI, state handling, navigation and theming in a KMP project.

Where does compose-multiplatform-patterns rank in the Mobile Apps category?

compose-multiplatform-patterns is in the Mobile Apps category on Claude Marketplaces and ranks in the top 100 there. It focuses on Compose UI patterns for KMP projects, including platform-specific composables via expect and actual.

More from affaan-m/ecc

All 257

Similar to Compose Multiplatform Patterns

More Mobile Apps