mapbox
Build map-based applications with the Mapbox GL JS SDK. Use when a user asks to create interactive maps, add custom layers, implement geocoding, build navigation features, or visualize geospatial data with Mapbox.
What this skill does
# Mapbox โ Custom Interactive Maps
## Overview
You are an expert in Mapbox, the platform for custom interactive maps, geocoding, navigation, and geospatial data visualization. You help developers build location-aware applications with custom map styles, markers, layers, 3D terrain, route planning, and real-time location tracking using Mapbox GL JS and the Mapbox APIs.
## Instructions
### Basic Map
```typescript
// React integration with react-map-gl
import Map, { Marker, Popup, NavigationControl, Source, Layer } from "react-map-gl";
import "mapbox-gl/dist/mapbox-gl.css";
function StoreLocator() {
const [selectedStore, setSelectedStore] = useState(null);
return (
<Map
mapboxAccessToken={process.env.NEXT_PUBLIC_MAPBOX_TOKEN}
initialViewState={{ longitude: -73.98, latitude: 40.75, zoom: 12 }}
style={{ width: "100%", height: "100vh" }}
mapStyle="mapbox://styles/mapbox/light-v11"
>
<NavigationControl position="top-right" />
{stores.map((store) => (
<Marker
key={store.id}
longitude={store.lng}
latitude={store.lat}
onClick={() => setSelectedStore(store)}
>
<div className="store-pin">๐</div>
</Marker>
))}
{selectedStore && (
<Popup
longitude={selectedStore.lng}
latitude={selectedStore.lat}
onClose={() => setSelectedStore(null)}
>
<h3>{selectedStore.name}</h3>
<p>{selectedStore.address}</p>
<p>Open: {selectedStore.hours}</p>
</Popup>
)}
</Map>
);
}
```
### Data Layers
```typescript
// Heatmap layer for density visualization
function DeliveryHeatmap({ deliveries }) {
const geojson = {
type: "FeatureCollection",
features: deliveries.map((d) => ({
type: "Feature",
geometry: { type: "Point", coordinates: [d.lng, d.lat] },
properties: { weight: d.orderCount },
})),
};
return (
<Map mapboxAccessToken={TOKEN} mapStyle="mapbox://styles/mapbox/dark-v11"
initialViewState={{ longitude: -73.98, latitude: 40.75, zoom: 11 }}>
<Source type="geojson" data={geojson}>
<Layer
type="heatmap"
paint={{
"heatmap-weight": ["get", "weight"],
"heatmap-intensity": ["interpolate", ["linear"], ["zoom"], 0, 1, 15, 3],
"heatmap-radius": ["interpolate", ["linear"], ["zoom"], 0, 5, 15, 30],
"heatmap-color": [
"interpolate", ["linear"], ["heatmap-density"],
0, "rgba(0,0,255,0)", 0.2, "blue", 0.4, "cyan",
0.6, "lime", 0.8, "yellow", 1, "red",
],
}}
/>
</Source>
</Map>
);
}
```
### Geocoding and Directions
```typescript
// Geocoding API โ address to coordinates
const geocode = async (address: string) => {
const res = await fetch(
`https://api.mapbox.com/geocoding/v5/mapbox.places/${encodeURIComponent(address)}.json?access_token=${TOKEN}`
);
const data = await res.json();
const [lng, lat] = data.features[0].center;
return { lng, lat, place_name: data.features[0].place_name };
};
// Directions API โ route between two points
const getRoute = async (start: [number, number], end: [number, number]) => {
const res = await fetch(
`https://api.mapbox.com/directions/v5/mapbox/driving/${start.join(",")};${end.join(",")}?geometries=geojson&access_token=${TOKEN}`
);
const data = await res.json();
return {
route: data.routes[0].geometry, // GeoJSON LineString
duration: data.routes[0].duration, // seconds
distance: data.routes[0].distance, // meters
};
};
```
## Installation
```bash
npm install mapbox-gl react-map-gl
# Get access token at https://account.mapbox.com/
```
## Examples
**Example 1: User asks to set up mapbox**
User: "Help me set up mapbox for my project"
The agent should:
1. Check system requirements and prerequisites
2. Install or configure mapbox
3. Set up initial project structure
4. Verify the setup works correctly
**Example 2: User asks to build a feature with mapbox**
User: "Create a dashboard using mapbox"
The agent should:
1. Scaffold the component or configuration
2. Connect to the appropriate data source
3. Implement the requested feature
4. Test and validate the output
## Guidelines
1. **Custom map styles** โ Use Mapbox Studio to create branded map styles; match your app's design language
2. **Clustering for markers** โ Use `cluster` property on GeoJSON sources when displaying 100+ points; prevents visual clutter
3. **react-map-gl for React** โ Use the official React wrapper; it handles lifecycle, state sync, and TypeScript types
4. **Lazy load maps** โ Maps are heavy (~200KB); lazy load the map component; show a placeholder during load
5. **Tile-based layers** โ For large datasets (10K+ points), use vector tiles instead of GeoJSON; much better performance
6. **Geocoding with autocomplete** โ Use the Geocoding API with the `autocomplete=true` parameter for search-as-you-type address input
7. **3D terrain** โ Enable terrain with `map.setTerrain({ source: "mapbox-dem" })` for topographic visualizations
8. **Rate limits** โ Mapbox has generous free tiers (50K loads/month for GL JS); monitor usage to avoid surprise bills
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only โ no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.