/mapbox:mapbox-android-compose-migrationfrom mapbox
Migrates Android Mapbox map and navigation screens from View system (XML MapView, fragments) to Jetpack Compose using Maps SDK v11.6+ and Navigation SDK v3. Covers MapboxMap composable, viewport state, annotations, MapEffect, lifecycle wiring.
Ships in mapbox. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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 a MapboxMap composable (lifecycle, route line, camera, puck, observers, View-based UI components)references/migration-workflow.md: templates for the inventory, plan, decision log and summaryLoad maps.md for every migration. Also load navigation.md when the screen uses the Navigation SDK.
AndroidView { MapView(...) }, and the developer wants that screen in ComposePluginDisabledException)Not covered:
mapbox-android-maps-v10-to-v11-migration or mapbox-android-navigation-v2-to-v3-migration. Never combine an SDK version migration and a Compose migration in one change.NavigationView (removed in Navigation SDK v3)These rules apply to every step.
com.mapbox.extension:maps-compose, at the same version as com.mapbox.maps:android. Other group IDs (com.mapbox.maps:compose, com.mapbox.maps:maps-compose) don't exist.references/maps.md needs 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.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:
references/migration-workflow.md).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.
MapEffect where it doesn'tUse 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:
Unit. Don't key it on state that changes often. Each change cancels and reruns the block.DisposableMapEffect when the block registers listeners or observers, and unregister them in onDisposecancel()) inside a MapEffect that can rerunOnly 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 match, add // [VERIFY WITH MAPBOX] at the call site, and list it in the report. Entries marked experimental need @OptIn(MapboxExperimental::class). Tell the developer before introducing one.
Migrate one map screen per change. Leaving other screens on the View system, or keeping a View MapView while the rest of the app moves to Compose, is a valid end state. Don't migrate screens the developer didn't pick.
Run the workflow below when you have the project and the developer asks you to migrate or plan. When the developer describes a screen or pastes code in chat, answer directly instead of filling in the templates:
MapboxMap call, its effects and the hosted views), with // ... for bodies that don't change, then short bullets for the rules behind it. Don't restate code the developer already has.Run the five steps in order. Don't edit code before step 2 is done and shown to the developer.
For each map screen, record:
MapView, MapView(context) in code, AndroidView { MapView(...) }) and its host (Activity, Fragment, existing composable)MapView (camera, style, ornaments, gestures, mapbox_mapSurface)references/maps.md (and references/navigation.md for navigation screens)mapView.onStart(), onStop(), onDestroy(), onLowMemory())MapboxManeuverView, MapboxTripProgressView and the others listed in references/navigation.md)Check the Maps (and Navigation) SDK version against Rule 1.
If the app can run on an emulator or device, offer to take before screenshots of the map screens now. Note the device, camera position and app state so the after screenshot repeats them. Compose Previews don't render a live map, so device screenshots are the only visual check for the map itself.
Suggest the order. Start with the simplest screen (one map, few annotations, no navigation) to establish the pattern. For each screen, list per area: the call sites, the Compose target, effort (S < 1h, M = half a day, L = 1-2 days, XL = more, or blocked), and blockers. List every row from the Behavior changes table that applies as a decision. Use the plan template in references/migration-workflow.md.
Every plan also states:
The plan on its own answers "how much work is this?". If that was the question, stop here.
MapboxMap call: style slot, rememberMapViewportState for the initial camera, ornament slots, click listeners. Follow references/maps.md.references/maps.md).references/navigation.md for the lifecycle, route line, camera and pucksetContent, ComposeView in a fragment, or the navigation graph destination) as Google's skill describes./gradlew assembleDebug or the app's variant) and fix errors before moving to the next screenmapView.onStart/onStop/onDestroy/onLowMemory calls remain for this screenmapView.compass, mapView.logo, mapView.attribution, mapView.scalebar, mapView.indoorSelector or lifecycle-plugin calls in MapEffect (they throw PluginDisabledException from 11.35)[VERIFY WITH MAPBOX] tag is listedIf you can't run the app, say so in the report. Don't claim it was checked.
Write the summary from references/migration-workflow.md: screens migrated and remaining, decisions taken, [VERIFY WITH MAPBOX] items, experimental APIs introduced, and pre-existing issues seen but not fixed (for example a style reload to switch themes, or a camera move on every location update). If an audit skill is installed (for example mapbox-mobile-sdk-audit), recommend running it on the migrated screens.
| View system | Compose |
|---|---|
<com.mapbox.maps.MapView> in XML | MapboxMap(...) composable |
mapbox_styleUri / loadStyle(...) | style = { MapStyle(style = ...) } or { MapboxStandardStyle() } |
XML camera attributes / setCamera(...) | rememberMapViewportState { setCameraOptions { ... } } |
mapView.camera.flyTo(...) | mapViewportState.flyTo(...) |
viewport.transitionTo(followPuckState) | mapViewportState.transitionToFollowPuckState() |
addOnMapClickListener | MapboxMap(onMapClickListener = ...) |
subscribeCameraChanged / subscribeMapIdle | mapState.cameraChangedEvents / mapState.mapIdleEvents flows |
PointAnnotationManager with many annotations | PointAnnotationGroup(annotations = ...) |
| Single annotation + click listener | PointAnnotation(point) { iconImage = ...; interactionsState.onClicked {} } |
addInteraction(ClickInteraction.standardPoi {}) | standardStyleState.interactionsState.onPoiClicked {} |
mapView.location.updateSettings { ... } | Same call inside MapEffect(Unit) |
mapView.compass.updateSettings { ... } | compass = { Compass(alignment = ...) } slot |
mapView.onStart() / onStop() / onDestroy() | Delete. The composable handles lifecycle. |
| Navigation route line, camera, puck | DisposableMapEffect(Unit) with the same Navigation APIs |
MapboxManeuverView, MapboxTripProgressView | Host in AndroidView, or rebuild in Compose |
mapbox-android-patterns: building Maps features on Android, including Composemapbox-navigation-patterns: building navigation featuresmapbox-android-maps-v10-to-v11-migration, mapbox-android-navigation-v2-to-v3-migration: run these first on older SDKsWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub mapbox/mapbox-agent-skills --plugin mapbox27 skills in this plugin
/mapbox-android-maps-v10-to-v11-migrationMigrate an Android app from Mapbox Maps SDK v10 to v11 with a coding agent. Inventories v10 usage, plans the work by area with effort and blockers, migrates one area at a time to the current recommended v11 APIs (Featureset Interactions, Feature State, typed events), surfaces behavior changes as developer decisions, keeps the app's style, and reports what changed. Covers Kotlin, Java, Views and Jetpack Compose. Use when upgrading Maps SDK v10 on Android, estimating a v10 to v11 migration, or fixing a build after bumping to v11./mapbox-android-navigation-v2-to-v3-migrationMigrate an Android app from Mapbox Navigation SDK v2 to v3 with a coding agent. Inventories v2 usage, plans the work by area with effort and blockers, migrates one area at a time, and surfaces every behavior change (reroute control, arrival, alternatives switching) as a developer decision. Maps each v2 hook the app uses for its own telemetry to its v3 source or says it is gone. Replaces the removed Drop-in UI by copying the public v2 Drop-in sources into the app, or with the UX Framework or the v3 UI components. Covers the build toolchain upgrade. Hands map-layer changes to mapbox-android-maps-v10-to-v11-migration. Use when upgrading Navigation SDK v2 on Android, estimating a v2 to v3 migration, or fixing a build after bumping to v3.Other plugins' skills for the same job