compose-ui

Guide Jetpack Compose UI development with state hoisting and performance best practices.

1|Updated Feb 20, 2026
One-click install
npx skills add https://github.com/escorponox/musiharmony --skill compose-ui-escorponox
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: compose-ui
Source: https://github.com/escorponox/musiharmony/tree/main/.claude/skills/compose-ui
Command: npx skills add https://github.com/escorponox/musiharmony --skill compose-ui-escorponox

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides best practices and guidance for building efficient, maintainable, and visually consistent user interfaces with Jetpack Compose, addressing common challenges in state management, performance, and theming.

Core Features & Use Cases

  • State Hoisting: Learn to implement unidirectional data flow for stateless Composables.
  • Modifier Best Practices: Understand how to correctly use and order modifiers for layout and interaction.
  • Performance Optimization: Discover techniques like remember and derivedStateOf to prevent unnecessary recompositions.
  • Theming & Resources: Guidance on using MaterialTheme for consistent styling.
  • Previews: Tips for creating effective preview functions for UI components.
  • Use Case: Refactor an existing Composable function to follow state hoisting principles, making it more testable and reusable.

Quick Start

Apply state hoisting to the provided Composable function by moving its state to the caller and accepting a callback for state changes.

Frequently Asked Questions about compose-ui

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement state hoisting in Jetpack Compose?

State hoisting in Jetpack Compose moves state to the caller while accepting a callback for changes, enforcing unidirectional data flow. This pattern creates stateless, reusable, and testable Composable functions.

Why does my Jetpack Compose UI recompose excessively and cause performance issues?

Excessive recompositions in Jetpack Compose often stem from inefficient state management. Use `remember` and `derivedStateOf` to cache state and prevent unnecessary recompositions, optimizing UI performance.

What is the best way to order modifiers in Jetpack Compose for layout?

Modifier usage in Jetpack Compose requires correct ordering to ensure proper layout and interaction. Modifier order is strictly sequential, meaning each modifier wraps the one following it, directly affecting the resulting UI dimensions.

How do I apply MaterialTheme for consistent styling in Jetpack Compose?

MaterialTheme provides consistent styling for Jetpack Compose UI components. Apply theming and resources by wrapping your Composable hierarchy in MaterialTheme to standardize colors, typography, and shapes.

Can I create effective preview functions for Jetpack Compose UI components?

Yes, creating preview functions for Jetpack Compose UI components is supported. Effective previews allow you to visualize UI components directly in the IDE without running the full application.

Do I need to refactor existing Composable functions to follow unidirectional data flow?

Refactoring existing Composable functions to follow unidirectional data flow is recommended. Moving state to the caller and accepting callbacks makes your Composables more testable and reusable.