mapbox avatar

Mapbox Web Performance Patterns

Solid performance guidance for Mapbox GL JS that actually prioritizes what matters. Starts with the big wins: killing initialization waterfalls by fetching data in parallel with map setup, keeping bundles lean by hosting styles externally instead of inlining them, and switching from thousands of HTML markers to GPU-accelerated symbol layers. The clustering patterns are especially practical, with clear thresholds for when to use what (HTML markers under 100, symbol layers up to 10K, clustering beyond that). These aren't micro-optimizations, they're the difference between a map that loads in a second versus three, and one that pans smoothly versus stuttering at 20 FPS.

skills.sh installs
2.5K
GitHub stars
86
last updated
Aug 21, 2026

Install

$ npx -y skills add mapbox/mapbox-agent-skills --skill mapbox-web-performance-patterns --agent claude-code

Installs into .claude/skills of the current project.

Files

Mapbox Performance Patterns Skill

This skill provides performance optimization guidance for building fast, efficient Mapbox applications. Patterns are prioritized by impact on user experience, starting with the most critical improvements.

Performance philosophy: These aren't micro-optimizations. They show up as waiting time, jank, and repeat costs that hit every user session.

Priority Levels

Performance issues are prioritized by their impact on user experience:

  • 🔴 Critical (Fix First): Directly causes slow initial load or visible jank
  • 🟡 High Impact: Noticeable delays or increased resource usage
  • 🟢 Optimization: Incremental improvements for polish

🔴 Critical: Eliminate Initialization Waterfalls

Problem: Sequential loading creates cascading delays where each resource waits for the previous one.

Note: Modern bundlers (Vite, Webpack, etc.) and ESM dynamic imports automatically handle code splitting and library loading. The primary waterfall to eliminate is data loading - fetching map data sequentially instead of in parallel with map initialization.

Anti-Pattern: Sequential Data Loading

Sponsors

Details

Repository
github.com/mapbox/mapbox-agent-skills
Categories
AI & Agent Building, Debugging
First seen
Apr 16, 2026

More from mapbox/mapbox-agent-skills

All 18
1apify avatarapify-content-analyticsapify/agent-skillsTrack engagement metrics, measure campaign ROI, and analyze content performance across Instagram, Facebook, YouTube, and TikTok.2.5Kskills.sh installs
2avdlee avatarcore-data-expertavdlee/core-data-agent-skillExpert Core Data guidance (iOS/macOS): stack setup, fetch requests & NSFetchedResultsController, saving/merge conflicts, threading & Swift Concurrency, batch op2.5Kskills.sh installs
3k-dense-ai avatarscientific-critical-thinkingk-dense-ai/scientific-agent-skillsEvaluate scientific claims and evidence quality. Use for assessing experimental design validity, identifying biases and confounders, applying evidence grading f2.5Kskills.sh installs
4apify avatarapify-brand-reputation-monitoringapify/agent-skillsTrack reviews, ratings, sentiment, and brand mentions across Google Maps, Booking.com, TripAdvisor, Facebook, Instagram, YouTube, and TikTok. Use when user asks2.5Kskills.sh installs
5ailabs-393 avatarfinance-managerailabs-393/ai-labs-claude-skillsComprehensive personal finance management system for analyzing transaction data, generating insights, creating visualizations, and providing actionable financia2.5Kskills.sh installs
6launchdarkly avatarlaunchdarkly-flag-cleanuplaunchdarkly/agent-skillslaunchdarkly flag cleanup2.5Kskills.sh installs