Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
new-silvermoon avatar

Compose Ui

  • 595 installs
  • 910 repo stars
  • Updated July 27, 2026
  • new-silvermoon/awesome-android-agent-skills

compose-ui is a Claude Code skill that encodes Jetpack Compose UI best practices for developers who need performant, testable, and reusable Android Composable functions.

About

compose-ui is an Android agent skill from awesome-android-agent-skills that guides Jetpack Compose UI work with state hoisting, unidirectional data flow, performance tuning, and theming. It pushes stateless Composables that accept value and onValueChange callbacks, reusable component signatures, and patterns that keep recompositions cheap. Developers invoke compose-ui when drafting new screens, refactoring tangled state, or polishing Compose layouts where testability and scroll performance matter. The skill translates Compose idioms into concrete Kotlin signatures agents can apply directly during UI implementation passes.

  • Generates production-ready Jetpack Compose UI components
  • Works with Claude, Cursor and other Android-focused agents
  • Includes Compose best practices and Material3 patterns
  • Reduces boilerplate for screens, layouts and state handling
  • Part of the awesome-android-agent-skills collection with 498 installs

Compose Ui by the numbers

  • 595 all-time installs (skills.sh)
  • +17 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #573 of 2,245 Frontend Development skills by installs in the Skillselion catalog
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/new-silvermoon/awesome-android-agent-skills --skill compose-ui

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs595
repo stars910
Last updatedJuly 27, 2026
Repositorynew-silvermoon/awesome-android-agent-skills

How do you write performant Jetpack Compose UI with state hoisting?

Generate high-quality Jetpack Compose UI code for Android apps using AI agents.

Who is it for?

Android developers building or refactoring Jetpack Compose screens who want agent-enforced unidirectional data flow and performance habits.

Skip if: Projects on XML Views-only UI, non-Android platforms, or backend Android modules with no Composable surfaces.

When should I use this skill?

The user writes, refactors, or reviews Jetpack Compose Composable functions, theming, or UI performance.

What you get

Stateless Composable functions, hoisted state signatures, themed components, and performance-tuned Compose layouts.

  • Composable function implementations
  • Themed UI components
  • Hoisted-state screen layouts

Files

SKILL.mdMarkdownGitHub ↗

Jetpack Compose Best Practices

Instructions

Follow these guidelines to create performant, reusable, and testable Composables.

1. State Hoisting (Unidirectional Data Flow)

Make Composables stateless whenever possible by moving state to the caller.

  • Pattern: Function signature should usually look like:
    @Composable
    fun MyComponent(
        value: String,              // State flows down
        onValueChange: (String) -> Unit, // Events flow up
        modifier: Modifier = Modifier // Standard modifier parameter
    )
  • Benefit: Decouples the UI from simple state storage, making it easier to preview and test.
  • ViewModel Integration: The screen-level Composable retrieves state from the ViewModel (viewModel.uiState.collectAsStateWithLifecycle()) and passes it down.

2. Modifiers

  • Default Parameter: Always provide a modifier: Modifier = Modifier as the first optional parameter.
  • Application: Apply this modifier to the root layout element of your Composable.
  • Ordering matters: padding().clickable() is different from clickable().padding(). Generally apply layout-affecting modifiers (like padding) after click listeners if you want the padding to be clickable.

3. Performance Optimization

  • `remember`: Use remember { ... } to cache expensive calculations across recompositions.
  • `derivedStateOf`: Use derivedStateOf { ... } when a state changes frequently (like scroll position) but the UI only needs to react to a threshold or summary (e.g., show "Jump to Top" button). This prevents unnecessary recompositions.
    val showButton by remember {
        derivedStateOf { listState.firstVisibleItemIndex > 0 }
    }
  • Lambda Stability: Prefer method references (e.g., viewModel::onEvent) or remembered lambdas to prevent unstable types from triggering recomposition of children.

4. Theming and Resources

  • Use MaterialTheme.colorScheme and MaterialTheme.typography instead of hardcoded colors or text styles.
  • Organize simple UI components into specific files (e.g., DesignSystem.kt or Components.kt) if they are shared across features.

5. Previews

  • Create a private preview function for every public Composable.
  • Use @Preview(showBackground = true) and include Light/Dark mode previews if applicable.
  • Pass dummy data (static) to the stateless Composable for the preview.

Related skills

FAQ

When should compose-ui be invoked?

compose-ui activates when writing or refactoring Jetpack Compose Composable functions. The skill applies state hoisting, performance, and theming guidelines so agents produce stateless, testable Android UI code.

What Compose pattern does compose-ui prioritize?

compose-ui prioritizes state hoisting and unidirectional data flow. Composables should accept state from callers via value parameters and emit changes through onValueChange lambdas instead of holding mutable UI state internally.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.