Converts Android XML layouts to Jetpack Compose with systematic mappings for every common widget and container. Handles the full workflow from analyzing ConstraintLayouts and LinearLayouts through state migration and testing. The comprehensive reference tables map XML attributes to Compose modifiers (layout_weight to weight(), visibility to conditional composition) and cover RecyclerView to LazyColumn, EditText to TextField with state hoisting, and interop patterns for incremental migration. Especially useful when you're staring at a complex ConstraintLayout or nested LinearLayouts and need the Compose equivalent without guessing. The attribute mapping alone saves time on every migration.

skills.sh installs
451
GitHub stars
1K
last updated
Aug 21, 2026

Install

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

Installs into .claude/skills of the current project.

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

Sponsors

Details

Repository
github.com/new-silvermoon/awesome-android-agent-skills
Categories
AI & Agent Building, Mobile Development
First seen
Jun 3, 2026

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

All 17
1aj-geddes avatarapi-filtering-sortingaj-geddes/useful-ai-promptsImplement advanced filtering and sorting capabilities for APIs with query parsing, field validation, and optimization. Use when building search features, comple450skills.sh installs
2aj-geddes avatarcloud-migration-planningaj-geddes/useful-ai-promptsPlan and execute cloud migrations with assessment, database migration, application refactoring, and cutover strategies across AWS, Azure, and GCP.450skills.sh installs
3aj-geddes avatardesign-handoffaj-geddes/useful-ai-promptsPrepare designs for development handoff. Document specifications, interactions, and assets to enable efficient development and maintain design quality.450skills.sh installs
4aj-geddes avatargit-hooks-setupaj-geddes/useful-ai-promptsImplement Git hooks using Husky, pre-commit, and custom scripts. Enforce code quality, linting, and testing before commits and pushes.450skills.sh installs
5hoodini avatarfigmahoodini/ai-agents-skillsIntegrate with Figma API for design automation and code generation. Use when extracting design tokens, generating React/CSS code from Figma components, syncing 450skills.sh installs
6aj-geddes avatarcloud-storage-optimizationaj-geddes/useful-ai-promptsOptimize cloud storage across AWS S3, Azure Blob, and GCP Cloud Storage with compression, partitioning, lifecycle policies, and cost management.449skills.sh installs