1{2 "skill_name": "mapbox-android-patterns",3 "evals": [4 {5 "id": 1,6 "prompt": "I'm setting up the Mapbox Maps SDK in my Android app. How do I add the dependency and configure the access token?",7 "expectations": [8 "Must add the Mapbox Maven repository in settings.gradle.kts: url = uri(\"https://api.mapbox.com/downloads/v2/releases/maven\")",9 "Add the dependency: implementation(\"com.mapbox.maps:android:11.x.x
10 "Token goes in a resources file app/res/values/mapbox_access_token.xml with the string resource name mapbox_access_token",
11 "Shows the correct XML: <string name=\"mapbox_access_token\">YOUR_TOKEN</string>"
12 ]
13 },
14 {
15 "id": 2,
16 "prompt": "My Android app creates a new `PointAnnotationManager` inside my `refreshMarkers()` method that gets called on every data update. Performance is noticeably poor. What should I change?",
17 "expectations": [
18 "Creating annotation managers repeatedly is the problem — each call reinitializes resources",
19 "Create the PointAnnotationManager once (e.g., in onCreate or a setup method) and reuse it",
21 "Recommends batch updates: set all annotations at once rather than appending individually"
22 ]
23 },
24 {
25 "id": 3,
26 "prompt": "I'm using the Mapbox Standard style on Android and want to handle user taps on buildings. When a user taps a building, I want to highlight it. How do I implement this?",
27 "expectations": [
28 "Use ClickInteraction.standardBuildings { building, context -> ... } — the modern Interactions API for Standard style featuresets",
30 "To highlight, use setFeatureState on the building: mapView.mapboxMap.setFeatureState(building, StandardBuildingsState { highlight(true) })",
31 "Notes that returning true from the lambda stops propagation to other interactions"
32 ]
33 },
34 {
35 "id": 4,
36 "prompt": "Add a Mapbox map to my Android Jetpack Compose project. I need the correct dependencies and a basic MapboxMap composable.",
37 "expectations": [
38 "Compose extension dependency uses group com.mapbox.extension, not com.mapbox.maps: implementation(\"com.mapbox.extension:maps-compose:11.x.x\")",
39 "Must NOT use com.mapbox.maps:compose, com.mapbox.maps:extension-compose, or com.mapbox.maps:android-compose",
40 "Both maps SDK and compose extension must use the same version",
41 "Uses MapboxMap composable from com.mapbox.maps.extension.compose, not AndroidView wrapping MapView"
42 ]
43 },
44 {
45 "id": 5,
46 "prompt": "I need to set the Mapbox access token programmatically in my Compose app before the map loads. What's the correct import and call?",
47 "expectations": [
48 "Import is from com.mapbox.common.MapboxOptions, NOT com.mapbox.maps.MapboxOptions",
49 "Call MapboxOptions.accessToken = \"pk.your_token\" before any map component is created",
50 "Recommends mapbox_access_token string resource as the preferred alternative",
51 "Must NOT use manifest <meta-data> placeholders with ${MAPBOX_ACCESS_TOKEN}"
52 ]
53 },
54 {
55 "id": 6,
56 "prompt": "I want to add tappable point markers to my Mapbox Compose map. When a marker is tapped, I need to know which one was clicked. Show me the correct pattern.",
57 "expectations": [
58 "Uses PointAnnotation composable from com.mapbox.maps.extension.compose.annotation.generated",
59 "Uses interactionsState.onClicked { ... } inside the init lambda for tap handling, NOT the deprecated onClick parameter",
60 "Uses rememberIconImage(R.drawable.ic_marker) for the marker icon, not BitmapFactory",
61 "PointAnnotation renders nothing without iconImage — must always set it"