# migrate-xml-views-to-jetpack-compose

> Claude/Codex skill by [@android](https://omgskills.com/library/android/index.md) · 8.6k stars · Updated 2026-10-16

Provides a structured workflow for migrating an Android XML View to Jetpack Compose. This skill details the step-by-step process, from planning and dependency setup, to theming and layout migration, validation and XML cleanup. Use this skill when you need to migrate an XML View to Jetpack Compose in an Android project. It solves the problem of converting the UI of a legacy XML View into modern, declarative Compose components while maintaining interoperability.

Tags: skills

## Install

```sh
git clone https://github.com/android/skills /tmp/skills && ln -s /tmp/skills/jetpack-compose/migration/migrate-xml-views-to-jetpack-compose ~/.claude/skills/migrate-xml-views-to-jetpack-compose
```

## From README

Objective To systematically convert a single legacy XML layout into modern, declarative Jetpack Compose UI while maintaining pixel-perfect visual parity and functional integrity. Summary of the 10-step migration process Identify the optimal XML candidate for migration Analyze the project and layout Create a plan Capture the XML View UI Set up Compose dependencies and compiler Set up Compose theming Migrate the XML layout to Compose Validate the migration Replace usages XML code removal Detailed steps Step 1: Identify the optimal XML candidate for migration If the user has explicitly specified a target XML layout, proceed to Step 2. Otherwise, analyze the codebase to identify the best candidate for migration by following the logic in references/identify-optimal-xml-candidate.md. Step 2: Analyze the project and layout Analyze the identified XML View's structure, hierarchy, and implementation details.

## Links

- HTML page: https://omgskills.com/library/android/skills/migrate-xml-views-to-jetpack-compose/
- GitHub: https://github.com/android/skills
- Author: [@android](https://omgskills.com/library/android/index.md)

## More from this repo

- [android-cli](https://omgskills.com/library/android/skills/android-cli/index.md) — Provides instructions for installing and using the \`android\` CLI.
   - [@android](https://omgskills.com/library/android/index.md) · 10k stars
- [android-intent-security](https://omgskills.com/library/android/skills/android-intent-security/index.md) — Best practices for Android Intent security.
   - [@android](https://omgskills.com/library/android/index.md) · 10k stars
- [navigation-3](https://omgskills.com/library/android/skills/navigation-3/index.md) — Learn how to install and migrate to Jetpack Navigation 3, and how to implement features and patterns such as deep...
   - [@android](https://omgskills.com/library/android/index.md) · 10k stars
