migrate-xml-views-to-jetpack-compose

Migrate Android XML layout Views to Jetpack Compose with screenshot validation.

Updated May 22, 2026
One-click install
npx skills add https://github.com/ekawijayasusilo/kmp_template --skill migrate-xml-views-to-jetpack-compose-ekawijayasusilo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migrate-xml-views-to-jetpack-compose
Source: https://github.com/ekawijayasusilo/kmp_template/tree/main/.claude/skills/migrate-xml-views-to-jetpack-compose
Command: npx skills add https://github.com/ekawijayasusilo/kmp_template --skill migrate-xml-views-to-jetpack-compose-ekawijayasusilo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It helps you replace a legacy Android XML View UI with Jetpack Compose while keeping the migration stable and visually consistent.

Core Features & Use Cases

  • Plan-driven migration: Breaks work into a safe 10-step workflow from identifying the best XML candidate to final cleanup.
  • Pixel-parity validation: Uses baseline screenshots (or screenshot tests) and compares them against Compose previews to achieve visual parity.
  • Incremental interoperability: Guides replacement of existing usages using Compose-in-Views and Views-in-Compose patterns without forcing a full rewrite.

Quick Start

Tell the AI to migrate your target XML layout file to Jetpack Compose by following the skill’s 10-step workflow and validating the result against a baseline screenshot.

Frequently Asked Questions about migrate-xml-views-to-jetpack-compose

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

FAQPage Schema
How do I migrate an Android XML view to Jetpack Compose without breaking the UI?

Migrate XML views to Jetpack Compose safely by following a 10-step workflow that includes dependency setup, minimal theming alignment, composable conversion, and iterative screenshot validation to ensure visual parity.

How does screenshot validation work during an XML to Compose migration?

Screenshot validation captures a baseline of the existing XML view and compares it against Compose previews iteratively before replacing usages, ensuring pixel-perfect visual parity throughout the migration process.

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

Yes, you can migrate incrementally by using Compose-in-Views and Views-in-Compose interoperability patterns, allowing you to replace individual XML layouts without forcing a complete application rewrite.

What is the best way to handle Android theming when converting XML layouts to Compose?

The best way to handle theming is to apply minimal theming changes that preserve existing XML theme interoperability, ensuring the new Compose UI aligns visually without breaking the global application theme.

Do I need to update compiler dependencies before converting Android XML to Compose?

Yes, converting XML to Compose requires Compose dependency and compiler setup as the first step of the migration workflow to ensure the project can build and render the new composable functions.

What steps are involved in cleaning up legacy Android XML files after a Compose migration?

The cleanup step involves safely removing the replaced legacy XML layout files and their associated tests only after verifying that the new Compose UI passes screenshot validation and usages have been fully updated.