legado-compose-migration
Skill by HapeLee
Guides migration of Legado Android screens from XML, View, RecyclerView and DialogFragment code to Jetpack Compose and Material 3. Also covers new Compose-first screens built on standard Android architecture.
Install legado-compose-migration
Built from the published package, never by AI.
git clone --depth 1 https://github.com/HapeLee/legado-with-MD3 /tmp/legado-with-MD3 && mkdir -p ~/.claude/skills && cp -r /tmp/legado-with-MD3/.codex/skills/legado-compose-migration ~/.claude/skills/legado-compose-migrationRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install legado-compose-migration in Claude Code
git clone --depth 1 https://github.com/HapeLee/legado-with-MD3 /tmp/legado-with-MD3 && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/legado-with-MD3/.codex/skills/legado-compose-migration ~/.gemini/antigravity-cli/skills/legado-compose-migrationAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install legado-compose-migration in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill guides an AI assistant through migrating one Legado Android UI surface at a time from XML, View, RecyclerView and DialogFragment screens to Jetpack Compose and Material 3. It also guides creating new Compose-first screens. The assistant is asked to map the old surface, choose the smallest migration shape, and preserve existing behavior such as navigation, menu actions, dialogs, and persistence.
New screens are added as MainActivity navigation destinations. The skill describes a FeatureContract for UiState, Intent and Effect, a ViewModel that exposes StateFlow and SharedFlow, and a stateless Screen composable. It also covers Koin registration, project theme and widget conventions, and Gradle compile checks. It is aimed at developers working on the Legado codebase with Codex or a similar assistant.
Written from the project's SKILL.md and checked against it.
What it can do
- Map legacy screensReads Activities, Fragments, XML layouts, adapters, menus and ViewModels to list UI state, intents and effects.
- Choose migration shapePicks the minimal migration approach and keeps legacy Activities only as compatibility hosts when needed.
- Create Compose screensAdds FeatureContract, FeatureViewModel and FeatureScreen files using StateFlow and SharedFlow.
- Wire navigationAdds new Compose destinations through MainActivity route handling instead of standalone Activities.
- Register ViewModelsRegisters new ViewModels in di/appModule.kt with Koin.
- Remove obsolete artifactsDeletes XML layouts, adapters and menu resources only when the migrated screen no longer references them.
- Verify buildsSuggests focused Gradle checks such as compileAppDebugKotlin and assembleAppDebug.
What you need
- Legado Android project source
- Gradle (gradlew.bat commands shown)
Try asking
- Migrate this XML RecyclerView screen in Legado to a Compose screen.
- Create a new Compose settings page as a MainActivity navigation destination.
- Review this Legado Compose screen for state hoisting and effect handling.
Good to know
- Migrates one UI surface at a time.
- Preserves behavior first for migrations.
- Does not refactor unrelated View screens or shared utilities.
- Keeps existing Chinese string resources and localization behavior.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .codex/skills/legado-compose-migration/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md7 KB -
agents/openai.yaml279 B -
references/project-patterns.md13 KB
Alternatives to legado-compose-migration
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
legado-compose-migration: common questions
Does it migrate a whole Legado app to Compose at once?
No. The skill says to migrate one UI surface at a time, or create one new Compose destination at a time.
Where should new Compose screens be placed?
New Compose-first screens should be added as MainActivity navigation destinations rather than standalone Activities. Standalone Activities are kept only as legacy entry points when View code still depends on Intent navigation.
Which architecture does it use for new screens?
It uses UDF or MVI-style state, StateFlow and SharedFlow in ViewModels, Koin for registration, and repository or usecase boundaries.
How do I install legado-compose-migration?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is legado-compose-migration free?
The code is published under the GPL-3.0 licence. The service it connects to may have its own pricing.
Is legado-compose-migration safe to use?
It scores 90 of 100. Grades: maintenance A, licence C, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to legado-compose-migration?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
