xml-to-compose-migration

Migrate Android XML layouts to Jetpack Compose with state and interop guidance.

127|8|Updated Apr 6, 2026
One-click install
npx skills add https://github.com/hanamizuki/solopreneur --skill xml-to-compose-migration-hanamizuki
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xml-to-compose-migration
Source: https://github.com/hanamizuki/solopreneur/tree/main/plugins/android-dev/skills/xml-to-compose-migration
Command: npx skills add https://github.com/hanamizuki/solopreneur --skill xml-to-compose-migration-hanamizuki

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Convert Android XML layouts to Jetpack Compose to streamline UI modernization and reduce manual rewrites while preserving behavior.

Core Features & Use Cases

  • XML-to-Compose mapping for common containers like LinearLayout, FrameLayout, ConstraintLayout.
  • Incremental migration support using ComposeView / AndroidView to adopt Compose gradually.
  • State migration guidance to replace findViewById / ViewBinding with Compose state and to extract reusable Composables.
  • Validation and testing guidance for visual parity and accessibility.

Quick Start

Provide an XML layout to migrate and receive a corresponding Jetpack Compose version.

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 Android XML layouts to Jetpack Compose?

To migrate Android XML layouts to Jetpack Compose, provide your XML layout file to map common containers like LinearLayout and ConstraintLayout into Compose widgets while preserving original behavior.

Can I migrate XML layouts to Compose incrementally?

Yes, you can migrate XML layouts to Compose incrementally by using ComposeView and AndroidView interop techniques, enabling stepwise adoption without requiring a full rewrite of your entire UI.

What is the best way to replace ViewBinding with Compose state during migration?

The best way to replace ViewBinding during a Compose migration is to extract reusable Composables and map your existing view state to Compose state patterns, ensuring data flows correctly.

Does XML to Compose migration support ConstraintLayout mapping?

Yes, XML to Compose migration supports mapping common containers including ConstraintLayout, FrameLayout, and LinearLayout to their corresponding Jetpack Compose equivalents while maintaining visual structure.

How do I test visual parity after migrating XML to Compose?

You can test visual parity after migrating XML to Compose by applying validation and testing guidance, verifying that the new Compose UI matches the original layout and meets accessibility requirements.