Dev & Engineering

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.

47/ 100
Use with care

Useful, but reliability, evidence or controls still have material gaps.

See how it was scored ↓
Works as-is in
Codex · Claude Code
Stars
★ 7.7k
Last updated
16d ago
License
Apache-2.0
jetpack-composexml-migrationandroid-uiincremental-migration
+2interopcompose-preview

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.

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

How do you install this skill?

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.
Before you start
Your agent needs
  • Shell / CLI
  • Local filesystem
Install first
  • Android SDK
  • Gradle
  • Android CLI

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?

Try saying

Once installed, send your agent any of these to trigger it:

  • Please migrate my layout file to Compose

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.

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 does this skill compare with similar options?

Side by side with related skills; every score comes from the same FSRS standard.

Skill FS score Stars Last updated License
XML View to Jetpack Compose Migration Skill this page 47 · Use with care ★ 7.7k 16d ago Apache-2.0
Jetpack Compose Styles Integration Skill 44 · Not recommended ★ 7.7k 16d ago Apache-2.0
Expo Native UI Builder 59 · Recommended ★ 2.7k 6d ago MIT
Android Adaptive UI Skill 71 · Strongly recommended ★ 7.7k 16d ago Apache-2.0
Jetpack Navigation 3 Guide and Recipes 59 · Recommended ★ 7.7k 16d ago Apache-2.0

How did FollowSkills review this skill?

FollowSkills review · FSRS-2.0
Use with care
47/ 100 5-point scale 2.4 / 5
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.
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.

1 2 3 4 5 6

Open a dimension to read why it scored that way

Reviewed Aug 07, 2026 Reviewed revision 28822b2306f3 Review evidence[1][2][3][4][5][6][7][8][9][10][11][12]

Evidence confidence:Low — Mostly static review, author material or a limited demo; useful for discovery, not high-risk decisions.

See the full review method →

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

Dev & Engineering

Jetpack Compose Styles Integration Skill

Integrate the Jetpack Compose Styles API into an Android project for unified theming and layout migration.

★ 7.7k FS 44 Not recommended 16d ago
Dev & Engineering

Android Adaptive UI Skill

Make Jetpack Compose apps adaptive to phones, tablets, foldables, desktops, and more — with multi-pane layouts and flexible components.

★ 7.7k FS 71 Strongly recommended 16d ago
Dev & Engineering

Jetpack Navigation 3 Guide and Recipes

Learn how to install and migrate to Jetpack Navigation 3, with recipes for deep links, multiple back stacks, adaptive scenes, conditional navigation, and more.

★ 7.7k FS 59 Recommended 16d ago
Dev & Engineering

CameraX Development Skill

Procedural guidance for Android camera development with CameraX, covering migration, recording lifecycles, and hardware interop.

★ 7.7k FS 60 Recommended 16d ago
Dev & Engineering

Android CLI Skill Pack

A comprehensive guide for AI agents to the `android` command-line tool, covering project creation, SDK management, emulator control, screenshots, UI layout inspection, and official documentation search.

★ 7.7k FS 52 Use with care 16d ago
Dev & Engineering

AppFunctions Skill

Turn Android app workflows into on-device functions that AI agents can discover and invoke without opening the UI.

★ 7.7k FS 61 Recommended 16d ago
Dev & Engineering

Android Verified Email Skill

Implement an OTP-less, cryptographically verified email flow in Android using the Credential Manager API.

★ 7.7k FS 58 Recommended 16d ago

Related skills