xml-to-compose-migration

Convert Android XML layouts into Jetpack Compose components.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Converting Android XML layouts to Jetpack Compose is a tedious, error-prone process that this Skill standardizes, enabling modern UI patterns while preserving functionality.

Core Features & Use Cases

  • Layout mapping guidance for containers (ConstraintLayout, LinearLayout, FrameLayout) and common widgets (TextView, EditText, Button, ImageView)
  • Incremental migration strategies using ComposeView and AndroidView to interoperate with existing XML-based screens
  • State migration patterns from LiveData/ViewModel bindings to Compose state, with reusable composable extraction patterns
  • Validation, testing, and accessibility considerations to ensure visual parity and better UX

Quick Start

Convert an Android XML layout to Jetpack Compose by mapping views to Composables and migrating state handling incrementally.

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 containers like ConstraintLayout and LinearLayout to Composables, migrate state from LiveData to Compose state, and extract reusable UI components incrementally.

Can I migrate XML layouts to Compose incrementally without a full rewrite?

Yes, you can migrate XML layouts to Compose incrementally using ComposeView and AndroidView to interleave Compose components with existing XML-based screens, ensuring functionality is preserved during the modernization process.

What is the best way to handle state migration when moving from XML to Compose?

State migration from XML to Compose involves shifting LiveData and ViewModel bindings to Compose state management patterns, enabling reactive UI updates while extracting reusable Composables to simplify the transition.

Does the Compose migration approach support common Android widgets like TextView and EditText?

Yes, the Compose migration approach supports common Android widgets including TextView, EditText, Button, and ImageView, mapping them to equivalent Composables to ensure visual parity and maintain existing functionality.

What are the limitations of interleaving Compose and Views during an Android UI migration?

Interleaving Compose and Views using AndroidView requires careful attention to validation, testing, and accessibility considerations to ensure visual parity, manage interop complexity, and verify that the mixed UI approach maintains expected UX behavior.