mapbox-maplibre-migration

Migrate MapLibre GL JS projects to Mapbox GL JS with API and token alignment.

72|14|Updated Jan 29, 2026
One-click install
npx skills add https://github.com/mapbox/mapbox-agent-skills --skill mapbox-maplibre-migration
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mapbox-maplibre-migration
Source: https://github.com/mapbox/mapbox-agent-skills/tree/main/skills/mapbox-maplibre-migration
Command: npx skills add https://github.com/mapbox/mapbox-agent-skills --skill mapbox-maplibre-migration

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers migrate MapLibre GL JS projects to Mapbox GL JS by aligning APIs, tokens, and styles.

Core Features & Use Cases

  • Comprehensive migration guidance: step-by-step instructions to replace maplibre-gl with mapbox-gl, update tokens, and adjust style URLs across Web, iOS, and Android.
  • Cross-platform applicability: applies to web apps using MapLibre, with examples for React, Vue, and vanilla JS, plus mobile integrations.
  • Best practices & risk management: token security, plugin compatibility, and performance considerations to minimize migration risk.

Quick Start

Install dependencies and begin migration with these commands:

  • npm uninstall maplibre-gl
  • npm install mapbox-gl
  • Update imports from maplibregl to mapboxgl
  • Set mapboxgl.accessToken to a public token (pk.*) or environment variable
  • Replace style URLs with Mapbox styles (mapbox://styles/...)

Frequently Asked Questions about mapbox-maplibre-migration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate from MapLibre GL JS to Mapbox GL JS?

To migrate MapLibre to Mapbox, uninstall maplibre-gl, install mapbox-gl, update imports, set mapboxgl.accessToken, and replace style URLs with Mapbox styles. The Skill provides step-by-step guidance for a safe transition.

Does MapLibre to Mapbox migration require updating my access tokens?

Yes, MapLibre to Mapbox migration requires updating tokens. You must set mapboxgl.accessToken to a public token (pk.*) or an environment variable to ensure proper authentication and token security across web projects.

Can I use this migration guide for React, Vue, and mobile cross-platform apps?

Yes, this migration guide applies to React, Vue, vanilla JS web apps, and mobile integrations. It provides cross-platform applicability for switching from MapLibre to Mapbox across iOS and Android environments.

What is the API compatibility level when switching from MapLibre GL JS?

When switching from MapLibre GL JS, the migration ensures 95% API compatibility with Mapbox GL JS. It aligns API usage, token handling, and style configuration to minimize migration risk and ensure a safe transition.

What are the limitations of migrating from MapLibre to Mapbox?

Limitations of migrating from MapLibre to Mapbox include plugin compatibility issues and the need for style modernization. The Skill addresses these constraints by offering best practices for token security and performance considerations.