xml-to-compose-migration

Convert Android XML layouts to Jetpack Compose with migration plans.

Updated Mar 17, 2026
One-click install
npx skills add https://github.com/kotlinknight/NutriSoloAndroid --skill xml-to-compose-migration-kotlinknight
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xml-to-compose-migration
Source: https://github.com/kotlinknight/NutriSoloAndroid/tree/main/.agents/skills/xml-to-compose-migration
Command: npx skills add https://github.com/kotlinknight/NutriSoloAndroid --skill xml-to-compose-migration-kotlinknight

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Android XML layouts can be migrated to Jetpack Compose to modernize UI while preserving behavior and accessibility.

Core Features & Use Cases

  • Analyze XML layouts to determine root container, widgets, bindings, and include/merge/ViewStub usage.
  • Plan migrations: full rewrite or incremental ComposeView integration, identify state sources and reusable composables.
  • Convert and migrate state: map LiveData/ ViewBinding to Compose state and hoist state to screen composables.
  • Test and verify visual parity, accessibility, and configuration-change resilience.
  • Guidance for common migration patterns and layout mappings to speed up adoption.

Quick Start

Provide the XML layout to migrate and let the tool generate a Compose-ready migration plan.

Frequently Asked Questions about xml-to-compose-migration

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

FAQPage Schema
How do I migrate XML layouts to Jetpack Compose?

Yes, you can adopt Compose incrementally in an existing Android View XML app by embedding ComposeView. This allows progressive migration of individual screens while preserving the rest of your UI and functionality.

How do I migrate LiveData and ViewModel state to Compose?

Migrating LiveData and ViewModel state to Compose involves mapping data bindings to Compose state and hoisting the state to screen-level composables to ensure proper UI updates and separation of concerns.

What is the best way to handle include and merge tags during a Compose migration?

The best way to handle include and merge tags during a Compose migration is to extract the included XML layouts into reusable, modular composables, replacing the tag hierarchy with direct function calls.

Does migrating XML to Compose preserve accessibility and configuration-change behavior?

Yes, migrating XML to Compose preserves accessibility and configuration-change resilience by testing visual parity and verifying that state hoisting handles orientation and configuration updates correctly.

What do I need to provide to start an XML to Compose layout migration?

To start an XML to Compose layout migration, you need to provide the XML layout file along with a migration plan detailing the layout type, data and state sources, and component extraction strategy.