
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-uiAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 595 |
|---|---|
| repo stars | ★ 910 |
| Last updated | July 27, 2026 |
| Repository | new-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
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 = Modifieras the first optional parameter. - Application: Apply this
modifierto the root layout element of your Composable. - Ordering matters:
padding().clickable()is different fromclickable().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.colorSchemeandMaterialTheme.typographyinstead of hardcoded colors or text styles. - Organize simple UI components into specific files (e.g.,
DesignSystem.ktorComponents.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.