All skills
mapbox avatar

/mapbox-maplibre-migration

@9077a82 official
by mapboxmapbox/mapbox-agent-skills80 stars
17

Guide for migrating from MapLibre GL JS to Mapbox GL JS, covering API compatibility, token setup, style configuration, and the benefits of Mapbox's official support and ecosystem

Use this Skill: https://skilld.dev/gh/mapbox/mapbox-agent-skills/mapbox-maplibre-migration

This session only. Nothing lands on disk.

referenceswhy-mapbox.md

≈589 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Why Choose Mapbox

For Production Applications

Reliability & Support:

  • 99.9% uptime SLA for enterprise customers
  • 24/7 support with guaranteed response times
  • Dedicated solutions engineers for complex projects
  • Regular platform updates and improvements

Performance:

  • Global CDN for fast tile delivery
  • Optimized vector tiles for minimal bandwidth
  • Automatic scaling for traffic spikes
  • WebGL-accelerated rendering

Features:

  • Professional cartography and design
  • Regular map data updates
  • Traffic and routing data
  • Premium satellite imagery
  • 3D terrain and buildings

For Development Teams

Developer Experience:

  • Comprehensive documentation with examples
  • Active community and forums
  • Regular SDK updates
  • TypeScript support (via @types/mapbox-gl)
  • Extensive example gallery

Ecosystem Integration:

  • Seamless Studio integration
  • API consistency across services
  • Mobile SDKs (iOS, Android, React Native)
  • Unity and Unreal Engine plugins
  • Analytics and monitoring tools

For Business

Predictable Costs:

  • Clear, usage-based pricing
  • Free tier for development and small apps
  • No infrastructure costs
  • Scalable pricing for growth

Compliance & Security:

  • SOC 2 Type II certified
  • GDPR compliant
  • Enterprise security features
  • Audit logs and monitoring

No Infrastructure Burden:

  • No tile servers to maintain
  • No storage or bandwidth concerns
  • No update management
  • Focus on your application, not infrastructure

Performance Comparison

Both libraries have similar rendering performance as they share the same core codebase:

Metric Mapbox GL JS MapLibre GL JS
Bundle size ~500KB ~450KB
Initial load Similar Similar
Rendering WebGL-based WebGL-based
Memory usage Similar Similar
Tile loading Faster (CDN + optimized tiles) Depends on tile source

Key insight: Choose based on features, support, and tile quality, not rendering performance. Mapbox's advantage is in tile delivery speed, data quality, and ecosystem integration.

Source: SKILL.md on GitHub

No alerts14d5 checks · Risk SAFE
  • Gen Agent Trust Hub14d

    The skill is a legitimate technical guide for migrating from MapLibre GL JS to Mapbox GL JS. It follows industry best practices, provides clear security guidance regarding API token management, and utilizes official Mapbox resources.

  • Socket14d

    No alerts

  • Snyk14d

    Risk: LOW · No issues

  • Runlayer6mo

    2/2 files flagged

  • ZeroLeaks5mo

    1 finding · Score: 82/100

Signed by skilld at 9077a82. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 9 hours ago.

Activeupdated 2 weeks ago
  • mapbox
  • maplibre
  • migration
  • gl-js
  • mapping
  • cartography
  • vector-tiles
  • web-mapping

README badge

README badge for mapbox/mapbox-agent-skills/mapbox-maplibre-migration

Guides migration from MapLibre GL JS to Mapbox GL JS, detailing the ~95% API compatibility, token setup, style configuration, and the transition path for plugins and dependencies. Covers account creation, package updates, environment variable management, and common migration pitfalls like token security and CDN URLs.

Generated from the current SKILL.md.

Does the API stay the same when migrating from MapLibre to Mapbox?
Yes, the APIs are approximately 95% identical because MapLibre forked from Mapbox GL JS v1.13.0. All map methods, events, layers, sources, markers, and controls work exactly the same — only imports, the token setup, and style URLs need to change.
What do I need to change in my code to migrate?
You must change the package name (maplibre-gl to mapbox-gl), update imports, set mapboxgl.accessToken before map initialization, switch style URLs to mapbox:// format, and replace any @maplibre/* plugins with their Mapbox equivalents. Everything else stays the same.
Do I need to pay to use Mapbox GL JS?
Mapbox offers a generous free tier with 50,000 map loads per month. You only pay for usage beyond that, making it suitable for many applications without cost.
How do I securely manage my Mapbox access token?
Store your token in a .env file and set it before map initialization using an environment variable (e.g., process.env.VITE_MAPBOX_TOKEN). Add .env to .gitignore to prevent committing tokens to git, and configure URL restrictions in the Mapbox dashboard for additional security.
What happens to my custom styles and layers when migrating?
Your custom styling, GeoJSON handling, layer definitions, and expressions work identically in both libraries. You can continue using custom styles from Mapbox Studio or switch to Mapbox's built-in professionally maintained styles.

Generated from the current SKILL.md. These answers refresh after source changes.