android-jetpack-compose

Implements declarative Android UIs with Jetpack Compose state management and composable patterns.

Updated Mar 12, 2026
One-click install
npx skills add https://github.com/RavitejaKarra24/dotfiles --skill android-jetpack-compose-ravitejakarra24
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-jetpack-compose
Source: https://github.com/RavitejaKarra24/dotfiles/tree/main/pi/.pi/agent/skills/android-jetpack-compose
Command: npx skills add https://github.com/RavitejaKarra24/dotfiles --skill android-jetpack-compose-ravitejakarra24

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building Android UIs with Jetpack Compose requires correct handling of recomposition, state hoisting, side effects, and ViewModel integration, and mistakes in these areas cause bugs like stale state, unnecessary recompositions, and leaked resources. ## Core Features & Use Cases - State Management Patterns: Covers remember, rememberSaveable, mutableStateOf, and derivedStateOf with correct usage examples for surviving recomposition and configuration changes. - Architecture Integration: Shows ViewModel integration with StateFlow, collectAsStateWithLifecycle, and state hoisting for building testable, reusable composables. - Common UI Patterns: Provides working code for Navigation Compose, Material 3 theming, LazyColumn/LazyVerticalGrid lists, sticky headers, and side-effect APIs like LaunchedEffect and DisposableEffect. - Use Case: When building a user profile screen that loads data asynchronously, apply the LaunchedEffect and ViewModel patterns to avoid triggering network calls on every recomposition. ## Quick Start Ask the agent to build a Compose screen with a stateful form, a ViewModel-backed list, or Material 3 theming and it will apply these patterns and anti-pattern checks.

Frequently Asked Questions about android-jetpack-compose

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

FAQPage Schema
How do I manage state in Jetpack Compose?

Use remember with mutableStateOf to keep state across recompositions, and rememberSaveable when the state must survive configuration changes like rotation. For computed values, use derivedStateOf so expensive calculations only rerun when dependencies change.

How to connect a ViewModel to a Compose screen?

Expose a StateFlow from the ViewModel and collect it in the composable with collectAsStateWithLifecycle. Pass state down and events up by calling ViewModel methods from callbacks, keeping composables stateless and testable.

What is state hoisting in Jetpack Compose?

State hoisting moves state out of a composable into its caller, making the composable stateless and reusable. The child receives the value and an onChange callback, while the parent owns the actual state.

Why does my composable recompose too often?

Frequent recomposition usually comes from reading state in the wrong scope, missing stable keys in lazy lists, or running heavy computation directly during composition. Wrap expensive work in remember with derivedStateOf and provide stable keys to LazyColumn items.

When should I use LaunchedEffect vs DisposableEffect?

Use LaunchedEffect for suspend work tied to a key, such as loading data when an ID changes. Use DisposableEffect when you must register and clean up resources like lifecycle observers, with cleanup in onDispose.

Does Jetpack Compose support Material 3 theming?

Yes, MaterialTheme accepts a colorScheme built from lightColorScheme and darkColorScheme, plus typography. Composables then read colors and text styles from MaterialTheme.colorScheme and MaterialTheme.typography.