compose-ui

Enforce stateless components and MaterialTheme patterns in Jetpack Compose UIs.

Updated Nov 3, 2025
One-click install
npx skills add https://github.com/devanfer02/telnetquiz --skill compose-ui-devanfer02
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: compose-ui
Source: https://github.com/devanfer02/telnetquiz/tree/main/.claude/skills/compose-ui
Command: npx skills add https://github.com/devanfer02/telnetquiz --skill compose-ui-devanfer02

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides developers to write Jetpack Compose UIs that are maintainable by enforcing stateless components, consistent theming, and careful modifier usage, reducing churn and bugs.

Core Features & Use Cases

  • State hoisting and unidirectional data flow to keep UI components stateless and easily testable.
  • Proper Modifier handling and root-element application to ensure predictable layouts and interactions.
  • Performance-conscious patterns such as remember and derivedStateOf to minimize recompositions and jank.
  • Theming with MaterialTheme to standardize colors, typography, and shapes across features.
  • Use Case: refactor an existing composable that manages internal state to receive state from a ViewModel and expose events to the outside.

Quick Start

Refactor a public Composable so it is stateless, accepts state as parameters, exposes events, and applies a default Modifier to the root layout.

Frequently Asked Questions about compose-ui

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

FAQPage Schema
How do I hoist state in Jetpack Compose to make my UI components stateless?

To hoist state in Jetpack Compose, you refactor a composable to receive state as parameters and expose events via lambdas, moving state management to a ViewModel to ensure the UI component remains stateless and easily testable.

What's the best way to reduce unnecessary recompositions in Jetpack Compose?

Reducing recompositions in Jetpack Compose involves using performance-conscious patterns like remember to cache instance values and derivedStateOf to limit recomposition scope, minimizing UI jank and improving overall app responsiveness.

How do I apply modifiers correctly to a Composable root layout?

Applying modifiers correctly in Jetpack Compose requires adding a default Modifier parameter to the root layout element of your composable, ensuring predictable layout behaviors and consistent interactions across different usage contexts.

How does MaterialTheme theming work for standardizing Jetpack Compose UI?

MaterialTheme in Jetpack Compose standardizes UI theming by providing a centralized definition for colors, typography, and shapes, allowing composables to consume these styles consistently across all application features.

Can I use this Compose UI best practices Skill with my existing Kotlin project?

You can apply this Skill to any existing Kotlin-based Jetpack Compose project to refactor composables, enforce unidirectional data flow, and standardize theming without requiring additional dependencies.

Why does my Jetpack Compose UI layout behave unpredictably when reusing composables?

Unpredictable layout behavior in Jetpack Compose often occurs when composables do not accept a default Modifier parameter for their root element, preventing proper layout configuration from parent call sites.