jetpack-compose-performance

Diagnose and optimize Android Jetpack Compose UI code to minimize recomposition overhead.

9.3k|601|Updated Mar 16, 2026
Ready to run
npx skills add https://github.com/android/skills --skill jetpack-compose-performance-android
💬 Prompt for ChatGPT / Claude Chat▼
Please help me install this Agent Skill.
Skill: jetpack-compose-performance
Source: https://github.com/android/skills/tree/main/jetpack-compose/jetpack-compose-performance
Command: npx skills add https://github.com/android/skills --skill jetpack-compose-performance-android

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? This Skill solves the problem of performance bottlenecks in Android Jetpack Compose UI code, such as excessive recomposition leading to dropped frames and UI lag. ## Core Features & Use Cases - Optimization Audit: Exhaustively scan Compose code against 7 core categories for issues like state instability and layout inefficiencies. - Lazy Layout Optimization: Ensure proper keying and contentType usage in LazyColumn and similar components. - Animation and Effects: Defer state reads to Layout or Draw phases for smooth animations. - Use Case: Optimize a scrolling feed in an Android app to prevent jank during rapid scrolling. ## Quick Start Use the skill to run the optimization audit workflow on your Jetpack Compose code.

Frequently Asked Questions about jetpack-compose-performance

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

FAQPage Schema
How do I diagnose Jetpack Compose performance issues?▼

Use the optimization audit workflow to scan code against categories like state snapshots and lazy layouts, then read references for approved fixes.

What are the core categories for Compose performance optimization?▼

The seven categories include state and stability, layouts, lazy layouts, animations, effects, graphics, and custom modifiers.

How do I avoid backwards writes in Compose code?▼

Verify read-before-write order and defer state reads to Layout or Draw phases using lambdas in modifiers.

When should I use computedStateOf instead of derivedStateOf?▼

Use computedStateOf for simple condition checks on fast-changing inputs to provide faster invalidation than derivedStateOf.

Why avoid shared transitions in fast-scrolling lists?▼

Attaching sharedBounds or sharedElement to all lazy items instantiates unnecessary scopes for pre-fetched offscreen items.