compose-ui

Apply Jetpack Compose best practices for state hoisting, performance, and theming.

Updated Feb 13, 2026
One-click install
npx skills add https://github.com/polidog/atotoX10-drive --skill compose-ui-polidog
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: compose-ui
Source: https://github.com/polidog/atotoX10-drive/tree/main/.agents/skills/compose-ui
Command: npx skills add https://github.com/polidog/atotoX10-drive --skill compose-ui-polidog

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

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

Core Features & Use Cases

  • State Hoisting: Guides on implementing unidirectional data flow for cleaner Composable functions.
  • Performance Optimization: Techniques like remember and derivedStateOf to prevent unnecessary recompositions.
  • Theming & Modifiers: Best practices for applying themes and using modifiers effectively.
  • Use Case: Refactor a complex screen with multiple stateful elements into stateless Composables using state hoisting, improving testability and reducing bugs.

Quick Start

Apply the compose-ui skill to refactor the UserProfileCard Composable to use state hoisting.

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 to improve testability?

To implement state hoisting in Jetpack Compose, move state ownership out of Composable functions and pass state down while hoisting events up, enforcing unidirectional data flow to create stateless, testable UI components.

What's the best way to prevent unnecessary recompositions in Android Compose?

To prevent unnecessary recompositions in Android Compose, apply performance optimization techniques using `remember` to cache state and `derivedStateOf` to limit recomposition scopes, ensuring efficient UI rendering.

How do I refactor a stateful Composable function into a stateless one?

Refactoring a stateful Composable function into a stateless one involves extracting internal state to parameters and passing event callbacks up, adhering to unidirectional data flow for cleaner maintainability.

Does this Jetpack Compose UI approach work for complex Android screens?

Yes, this Jetpack Compose UI approach works for complex Android screens by breaking down multiple stateful elements into stateless Composables using state hoisting, improving testability and reducing bugs.

When do I need to use derivedStateOf in Jetpack Compose?

You need to use `derivedStateOf` in Jetpack Compose when a UI state calculation depends on other states and should only trigger recomposition when the derived result changes, optimizing overall performance.