Skip to content

Converts Android XML layouts to idiomatic Jetpack Compose, with a layout and widget mapping reference.

CCM score
54 of 100
skills.sh installs
468
GitHub stars
1K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers the migration workflow: analyzing XML, planning, converting layouts, migrating state, and verifying output
  • Includes container and widget mapping tables, an attribute-to-Modifier table, and worked examples for RecyclerView, ConstraintLayout, and include/merge
  • Covers incremental adoption via ComposeView and AndroidView interop for mixed View and Compose screens
  • Designed for teams moving Views to Compose who need a reference for conversion patterns

Install

$ npx -y skills add new-silvermoon/awesome-android-agent-skills --skill xml-to-compose-migration -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

XML to Compose Migration

Overview

Systematically convert Android XML layouts to idiomatic Jetpack Compose, preserving functionality while embracing Compose patterns. This skill covers layout mapping, state migration, and incremental adoption strategies.

Workflow

1. Analyze the XML Layout

  • Identify the root layout type (ConstraintLayout, LinearLayout, FrameLayout, etc.).
  • List all View widgets and their key attributes.
  • Map data binding expressions (@{}) or view binding references.
  • Identify custom views that need special handling.
  • Note any include, merge, or ViewStub usage.

2. Plan the Migration

  • Decide: Full rewrite or incremental migration (using ComposeView/AndroidView).
  • Identify state sources (ViewModel, LiveData, savedInstanceState).
  • List reusable components to extract as separate Composables.
  • Plan navigation integration if using Navigation component.

3. Convert Layouts

Apply the layout mapping table below to convert each View to its Compose equivalent.

4. Migrate State

Details

Repository
github.com/new-silvermoon/awesome-android-agent-skills
Categories
Mobile Apps, Frontend & UI Code
First seen
Jun 3, 2026

Questions

What does the XML to Compose migration skill do for an Android project?

It converts Android XML layouts to idiomatic Jetpack Compose, mapping containers like LinearLayout, FrameLayout and ConstraintLayout and widgets like TextView and RecyclerView to their Compose equivalents. It also covers migrating state from LiveData and findViewById to Compose state.

How do I install the xml-to-compose-migration skill?

Run npx -y skills add new-silvermoon/awesome-android-agent-skills --skill xml-to-compose-migration -y in your project. Once installed, the agent can use the skill to plan and carry out a migration from Views to Compose.

When should an agent use this skill?

Use it when you ask to migrate Views to Compose, convert XML to Composables, or modernize UI from the View system to Compose. It also supports incremental migration using ComposeView and AndroidView interop.

Where does this skill sit in the Mobile Apps category?

It is listed under Mobile Apps on Claude Marketplaces, alongside skills such as vercel-react-native-skills, animate-expo and write-swift. Its focus is narrower than those, centering on converting Android XML layouts to Jetpack Compose.

More from new-silvermoon/awesome-android-agent-skills

All 17

Similar to Xml To Compose Migration

More Mobile Apps