From android-dev
Guides step-by-step migration of Android XML Views to Jetpack Compose, from candidate selection through theming, layout conversion, validation, and XML cleanup.
How this skill is triggered — by the user, by Claude, or both
Slash command
/android-dev:migrate-xml-views-to-jetpack-composeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill guides through the process of migrating an existing Android XML View
_VENDOR.mdreferences/analysis-of-the-project-and-layout.mdreferences/android/develop/ui/compose/designsystems/migrate-xml-theme-to-compose.mdreferences/android/develop/ui/compose/migrate/interoperability-apis/compose-in-views.mdreferences/android/develop/ui/compose/migrate/interoperability-apis/views-in-compose.mdreferences/android/develop/ui/compose/setup-compose-dependencies-and-compiler.mdreferences/identify-optimal-xml-candidate.mdreferences/xml-layout-migration.mdThis skill guides through the process of migrating an existing Android XML View to Jetpack Compose. It performs a stable, safe and visually consistent transition by following a structured, 10-step methodology. This skill migrates UI (XML to Jetpack Compose) only.
To systematically convert a single legacy XML layout into modern, declarative Jetpack Compose UI while maintaining pixel-perfect visual parity and functional integrity.
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.
Analyze the identified XML View's structure, hierarchy, and implementation details. Use references/analysis-of-the-project-and-layout.md to guide your technical audit of the layout and surrounding project context.
Using the outputs and analysis done in the Step 1 and 2, generate a step-by-step plan for the migration. If you support user interaction, present to the user and ask for approval before proceeding. If user interaction is not supported, proceed to Step 4 following the generated plan.
IF you support user interaction, ask the user to upload a screenshot of the XML View UI or provide an absolute path to a file. Use this image as a visual reference for the layout migration in Step 7. ELSE IF you are able to run an Android emulator, locate an existing screenshot test for the XML candidate. If none exists, create one using the existing project testing framework. If no framework exists, use UI Automator or Espresso to create a screenshot test with minimum required setup. Run the test and take a baseline screenshot of the XML UI. ELSE proceed to Step 5.
Check build.gradle or libs.versions.toml for Compose dependencies and
compiler setup. If missing, use
Setup Compose Dependencies and Compiler.
Run a sync to ensure dependencies resolve without errors.
If the project already has Compose theming set up, proceed to Step 7. If Compose theming is missing, initialize it. For Material-based projects, follow Material 3 migration guidelines. For custom design systems, apply expert judgment to migrate XML theming and match existing styles. Constraints: Do not migrate the entire theme. Implement only the minimum theming required for the specific XML candidate. Maintain original XML themes for interoperability. Maintain existing project code conventions, patterns, names and values.
Convert the XML candidate to Jetpack Compose code, referencing references/xml-layout-migration.md and the image from Step 4. You must include a Compose Preview for the newly created composable to facilitate visual verification.
Replace the usages of the migrated XML layout to use the new Compose component.
Compare the baseline screenshot image from Step 4 with the rendered Compose Preview of the new composable. Ignore string content; focus on layout and styling. Iterate on the Compose code until visual parity is achieved. Once verified, write a Compose UI test for the new composable.
Delete the migrated XML file and its associated legacy tests. Caution: Only remove code and resources that are not referenced by other parts of the project.
npx claudepluginhub hanamizuki/solopreneur --plugin android-devConverts Android XML layouts to Jetpack Compose, mapping Views to Composables and migrating state from LiveData/ViewBinding.
Expert on Compose and Compose Multiplatform for UI across Android, Desktop, iOS, and Web. Covers Compose APIs, KMP commonMain, Android TV, Paging 3, Material 3, and design-to-code workflows. Activates on GitHub PR review requests and auto-detects Compose projects.
Guides Jetpack Compose and Compose Multiplatform development across Android, Desktop, iOS, and Web — covering state, layout, animation, navigation, performance, and design-to-code workflows.