# Xml To Compose Migration

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

- **Type:** Skill
- **Install:** `agentstack add skill-gdvega-super-android-kotlin-firebase-skill-xml-to-compose-migration`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [GDvega](https://agentstack.voostack.com/s/gdvega)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [GDvega](https://github.com/GDvega)
- **Source:** https://github.com/GDvega/super-android-kotlin-firebase-skill/tree/main/skills/xml-to-compose-migration

## Install

```sh
agentstack add skill-gdvega-super-android-kotlin-firebase-skill-xml-to-compose-migration
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 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](../../docs/COMPANION_SKILLS.md) 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

```bash
./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

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [GDvega](https://github.com/GDvega)
- **Source:** [GDvega/super-android-kotlin-firebase-skill](https://github.com/GDvega/super-android-kotlin-firebase-skill)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-gdvega-super-android-kotlin-firebase-skill-xml-to-compose-migration
- Seller: https://agentstack.voostack.com/s/gdvega
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
