agentleFS
GDvegaGDvega/super-android-kotlin-firebase-skill/skills/xml-to-compose-migration/SKILL.md

xml-to-compose-migration

Skill2 starsChanged 5 months agoMITView on GitHub

Use for incremental migration from XML layouts, ViewBinding, Fragments and legacy themes to Jetpack Compose screens and previews.

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 10 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Keep business logic in ViewModel or domain layers.

    line 28
  2. Distinctive:

    Use ComposeView or route/screen split for incremental adoption.

    line 29
  3. Distinctive:

    Add previews and critical UI tests.

    line 31
  4. Distinctive:

    Do not delete XML that is still referenced.

    line 35
  5. Distinctive:

    Do not move ViewModel logic into Composables.

    line 36
  6. Distinctive:

    Keep string resources in resources unless project conventions differ.

    line 37
  7. Distinctive:

    Prefer incremental migration over large rewrites.

    line 39
  8. Distinctive:

    Do not assume these companion skills are installed.

    line 52
  9. Distinctive:

    Use $super-android-kotlin-firebase to migrate this XML screen to Compose.

    line 92
  10. Distinctive:

    Use $super-android-kotlin-firebase to replace ViewBinding with Compose incrementally.

    line 93

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Purpose

Move legacy XML UI to Compose incrementally while preserving resources, navigation, ViewModel logic and test coverage.

When to use

  • Converting XML layout screens to Compose.
  • Migrating ViewBinding or Fragment UI to Compose.
  • Keeping XML and Compose interoperability during a transition.
  • Migrating themes, colors and strings into Compose-friendly usage.

Inputs to inspect

  • res/layout/*.xml
  • Fragment.kt and Activity.kt
  • ViewBinding usage
  • themes.xml, colors.xml, strings.xml
  • Navigation graph and screen tests

Required workflow

  1. Identify the smallest screen or component to migrate.
  2. Keep business logic in ViewModel or domain layers.
  3. Use ComposeView or route/screen split for incremental adoption.
  4. Preserve strings and accessibility labels.
  5. Add previews and critical UI tests.

Rules

  • Do not delete XML that is still referenced.
  • Do not move ViewModel logic into Composables.
  • Keep string resources in resources unless project conventions differ.
  • Preserve navigation contracts.
  • Prefer incremental migration over large rewrites.

Related existing skills

Local skills to invoke

  • jetpack-compose
  • edge-to-edge-adaptive-ui
  • accessibility
  • testing

External companion skills to use when installed

Do not assume these companion skills are installed. Prefer the local skills above first, then consult Companion Skills for install and verification commands.

  • aldefy/compose-skill — use for deeper Jetpack Compose, Material 3, design-to-code, theming or Compose architecture guidance.
  • android/skills — use for official Android workflow alignment around edge-to-edge, adaptive UI, Navigation 3, R8, AGP or testing setup.

Files commonly touched

  • res/layout/*.xml
  • Fragment.kt
  • Activity.kt
  • feature/*/*Screen.kt
  • ui/theme/*
  • navigation/*
  • androidTest/*

Commands to validate

./gradlew assembleDebug
./gradlew test
./gradlew connectedDebugAndroidTest

Common mistakes to avoid

  • Rewriting the whole feature at once.
  • Dropping resource qualifiers or accessibility labels.
  • Breaking Fragment lifecycle assumptions.
  • Skipping previews for empty/error states.

Checklist

  • XML references checked.
  • Compose screen is stateless where practical.
  • Resources preserved.
  • Preview added.
  • Tests added or recommended.

Example prompts

  • Use $super-android-kotlin-firebase to migrate this XML screen to Compose.
  • Use $super-android-kotlin-firebase to replace ViewBinding with Compose incrementally.

Expected response style

Respond with: brief diagnosis, change plan, affected files, code or diff summary, validation commands, tests added or recommended, risks, and next step. For review tasks, lead with findings ordered by severity.

References

  • ../../docs/audits/FUENTES_LOCALES.md
  • references/incremental-migration-strategy.md
  • references/xml-compose-interoperability.md
  • references/theme-migration.md
  • templates/fragment-to-compose-template.md
  • templates/xml-screen-to-compose-screen-template.md
  • templates/compose-preview-template.md

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.