
Compose Multiplatform Patterns
Teaches you modern Compose patterns for building shared UI across Android, iOS, desktop, and web. Covers the single state object pattern with StateFlow, type-safe navigation with serializable routes, slot-based composable APIs, and performance optimization through stable types and lazy list keys. The event sink pattern is a solid alternative to passing a dozen lambdas around. Also handles platform-specific UI with expect/actual and shows you the right modifier ordering. Most useful when you're moving beyond basic tutorials and need production patterns for state management, navigation flows, and recomposition performance.
- skills.sh installs
- 5K
- GitHub stars
- 229.1K
- last updated
- Jul 14, 2026
Install
$ npx -y skills add affaan-m/everything-claude-code --skill compose-multiplatform-patterns --agent claude-codeInstalls into .claude/skills of the current project.
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)
}
Sponsors
Details
- Repository
- github.com/affaan-m/everything-claude-code
- Category
- Mobile Development
- First seen
- Apr 16, 2026
More from affaan-m/everything-claude-code
All 256- Continuous Agent Loop5K
- Foundation Models On Device5K
- Investor Outreach5K
- Kotlin Patterns5K
- Rust Patterns5K
- Swift Actor Persistence5K
- Swift Protocol Di Testing5K
- Bun Runtime4.9K
- Nextjs Turbopack4.9K
- Plankton Code Quality4.9K
- Swift Concurrency 6 24.9K
- Visa Doc Translate4.9K
- Ai Regression Testing4.8K
- Architecture Decision Records4.8K
- Blueprint4.8K
- Everything Claude Code Conventions4.8K
- Exa Search4.8K
- Kotlin Testing4.8K
- Customs Trade Compliance4.7K
- Data Scraper Agent4.7K
- Documentation Lookup4.7K
- Enterprise Agent Ops4.7K
- Flutter Dart Code Review4.7K
- Inventory Demand Planning4.7K