mapbox-web-performance-patterns
Skill by mapbox
Provides performance optimization patterns for Mapbox GL JS web applications, covering load waterfalls, bundle size, marker rendering, and memory cleanup. Intended for developers building map apps with Mapbox GL JS.
Install mapbox-web-performance-patterns
Built from the published package, never by AI.
git clone --depth 1 https://github.com/mapbox/mapbox-agent-skills /tmp/mapbox-agent-skills && mkdir -p ~/.claude/skills && cp -r /tmp/mapbox-agent-skills/skills/mapbox-web-performance-patterns ~/.claude/skills/mapbox-web-performance-patternsRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install mapbox-web-performance-patterns in Claude Code
git clone --depth 1 https://github.com/mapbox/mapbox-agent-skills /tmp/mapbox-agent-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/mapbox-agent-skills/skills/mapbox-web-performance-patterns ~/.gemini/antigravity-cli/skills/mapbox-web-performance-patternsAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install mapbox-web-performance-patterns in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
The mapbox-web-performance-patterns skill gives an AI assistant performance guidance for Mapbox GL JS web applications. It covers initialization waterfalls, bundle size, rendering performance, memory management, and web optimization. Patterns are grouped as critical, high impact, or optimization, based on their effect on user experience.
Each pattern includes a problem statement, a bad and good code example, and an expected impact. Examples include loading data in parallel with map initialization, using symbol layers instead of HTML markers for larger marker counts, and clustering dense point sets. The skill also points to reference files for data loading, interactions, memory, mobile, and layer styling. It is aimed at developers building Mapbox GL JS applications.
Written from the project's SKILL.md and checked against it.
What it can do
- Parallel data loadingStarts data fetches alongside map initialization instead of waiting for the map load event.
- Precise initial viewportSets center and zoom upfront so the map requests the right tiles immediately.
- Deferred featuresDelays terrain, custom 3D layers, and analytics until after the critical layers load.
- Hosted style referencesUses Mapbox-hosted style URLs instead of inlining large style JSON in the bundle.
- Symbol layers for markersReplaces many HTML markers with GeoJSON symbol layers and one shared click handler.
- ClusteringGroups dense point data into clusters at low zoom levels with count labels.
- Cleanup and error handlingCovers calling map.remove() on teardown and attaching map error handlers.
- Performance measurementShows how to time map load, count frames per second, and check memory in DevTools.
What you need
- Mapbox access token
- Mapbox GL JS web application
Try asking
- Review my Mapbox GL JS map code for initialization waterfalls and slow loads
- Convert my 5,000 HTML markers into a symbol layer with clustering
- Add map.remove() cleanup and error handling to my single page app map
Good to know
- Thresholds and performance targets are guidance, not guaranteed results.
- Modern bundlers already handle much of the code splitting, so some advice may be redundant.
- Patterns are written for Mapbox GL JS and its APIs.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/mapbox-web-performance-patterns/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to mapbox-web-performance-patterns
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
mapbox-web-performance-patterns: common questions
Does this skill fix Mapbox performance problems automatically?
The source presents patterns and a checklist for developers to apply. It does not describe automatic fixes.
When should I use symbol layers instead of HTML markers?
The source suggests HTML markers for under 100 markers and symbol layers for 100 to 10,000. It recommends clustering at 10,000 and above.
Do bundlers already split Mapbox code automatically?
The source says modern bundlers like Vite and Webpack handle code splitting for framework-based apps. The guidance therefore focuses on what gets bundled and when.
How do I install mapbox-web-performance-patterns?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is mapbox-web-performance-patterns free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is mapbox-web-performance-patterns safe to use?
It scores 74 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to mapbox-web-performance-patterns?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
