$npx skillfedfor your agent

xml-to-compose-migration

This skill guides you through converting Android XML layouts to idiomatic Jetpack Compose code. It provides layout mapping tables for common containers and widgets, attribute translation, and patterns for state migration from LiveData to Compose state. Use it for full rewrites or incremental adoption via ComposeView interop.

XML to Compose Migration converts Android XML layouts to Jetpack Compose with systematic mapping and state handling.

AI-generated summary based on this skill's SKILL.md

905 87 Apache-2.0updated by new-silvermoon

Decision gist · record as of 2026-07-27

XML to Compose Migration converts Android XML layouts to Jetpack Compose with systematic mapping and state handling. This skill guides you through converting Android XML layouts to idiomatic Jetpack Compose code. It provides layout mapping tables for common containers and widgets, attribute translation, and patterns for state migration from LiveData to Compose state. Use it for full rewrites or incremental adoption via ComposeView interop.

manual: git clone https://github.com/new-silvermoon/awesome-android-agent-skills → cp -r awesome-android-agent-skills/.github/skills/migration/xml-to-compose-migration ~/.claude/skills/xml-to-compose-migration
.github/skills/migration/xml-to-compose-migration/SKILL.md · version 621f058f

Use it when

  • xml-to-compose-migration maps traditional Android containers to Compose equivalents: LinearLayout becomes Row or Column depending.
  • xml-to-compose-migration provides patterns for migrating from View system state management to Compose.

Verify before relying

Read SKILL.md below before installing (1 file). Open directory: indexed for reading, not audited.

Same gist for agents: .md · .json

Install

new-silvermoon/awesome-android-agent-skills/xml-to-compose-migration

Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How do I convert Android XML layout to Jetpack Compose?

xml-to-compose-migration guides you through converting Android XML layouts into idiomatic Jetpack Compose code. The skill provides layout mapping tables for common containers like LinearLayout, FrameLayout, and ConstraintLayout, plus widget equivalents (Button, EditText, ImageView, etc.). It covers attribute translation, state migration from LiveData to Compose state, and patterns for both full rewrites and incremental adoption using ComposeView interop.

What layout containers can xml-to-compose-migration help me map?

xml-to-compose-migration maps traditional Android containers to Compose equivalents: LinearLayout becomes Row or Column depending on orientation, ConstraintLayout converts to Box with modifier constraints, FrameLayout maps to Box, and RecyclerView transforms to LazyColumn or LazyRow. The skill includes detailed mapping tables showing how to translate layout_width, layout_height, gravity, and other XML attributes into Compose modifiers and parameters.

How does xml-to-compose-migration handle state migration?

xml-to-compose-migration provides patterns for migrating from View system state management to Compose. It covers converting LiveData and ViewModel patterns to Compose State and StateFlow, replacing DataBinding with Compose's declarative state hoisting, and modernizing ViewBinding usage. The skill guides you through managing state lifecycle in composables and integrating with existing Android architecture components during migration.

Can I use xml-to-compose-migration for incremental adoption?

Yes. xml-to-compose-migration supports incremental migration strategies using ComposeView interop, allowing you to adopt Compose gradually while maintaining XML layouts. The skill shows how to embed composables in existing XML-based fragments and activities, manage state across the XML-Compose boundary, and plan phased migration without requiring a complete rewrite of your codebase.

Does xml-to-compose-migration cover widget conversion?

xml-to-compose-migration provides conversion guidance for common widgets: EditText becomes TextField or OutlinedTextField, Button maps to Button with onClick lambda, ImageView converts to Image, CardView becomes Card, and RecyclerView transforms to LazyColumn. The skill includes attribute mapping for properties like hint, inputType, src, elevation, and more, helping you translate XML widget definitions into their Compose equivalents.

What does xml-to-compose-migration replace in modern Android development?

xml-to-compose-migration helps modernize your UI architecture by replacing ViewBinding with Compose's type-safe declarative syntax, DataBinding with Compose state management, and the entire View system with composables. It guides you away from XML layout inflation and fragment-based UI toward Compose's functional composition model, reducing boilerplate and improving maintainability while supporting interop during transition periods.

SKILL.md

Rendered from the published skill. Quoted content, verbatim.

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

(truncated - see the full file via the links below)

File tree — 1 file
.github/skills/migration/xml-to-compose-migration/SKILL.md

Let your AI agent find skills like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.

wish › “Convert existing Android XML layouts to Jetpack Compose”

Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →

Related skills

styles
by android · android/skills

Styles guides you through adopting Jetpack Compose's Styles API for custom UI components and themes. Follow step-by-step workflows to upgrade dependencies, establish ComponentStyles, and migrate components using Modifier.styleable to replace hard-coded styling parameters with unified style attributes.

Apache-2.0updated Jul 2026
★ 6,379repo stars
Cometchat Android V6 Kotlin Placement
by cometchat · cometchat/cometchat-skills

Integrate CometChat's Kotlin Views into Android layouts across Activities, Fragments, BottomSheets, and tabbed interfaces. Learn placement patterns for Conversations, Messages, and other components with proper window inset handling and navigation wiring.

no license declared → metadata onlyupdated Jun 2026
★ 61repo stars
Cometchat Android V5 Placement
by cometchat · cometchat/cometchat-skills

This skill covers six placement patterns for integrating CometChat into Android projects: dedicated Activity, Fragment, BottomSheet, Dialog, Tab/ViewPager, and embedded view. Each pattern includes step-by-step instructions and code examples in both Java and Kotlin, helping you choose the right architecture for your app's messaging needs.

no license declared → metadata onlyupdated Jun 2026
★ 61repo stars
Cometchat Android V5 Components
by cometchat · cometchat/cometchat-skills

Reference guide for all CometChat Android UI Kit v5 components—CometChatConversations, CometChatMessageList, CometChatMessageComposer, CometChatMessageHeader, and lower-level views. Covers key methods, callbacks, visibility toggles, and code examples in Java and Kotlin. Use this before writing any CometChat view code to verify component names and available configuration options.

no license declared → metadata onlyupdated Jun 2026
★ 61repo stars
display-glasses-with-jetpack-compose-glimmer
by android · android/skills

This skill teaches you to develop Android XR augmented experiences for display glasses using Jetpack Compose Glimmer, Google's UI toolkit designed for transparent, additive displays. You'll master Glimmer design principles, theming with GlimmerTheme, and component implementation while adhering to glasses-specific constraints like minimum text legibility and black backgrounds. Use it to create lightweight, real-world-aware apps that project from a host device to connected eyewear.

Apache-2.0updated Jul 2026
★ 6,379repo stars
material-3
by hamen · hamen/material-3-skill

Material-3 covers Google's Material Design 3 system for building adaptive, personal UIs primarily in Jetpack Compose. It includes 30+ components, a complete token system for color and typography, theming with dynamic color, and responsive layout patterns across window sizes. Also supports Flutter and web implementations.

MITupdated Jul 2026
★ 1,181repo stars

More skills Cometchat Android V6 Troubleshooting (unlicensed) · mobile-android-design (MIT) · android-coil-compose (MIT) · android-design-guidelines (MIT) · Android Design (NOASSERTION) · migrate-xml-views-to-jetpack-compose (Apache-2.0)

Tags
ui-modernizationdeclarative-uiview-system-migrationstate-hoistingincremental-adoptionandroid-interoplayout-conversioncompose-patterns