migrate-xml-views-to-jetpack-compose

android/skills · Agent Skill

Инструмент для пошаговой миграции устаревших Android XML-макетов на современный декларативный фреймворк Jetpack Compose с сохранением визуальной целостности и функциональности интерфейса вашего мобильного приложения.

Перейти к установке ↓

Обзор

АвторandroidОрганизация
Репозиторийandroid/skills
Папка скиллаmigrate-xml-views-to-jetpack-compose
Звёзды9 189
Форки592
Файлы4
Обновлён21 октября 2026 г.

Проверка Mozgi

Что мы нашли в файлах скилла. Подробности — по подписке.

Безопасность
низкий риск · явных рисков не найдено — полный отчёт покажет детали
Совместимость
только инструкции — подходит большинству агентов
Похожие скиллы
найдено 144 похожих скилла
Ещё в подписке

Установка

Скилл — это папка с файлом SKILL.md. Выберите своего агента и скопируйте команды в терминал (macOS, Linux или Git Bash на Windows) в корне проекта.

Скопируйте промпт и вставьте в Claude, Codex или другого ассистента: он сам проверит скилл и подключит его.

Установи мне скилл «migrate-xml-views-to-jetpack-compose» с mozgi.io (https://mozgi.io/skills/migrate-xml-views-to-jetpack-compose/).

1. Скачай архив: https://mozgi.io/skills/migrate-xml-views-to-jetpack-compose/download
2. Прочитай SKILL.md и остальные файлы. Проверь, что скилл безопасен: нет скрытых команд, отправки данных наружу или скриптов, которые делают не то, что описано. Если что-то подозрительно — остановись и скажи мне.
3. Положи папку «migrate-xml-views-to-jetpack-compose» в папку скиллов своего агента: .claude/skills/ для Claude Code, .agents/skills/ для Codex, .cursor/skills/ для Cursor, .gemini/skills/ для Gemini CLI. В проекте — внутри проекта, иначе в домашней папке (~/.claude/skills/ и т. п.).
4. Убедись, что получилось <папка скиллов>/migrate-xml-views-to-jetpack-compose/SKILL.md.
5. Коротко расскажи, что умеет этот скилл, и предложи попробовать его на моей задаче.

Если какой-то шаг не можешь сделать сам — подскажи, что нажать или ввести.

Файлы скилла

4 файла Скачать ZIP

Просмотрите SKILL.md и сопутствующие файлы перед установкой. Клик по файлу — предпросмотр.

Содержимое SKILL.md

Оригинальный текст автора · только чтение

This skill guides through the process of migrating an existing Android XML View

to Jetpack Compose. It performs a stable, safe and visually consistent

transition by following a structured, 10-step methodology. This skill migrates

UI (XML to Jetpack Compose) only.

Objective

To systematically convert a single legacy XML layout into modern, declarative

Jetpack Compose UI while maintaining pixel-perfect visual parity and functional

integrity.

Summary of the 10-step migration process

1. Identify the optimal XML candidate for migration

2. Analyze the project and layout

3. Create a plan

4. Capture the XML View UI

5. Set up Compose dependencies and compiler

6. Set up Compose theming

7. Migrate the XML layout to Compose

8. Validate the migration

9. Replace usages

10. XML code removal

Detailed steps

Step 1: Identify the optimal XML candidate for migration

If the user has explicitly specified a target XML layout, proceed to Step 2.

Otherwise, analyze the codebase to identify the best candidate for migration by

following the logic in references/identify-optimal-xml-candidate.md.

Step 2: Analyze the project and layout

Analyze the identified XML View's structure, hierarchy, and implementation

details.

Use references/analysis-of-the-project-and-layout.md to

guide your technical audit of the layout and surrounding project context.

Step 3: Create a plan

Using the outputs and analysis done in the Step 1 and 2, generate a

step-by-step plan for the migration. If you support user interaction, present

to the user and ask for approval before proceeding. If user interaction is not

supported, proceed to Step 4 following the generated plan.

Step 4: Capture the XML View UI

IF you support user interaction, ask the user to upload a screenshot of the

XML View UI or provide an absolute path to a file. Use this image as a visual

reference for the layout migration in Step 7.

ELSE IF you are able to run an Android emulator, locate an existing

screenshot test for the XML candidate. If none exists, create one using the

existing project testing framework. If no framework exists,

use UI Automator or Espresso to create a screenshot test with minimum

required setup. Run the test and take a baseline screenshot of the XML UI.

ELSE proceed to Step 5.

Step 5: Set up Compose dependencies and compiler

Check build.gradle or libs.versions.toml for Compose dependencies and

compiler setup. If missing, use

Setup Compose Dependencies and Compiler.

Run a sync to ensure dependencies resolve without errors.

Step 6: Set up Compose theming

If the project already has Compose theming set up, proceed to Step 7. If Compose

theming is missing, initialize it. For Material-based projects, follow

Material 3 migration guidelines.

For custom design systems, apply expert judgment to migrate XML theming and

match existing styles.

Constraints: Do not migrate the entire theme. Implement only the minimum

theming required for the specific XML candidate. Maintain original XML themes

for interoperability. Maintain existing project code conventions, patterns,

names and values.

Step 7: Migrate the XML View to Compose

Convert the XML candidate to Jetpack Compose code, referencing

references/xml-layout-migration.md and the image from Step 4.

You must include a Compose Preview for the newly created composable to

facilitate visual verification.

Step 8: Replace usages

Replace the usages of the migrated XML layout to use the new Compose component.

  • To add Compose in Views, use Compose in Views.
  • To add Views in Compose, use Views in Compose.

Step 9: Validate the migration

Compare the baseline screenshot image from Step 4 with the rendered Compose

Preview of the new composable. Ignore string content; focus on layout and

styling. Iterate on the Compose code until visual parity is achieved. Once

verified, write a Compose UI test for the new composable.

Step 10: XML code removal

Delete the migrated XML file and its associated legacy tests. Caution: Only

remove code and resources that are not referenced by other parts of the project.

Вопросы и ответы

Что делает скилл migrate-xml-views-to-jetpack-compose?

Инструмент для пошаговой миграции устаревших Android XML-макетов на современный декларативный фреймворк Jetpack Compose с сохранением визуальной целостности и функциональности интерфейса вашего мобильного приложения.

Как установить migrate-xml-views-to-jetpack-compose?

Откройте блок «Установка» на этой странице и выберите своего агента — Claude Code, Codex, Cursor или Gemini CLI: там готовые команды, которые копируют папку скилла в нужное место. Либо скопируйте промпт из вкладки «Через ассистента» — ассистент сам проверит и подключит скилл.

С какими нейросетями работает migrate-xml-views-to-jetpack-compose?

Скиллы — это обычные инструкции в Markdown (формат Agent Skills), поэтому migrate-xml-views-to-jetpack-compose подходит любому агенту, который читает SKILL.md: Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode и другие. Модель загружает инструкции только когда задача подходит под описание скилла.

Скилл migrate-xml-views-to-jetpack-compose бесплатный?

Скилл опубликован автором android в открытом доступе под лицензией Apache-2.0. Сам скилл ничего не стоит — вы платите только своему провайдеру нейросети за использованные токены.

Безопасно ли устанавливать скиллы?

Скилл — это инструкции, которые агент будет выполнять, поэтому перед установкой прочитайте SKILL.md и сопутствующие файлы. Скрипты из папки скилла запускаются только если их запустит агент — следите за тем, что он делает, и не давайте лишних прав.

Чем скилл отличается от MCP-сервера или плагина?

MCP-сервер и плагин дают модели новые инструменты — код, который выполняется и возвращает результат. Скилл даёт знания и порядок действий: как подходить к задаче, какие шаги делать и как выглядит хороший результат. Ему не нужен сервер или ключ API.

Похожие скиллы

Все скиллы →