common-accessibility
Enforce WCAG 2.2 AA compliance with semantic HTML, ARIA roles, keyboard navigation, and color contrast standards for web UIs. Use…
Migrate an Android XML View to Jetpack Compose following a structured 10-step workflow. Use when converting XML layouts to Compose, setting up Compose in an existing View-based project, or incrementally adopting Compose.
Claude Code
$ npx -y skills add hoangnguyen0403/agent-skills-standard --skill android-compose-migration --agent claude-code
Codex
$ npx skills add hoangnguyen0403/agent-skills-standard --skill android-compose-migration -a codex -y
Cursor
$ npx skills add hoangnguyen0403/agent-skills-standard --skill android-compose-migration -a cursor -y
Gemini CLI
$ npx skills add hoangnguyen0403/agent-skills-standard --skill android-compose-migration -a gemini-cli -y
GitHub Copilot
$ npx skills add hoangnguyen0403/agent-skills-standard --skill android-compose-migration -a github-copilot -y
OpenCode
$ npx skills add hoangnguyen0403/agent-skills-standard --skill android-compose-migration -a opencode -y
Windsurf
$ npx skills add hoangnguyen0403/agent-skills-standard --skill android-compose-migration -a windsurf -y
name: android-compose-migration
description: Migrate an Android XML View to Jetpack Compose following a structured 10-step workflow. Use when converting XML layouts to Compose, setting up Compose in an existing View-based project, or incrementally adopting Compose.
metadata:
triggers:
files:
- 'layout/*.xml'
- '**/*Fragment.kt'
- '**/*Activity.kt'
keywords:
- migrate to compose
- xml to compose
- compose migration
- ComposeView
- AndroidView
- interoperabilityStructured 10-step workflow for migrating XML layouts to Compose.
If the user specified a target XML layout, proceed to Step 2. Otherwise, pick the best candidate:
Examine the XML structure: list all Views, data bindings, click listeners, style references, and custom Views needing `AndroidView` wrappers.
Generate a checklist of every View → Composable mapping. Present to user for approval.
Ask the user for a screenshot, or take one via emulator for visual comparison.
Check `build.gradle.kts` or `libs.versions.toml` for Compose BOM and compiler. If missing, add them. See [dependency setup](references/dependency-setup.md).
If missing, initialize minimum required theme — map XML colors/styles to Compose. Do NOT migrate the entire theme.
Convert each View to its Compose equivalent. See [interop patterns](references/interop-patterns.md) for the View→Composable mapping table, ComposeView, and AndroidView usage. Include a `@Preview` for every new Composable. Use `LazyColumn` or `LazyRow` for list-heavy screens instead of flattening them into one large static composable.
Use `ComposeView` to host Compose in Views, or `AndroidView` for Views in Compose. See [interop patterns](references/interop-patterns.md).
Compare baseline screenshot with Compose Preview. Focus on layout and styling. Iterate until visual parity.
Delete the migrated XML file and legacy tests. Only remove code not referenced elsewhere.
The portable standards layer for AI coding agents. Sync once, then work in your own runtime.
Enforce WCAG 2.2 AA compliance with semantic HTML, ARIA roles, keyboard navigation, and color contrast standards for web UIs. Use…
Define deterministic guardrails for agent tool calls — protected paths, test-file locks during bug fixes, post-edit formatters,…
Apply REST API conventions — HTTP semantics, status codes, versioning, pagination, and OpenAPI standards for any framework. Use…
Audit structural debt, logic leakage, and monolithic components across Web, Mobile, and Backend codebases. Use when reviewing…
Draws architecture diagrams as editable draw.io files with a fixed house style, C4 levels, evidence-tagged shapes, and optional…
Enforce SOLID principles, guard-clause style, function size limits, and intention-revealing naming across all languages. Use when…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.