xml-to-compose-migration

Convert Android XML UI layouts into Jetpack Compose code.

1|Updated Feb 20, 2026
One-click install
npx skills add https://github.com/escorponox/musiharmony --skill xml-to-compose-migration-escorponox
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xml-to-compose-migration
Source: https://github.com/escorponox/musiharmony/tree/main/.claude/skills/xml-to-compose-migration
Command: npx skills add https://github.com/escorponox/musiharmony --skill xml-to-compose-migration-escorponox

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of converting traditional Android XML layouts and View-based UI components into modern Jetpack Compose code, enabling developers to adopt declarative UI patterns efficiently.

Core Features & Use Cases

  • Layout Conversion: Maps common XML layouts (LinearLayout, ConstraintLayout, FrameLayout, etc.) and widgets (TextView, EditText, Button, ImageView, RecyclerView) to their Jetpack Compose equivalents.
  • State Management Guidance: Provides strategies for migrating state from LiveData or ViewModels to Compose's state system.
  • Incremental Adoption: Facilitates a gradual migration by showing how to embed Compose within existing XML layouts (ComposeView) and vice-versa (AndroidView).
  • Use Case: You have an existing Android app with many XML layouts and want to start migrating to Jetpack Compose. This skill will guide you through converting a specific ConstraintLayout with several TextView and Button elements into a Compose ConstraintLayout with Text and Button composables.

Quick Start

Use the xml-to-compose-migration skill to convert the provided XML layout snippet 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 convert Android XML layouts to Jetpack Compose?

To convert Android XML layouts to Jetpack Compose, map existing XML elements like LinearLayout and TextView to their declarative Compose equivalents such as Row and Text. This modernizes Android UI by translating traditional View components into declarative composables.

What is the best way to migrate ConstraintLayout to Jetpack Compose?

Migrating ConstraintLayout to Jetpack Compose involves mapping your XML constraints to the Compose ConstraintLayout composable. This translates your existing XML attributes and layout structures into declarative UI code for modern Android applications.

Can I migrate my Android app to Compose incrementally?

Yes, you can migrate Android apps to Compose incrementally by embedding Compose within XML layouts using ComposeView, or wrapping existing Views inside Compose with AndroidView. This strategy facilitates gradual adoption without rewriting the entire UI.

How do I adapt LiveData state management for Jetpack Compose?

Adapting LiveData state management for Jetpack Compose requires migrating your state from LiveData or ViewModels to Compose's state system. This adaptation ensures seamless integration of declarative UI patterns within your modernized Android application.

Does XML to Compose migration support RecyclerView conversion?

Yes, XML to Compose migration supports RecyclerView conversion by mapping the traditional XML widget to its Jetpack Compose equivalent. This maps your existing layout structures and View components directly into declarative composables.