compose-architecture

Community

Build high-performance Compose screens with clean MVVM/MVI.

Authorsantimattius
Version1.0.0
Installs0

System Documentation

What problem does it solve?

It prevents common Jetpack Compose architecture mistakes that trigger excessive recompositions, unstable UI models, and leaky lifecycle behavior when wiring ViewModels to screens.

Core Features & Use Cases

  • Lifecycle-aware state collection: prefer collectAsStateWithLifecycle and avoid collectAsState for production screens, especially in Compose Multiplatform.
  • Stable UiState/UiAction modeling: enforce all-val, stable property types (ImmutableList/@Immutable) and event-as-state patterns instead of one-shot Channels/SharedFlow.
  • Performance-first composition strategy: defer state reads from Composition to Layout/Drawing using lambda-based Modifier patterns, and apply atomic UiState updates with update { }.
  • Clean Screen/Content split: keep Screen as the bridging layer that talks to the ViewModel and navigation, while Content remains stateless, previewable, and testable.

Quick Start

Use the compose-architecture skill to review a feature screen and refactor it to a Screen/Content split with a stable UiState collected via collectAsStateWithLifecycle, optimized so state reads occur as low as possible in the tree.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: compose-architecture
Download link: https://github.com/santimattius/performance-compose-skills/archive/main.zip#compose-architecture

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.