{"enrichment":{"faq":[{"a":"Compose Expert recommends placing shared UI components in commonMain when they don't require platform-specific APIs. Use expect/actual declarations for platform-specific behavior, and structure composables with state hoisting so business logic remains platform-agnostic. Keep platform-specific navigation and system integration in androidMain and desktopMain modules. This approach maximizes code reuse while respecting platform differences.","q":"How do I share composables across Android and Desktop?"},{"a":"Compose Expert emphasizes building stateless, reusable composables with clear parameter contracts. Apply state hoisting to lift state management above UI layers, use @Stable and @Immutable annotations to prevent unnecessary recomposition, and structure components around Material3 theming for consistency. Test composables in isolation by providing all required state as parameters, making them predictable across platforms.","q":"What are compose multiplatform UI components best practices?"},{"a":"Compose Expert teaches using remember, derivedStateOf, and produceState strategically to avoid redundant recompositions. Mark data classes with @Immutable and @Stable to help the compiler optimize comparisons. Implement the \"state down, events up\" pattern where parent composables manage state and children receive callbacks. Use lazy lists efficiently and avoid capturing mutable state in closures.","q":"How should I optimize recomposition and state management?"},{"a":"Compose Expert advises sharing composables in commonMain when they're purely visual and don't depend on platform APIs. Keep navigation, system dialogs, and platform-specific layouts in androidMain or desktopMain. Use expect/actual for components requiring platform behavior, and delegate platform-specific concerns through callback parameters passed from platform modules.","q":"When should I use commonMain versus platform-specific UI?"},{"a":"Compose Expert guides defining Material3 ColorScheme, Typography, and Shapes in commonMain, then wrapping shared composables in a custom theme composable. Use platform-specific theme implementations in androidMain and desktopMain to handle system preferences or platform conventions. This ensures visual consistency while respecting each platform's design guidelines and user expectations.","q":"How do I apply Material3 theming in multiplatform Compose?"},{"a":"Compose Expert recommends defining custom ImageVector icons in commonMain using the vector builder DSL, then caching them in objects to avoid recreation. For platform-specific icons, use expect/actual to provide platform-native implementations. Structure icon sets as reusable composables that accept size, tint, and content description parameters for accessibility and flexibility.","q":"What's the best way to create custom ImageVector icons?"}],"shadow_tags":["cross-platform-ui","state-hoisting","recomposition-perf","material-design-3","vector-graphics","component-sharing","compose-patterns","ui-optimization","theme-management","kotlin-multiplatform"],"summary_rewrite":"Compose Expert guides you through creating reusable visual components that work across Android and Desktop platforms. Learn when to share composables in commonMain versus keeping them platform-specific, master state patterns like remember and derivedStateOf, and apply Material3 theming consistently. The skill covers component structure, state hoisting, recomposition optimization, and custom icon creation."},"files":[{"bytes":15966,"path":".claude/skills/compose-expert/SKILL.md","sha256":"4c3e68fffcca5efcdb69a7761321bc8c6ac134dd3ac764753fd086a5d86bcdae","url":"https://skillfed.io/files/vitorpamplona/amethyst/compose-expert/e87abf18/SKILL.md"}],"id":"vitorpamplona/amethyst/compose-expert","links":{"html":"https://skillfed.io/vitorpamplona/amethyst/compose-expert","md":"https://skillfed.io/vitorpamplona/amethyst/compose-expert.md","repo":"https://github.com/vitorpamplona/amethyst"},"meta":{"agents_supported":["claude-code"],"first_seen":"2026-07-28","forks":212,"language":"Kotlin","last_updated":"2026-07-28","license":"MIT","name":"compose-expert","publisher":"vitorpamplona","stars":1565},"relations":{"similar":[{"id":"vitorpamplona/amethyst/android-expert"},{"id":"vitorpamplona/amethyst/desktop-expert"},{"id":"affaan-m/ECC/compose-multiplatform-patterns"},{"id":"personamanagmentlayer/pcl/kotlin-expert"},{"id":"aldefy/compose-skill/compose-expert"},{"id":"vitorpamplona/amethyst/compose-slot-api-pattern"},{"id":"skydoves/compose-performance-skills/avoiding-subcomposition-pitfalls"},{"id":"travisjneuman/.claude/android-development"},{"id":"travisjneuman/.claude/kotlin-multiplatform"},{"id":"vitorpamplona/amethyst/compose-state-deferred-reads"}]},"slug":{"owner":"vitorpamplona","repo":"amethyst","skill":"compose-expert"},"version":"e87abf18"}
