mapbox-android-compose-migration
БесплатноБез исполняемых скриптовНе проверенMove Android Mapbox map and navigation screens from the View system (XML MapView, AndroidView-wrapped MapView, fragments) to Jetpack Compose with a coding…
от mapbox★ 90 звёзд на GitHubОб этом скилле
Mapbox Android Screens → Jetpack Compose
Moves Android map and navigation screens built on the View system to Jetpack Compose. The agent does the work. The developer makes the decisions.
This skill covers only what's specific to Mapbox. Google's migrate XML views to Jetpack Compose skill covers the rest of the screen (layouts, theming, other views, Compose setup). Use both: Google's skill for the screen, this one for the map.
Reference files:
references/maps.md: View → Compose mappings for Maps SDK v11 (map view, camera, style, annotations, events, interactions, location, ornaments, lifecycle)references/navigation.md: running Navigation SDK v3 on aMapboxMapcomposable (lifecycle, route line, camera, puck, observers, View-based UI components)references/migration-workflow.md: templates for the inventory, plan, decision log and summary
Load maps.md for every migration. Also load navigation.md when the screen uses the Navigation SDK.
When to use
- The app shows a Mapbox map in an XML layout, a fragment, or
AndroidView { MapView(...) }, and the developer wants that screen in Compose - The developer asks "how much work is it to move our map screens to Compose?". Run steps 1 and 2 only and stop.
- A map screen broke after moving to Compose (blank map, map reloads on recomposition, listeners firing twice,
PluginDisabledException) - The Maps v10 → v11 or Navigation v2 → v3 migration skill recommended Compose as the next step
Not covered:
- Apps on Maps SDK v10 or Navigation SDK v2. Migrate first with
mapbox-android-maps-v10-to-v11-migrationormapbox-android-navigation-v2-to-v3-migration. Never combine an SDK version migration and a Compose migration in one change. - The non-map parts of the screen. Use Google's skill.
- Changing the map style, moving to Mapbox Standard, or turning on other data products
- Flutter and React Native
- Navigation SDK for iOS, or the drop-in
NavigationView(removed in Navigation SDK v3)
Rules
These rules apply to every step.
1. Requirements
- Maps SDK 11.6.0 or later. The Compose extension became stable in 11.6.0. Earlier releases marked it experimental and had different signatures.
- The extension artifact is
com.mapbox.extension:maps-compose, at the same version ascom.mapbox.maps:android. Other group IDs (com.mapbox.maps:compose,com.mapbox.maps:maps-compose) don't exist. - Use the app's current Maps version. If a target API in
references/maps.mdneeds a newer one, use the row's fallback, or propose a Maps bump as a separate change. Don't bump the SDK silently as part of this migration.
2. No silent behavior change
Moving to Compose can change what the user sees even when the code compiles. Examples: the composable loads Standard when the style slot is left at its default, the ornaments render as Compose with their own defaults, and the camera now survives configuration changes. references/maps.md has a Behavior changes table. For every row that applies:
- Present it as a decision. Say what the View screen did, what Compose does by default, and the options.
- Default to matching the View screen if the developer doesn't answer, and say so.
- Record it in the decision log (
references/migration-workflow.md).
3. Keep the style and data products
Carry the screen's style over exactly: the same style URI or JSON, the same imports and config, the same runtime layers. A View screen that never set a style loaded Standard, and so does the composable, so leave it. Don't move a screen to Standard or change tilesets as part of the migration.
4. Declarative where it exists, MapEffect where it doesn't
Use the Compose API when references/maps.md lists one: MapboxMap parameters, MapViewportState, MapState, the style slot, source and layer composables, annotation composables, ViewAnnotation. Use MapEffect or DisposableMapEffect only for what has no Compose API (location puck settings, custom location providers, Navigation SDK glue, debug options, custom layers). Don't wrap a whole View-era setup function in one MapEffect and call it migrated.
MapEffect rules:
- Key it on what the effect actually depends on, usually
Unit. Don't key it on state that changes often. Each change cancels and reruns the block. - Use
DisposableMapEffectwhen the block registers listeners or observers, and unregister them inonDispose - Don't create long-lived objects (route line views, annotation managers, APIs with
cancel()) inside aMapEffectthat can rerun
5. Grounding
Only use symbols from the references, the official Compose guide, or the SDK source and docs for the app's version. If you're unsure whether a symbol exists or has the stated signature, don't invent one. Write the closest
Установить mapbox-android-compose-migration в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл mapbox-android-compose-migration?
Move Android Mapbox map and navigation screens from the View system (XML MapView, AndroidView-wrapped MapView, fragments) to Jetpack Compose with a coding agent. Covers the Mapbox parts of the screen (MapboxMap composable, viewport state, style and annotation composables, MapEffect, lifecycle, Navigation SDK v3 wiring) and leaves the rest of the screen to Google's XML-to-Compose skill. Keeps the map looking and behaving the same, one screen at a time. Use when migrating a Mapbox screen to Compose, planning that work, or fixing a map that broke after moving to Compose.
Как установить скилл mapbox-android-compose-migration?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл mapbox-android-compose-migration запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic