xml-to-compose-migration

Migrates Android XML UI and View-based components to Jetpack Compose code.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill streamlines the complex and time-consuming process of migrating existing Android applications from traditional XML-based UIs to modern Jetpack Compose.

Core Features & Use Cases

  • Layout Conversion: Maps XML layouts (LinearLayout, ConstraintLayout, etc.) and widgets (TextView, Button, RecyclerView) to their Compose equivalents.
  • State Management Migration: Guides the transition of state from LiveData and ViewBinding to Compose's state system.
  • Incremental Adoption: Facilitates embedding Compose UIs within existing XML layouts using ComposeView.
  • Use Case: Convert a complex RecyclerView with a custom adapter and LiveData backing into a performant LazyColumn with Compose state management.

Quick Start

Use the xml-to-compose-migration skill to convert the provided XML layout file 'activity_main.xml' into Jetpack Compose code.

Frequently Asked Questions about xml-to-compose-migration

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

FAQPage Schema
How do I migrate an Android XML layout to Jetpack Compose?

Migrating Android XML to Jetpack Compose involves mapping layout containers like LinearLayout and ConstraintLayout, alongside widgets like TextView and Button, to their Compose equivalents. It also includes transitioning state management patterns from LiveData to StateFlow.

Can I incrementally adopt Jetpack Compose in an existing XML project?

Yes, incremental adoption is possible by embedding Compose UIs within existing XML layouts using ComposeView. This approach allows you to integrate Compose components seamlessly into existing View-based projects without rewriting the entire UI at once.

How do I convert a RecyclerView with LiveData to Jetpack Compose?

Converting a RecyclerView with LiveData to Jetpack Compose requires mapping the list to a LazyColumn and transitioning the backing LiveData to Compose's state system. This process also involves replacing custom adapters with Compose functions for rendering list items.

What is the best way to transition LiveData to Compose state management?

Transitioning LiveData to Compose state management requires mapping LiveData observers to Compose state holders like StateFlow. This ensures that UI components reactively update when the underlying data changes, maintaining the observable pattern within the Compose framework.

Does migrating from XML to Jetpack Compose require a complete UI rewrite?

No, migrating from XML to Jetpack Compose does not require a complete UI rewrite. You can use ComposeView to embed Compose UIs within existing XML layouts, facilitating an incremental adoption strategy for complex View-based components.