compose-ui

Document Jetpack Compose UI practices for state handling, layout, and theming in Android Kotlin projects.

14|Updated Mar 14, 2026
One-click install
npx skills add https://github.com/piyushverma0/android-agent-skills --skill compose-ui-piyushverma0
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: compose-ui
Source: https://github.com/piyushverma0/android-agent-skills/tree/main/skills/compose-ui
Command: npx skills add https://github.com/piyushverma0/android-agent-skills --skill compose-ui-piyushverma0

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Jetpack Compose UI best practices distilled into a single Skill to help AI agents write consistent, accessible, and performant UI across Android apps. The guide covers memory-safe state handling, correct scaffolding, insets, theming, animations, and accessibility patterns.

Core Features & Use Cases

  • 24 rules spanning critical, high-impact, and medium topics like edge-to-edge, IME, accessibility, Material 3 theming, loading/error/empty states, and adaptive layouts.
  • Concrete examples, anti-patterns, and quick-start prompts enabling reliable UI authoring for agents.
  • Quick reference checks for common mistakes in LazyColumn, modifiers order, and state management.

Quick Start

Always apply this skill before writing any @Composable function to ensure consistent, accessible, and maintainable UI code.

Frequently Asked Questions about compose-ui

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

FAQPage Schema
What are the best practices for Jetpack Compose state handling to prevent memory leaks?

Jetpack Compose state handling best practices prescribe using collectAsStateWithLifecycle and rememberSaveable to manage UI state safely. These patterns ensure deterministic state preservation across configuration changes and lifecycle events without leaking memory.

How do I fix common Jetpack Compose layout mistakes in LazyColumn and scaffolds?

Fixing Jetpack Compose layout mistakes involves applying stable keys in LazyColumn, enforcing correct modifier order, and using proper Scaffold insets. Concrete guardrails prevent common agent errors in composable structure and edge-to-edge rendering.

Does this Jetpack Compose guide support Material 3 theming and adaptive layouts?

Yes, this Jetpack Compose guide supports Material 3 theming and adaptive layouts. It provides tested rules spanning critical, high-impact, and medium topics to ensure consistent, accessible, and performant UI across Android apps.

How do I handle accessibility and IME insets in Jetpack Compose?

Handling accessibility and IME insets in Jetpack Compose requires applying specific guardrails for safe UI composition. The guide covers edge-to-edge rendering, IME padding, and accessibility patterns to create inclusive Android interfaces.

What is the best way to structure loading, error, and empty states in Jetpack Compose?

The best way to structure loading, error, and empty states in Jetpack Compose is by following prescribed concrete patterns. The guide includes 24 tested rules that enforce deterministic guidance for reliable UI authoring across these critical states.