Dev & Engineering jetpack-composexml-migrationandroid-uiincremental-migrationinteropcompose-preview

XML View to Jetpack Compose Migration Skill

A structured 10-step workflow to safely and incrementally migrate Android XML layouts to Jetpack Compose with visual parity.

FollowSkills review · FSRS-2.0
Not recommended
47/ 100 5-point scale 2.4 / 5
1 2 3 4 5 6
1Trust16 / 25 · 3.2/5

The skill provides a step-by-step process, requires user confirmation (step 3), and mandates checking build state before migration. It limits scope (no full theme migration, no non-UI code changes). However, it does not address sensitive data handling or rollback, and data-flow transparency is missing. Dependency references are unverifiable.

2Reliability6 / 20 · 1.5/5

Provides 10 steps and multiple reference documents, but key path depends on external resources (screenshots, test frameworks) and lacks automated tests or example outputs. No error handling or failure feedback descriptions. Static review cannot verify runnability.

3Adaptability9 / 15 · 3.0/5

Clear target: migrate XML views to Jetpack Compose. Provides criteria for selecting candidate XML, but non-fit boundaries are unclear (e.g., large complex layouts or custom design systems). No mention of Chinese language support or network reachability.

4Convention9 / 15 · 3.0/5

Clear structure with description, objective, steps, and references. But lacks installation dependencies, versioning, maintenance responsibility, known limitations. Metadata author is Google LLC but unverified.

5Effectiveness5 / 15 · 1.7/5

Describes complete process but no examples or verified outputs. Static review cannot confirm correctness. Output (generated Compose code) requires user integration and testing, limiting direct usability.

6Verifiability2 / 10 · 1.0/5

Provides steps and reference docs but no test cases or CI results, no third-party execution evidence. Key claims (e.g., pixel-perfect visual parity) unverifiable.

Evidence confidence:Low Reviewed Aug 07, 2026 Reviewed revision 28822b2306f3
The upstream repository has new commits since this review. The score still applies to the reviewed revision shown and may not cover the latest changes.
Before you use it
  • Static assessment only, not executed; actual effectiveness may vary per project and requires user testing.
  • Skill depends on external references (e.g., developer.android.com) and user-provided screenshots, functionality may be affected by network and user input.
  • No failure handling or rollback mechanisms mentioned, which presents risk.
  • Migration steps may introduce visual discrepancies; careful validation needed.
See the full review method →

What does this skill do, and when should you use it?

This skill provides a complete methodology for migrating an existing Android XML View to Jetpack Compose, covering everything from identifying the right candidate and analyzing the project, to setting up dependencies and theming, converting the layout, validating the result, and cleaning up. It focuses solely on UI migration, not business logic, and emphasizes pixel-perfect visual consistency and interoperability with existing views. The skill is based on official Android best practices, maintained by Google LLC, and released under Apache 2.0.

Analyzes the project structure to identify a suitable XML layout for migration; reads build files (build.gradle or libs.versions.toml) to check and configure Compose dependencies and compiler; captures or obtains a screenshot of the XML UI for visual reference; sets up minimal Compose theming based on project conventions; converts the XML layout into Compose code with a Compose Preview; replaces usages of the old layout with the new composable; validates by comparing the baseline screenshot with the Preview and writes a Compose UI test; finally deletes the XML file and associated legacy tests.

  1. An Android developer who wants to migrate a single XML layout to Compose incrementally without a full rewrite.
  2. A team that needs to maintain interoperability between traditional Views and Compose while migrating screen by screen to reduce risk.
  3. Projects requiring strict visual parity after migration, without losing existing functionality.
  4. Developers who cannot run an Android emulator but want a guided, step-by-step migration process.
  5. Technical leads seeking a systematic approach to document and test the migration.

What are this skill's strengths and limitations?

Pros
  • Provides a clear, structured 10-step process that is easy to follow and verify.
  • Emphasizes visual consistency and incremental adoption, reducing migration risk.
  • Supports interoperability with existing View systems, preserving original themes and patterns.
  • Includes requirements for Compose Preview and UI tests, aiding quality assurance.
Limitations
  • Only handles UI migration; business logic integration is out of scope, requiring additional work.
  • Relies heavily on official Android best practices, limiting support for non-standard custom views.
  • Requires Android CLI and Android Studio, which may be impractical for developers without these tools.
  • Lacks explicit error handling for unsupported layouts, potentially requiring manual intervention.

How do you install this skill?

Use Android CLI to install the skill into your project:

android skills add --skill=migrate-xml-views-to-jetpack-compose --project=.

If no project path is specified, it will be installed to default agent directories (e.g., ~/.gemini/antigravity/skills).

How do you use this skill?

In an Android development environment that supports skills (e.g., Android Studio with Gemini), directly request: "Please migrate my layout file to Compose" and the skill will run analysis and output steps. Provide the target XML file path or screenshot if needed; if an emulator is not available, the skill will skip the screenshot capture step and proceed.

FAQ

Does this skill migrate an entire project from XML to Compose?
No, it is designed to migrate one XML view at a time to enable incremental adoption and reduce risk. A full project migration would require multiple invocations.
Do I need extra dependencies during migration?
You need to ensure your project has Jetpack Compose dependencies and compiler configured; the skill checks and guides the setup.
How is visual consistency ensured?
The skill requires capturing a screenshot of the original XML and comparing it with the Compose Preview after migration, iterating until they match.
Does it support custom views?
It is primarily for standard XML layouts; custom views may require manual adjustments, but the basic workflow still applies.

More skills from this repository

All from android/skills

Related skills