mapbox-geospatial-operations

mapbox/mapbox-agent-skills · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/mapbox/mapbox-agent-skills --skill mapbox-geospatial-operations
0 commentsdiscussion
summary

Expert guidance for AI assistants on choosing the right geospatial tools from the Mapbox MCP Server. Focuses on selecting tools based on what the problem requires - geometric calculations vs routing, straight-line vs road network, and accuracy needs.

skill.md

Mapbox Geospatial Operations Skill

Expert guidance for AI assistants on choosing the right geospatial tools from the Mapbox MCP Server. Focuses on selecting tools based on what the problem requires - geometric calculations vs routing, straight-line vs road network, and accuracy needs.

Core Principle: Problem Type Determines Tool Choice

The Mapbox MCP Server provides two categories of geospatial tools:

  1. Offline Geometric Tools - Use Turf.js for pure geometric/spatial calculations
  2. Routing & Navigation APIs - Use Mapbox APIs when you need real-world routing, traffic, or travel times

The key question: What does the problem actually require?

Decision Framework

Problem Characteristic Tool Category Why
Straight-line distance (as the crow flies) Offline geometric Accurate for geometric distance
Road/path distance (as the crow drives) Routing API Only routing APIs know road networks
Travel time Routing API Requires routing with speed/traffic data
Point containment (is X inside Y?) Offline geometric Pure geometric operation
Geographic shapes (buffers, centroids, areas) Offline geometric Mathematical/geometric operations
Traffic-aware routing Routing API Requires real-time traffic data
Route optimization (best order to visit) Routing API Complex routing algorithm
High-frequency checks (e.g., real-time geofencing) Offline geometric Instant response, no latency

Decision Matrices by Use Case

Distance Calculations

User asks: "How far is X from Y?"

What They Actually Mean Tool Choice Why
Straight-line distance (as the crow flies) distance_tool Accurate for geometric distance, instant
Driving distance (as the crow drives) directions_tool Only routing knows actual road distance
Walking/cycling distance (as the crow walks/bikes) directions_tool Need specific path network
Travel time directions_tool or matrix_tool Requires routing with speed data
Distance with current traffic directions_tool (driving-traffic) Need real-time traffic consideration

Example: "What's the distance between these 5 warehouses?"

  • As the crow flies → distance_tool (10 calculations, instant)
  • As the crow drives → matrix_tool (5×5 matrix, one API call, returns actual route distances)

Key insight: Use the tool that matches what "distance" means in context. Always clarify: crow flies or crow drives?

Proximity and Containment

User asks: "Which points are near/inside this area?"

Query Type Tool Choice Why
"Within X meters radius" distance_tool + filter Simple geometric radius
"Within X minutes drive" isochrone_toolpoint_in_polygon_tool Need routing for travel-time zone, then geometric containment
"Inside this polygon" point_in_polygon_tool Pure geometric containment test
"Reachable by car in 30 min" isochrone_tool Requires routing + traffic
"Nearest to this point" distance_tool (geometric) or matrix_tool (routed) Depends on definition of "nearest"

Example: "Are these 200 addresses in our 30-minute delivery zone?"

  1. Create zone → isochrone_tool (routing API - need travel time)
  2. Check addresses → point_in_polygon_tool (geometric - 200 instant checks)

Key insight: Routing for creating travel-time zones, geometric for containment checks

Routing and Navigation

User asks: "What's the best route?"

Scenario Tool Choice Why
A to B directions directions_tool Turn-by-turn routing
Optimal order for multiple stops optimization_tool Solves traveling salesman problem
Clean GPS trace map_matching_tool Snaps to road network
Just need bearing/compass direction bearing_tool Simple geometric calculation
Route with traffic directions_tool (driving-traffic) Real-time traffic awareness
Fixed-order waypoints directions_tool with waypoints Routing through specific points

Example: "Navigate from hotel to airport"

  • Need turn-by-turn → directions_tool
  • Just need to know "it's northeast" → bearing_tool

Key insight: Routing tools for actual navigation, geometric tools for directional info

Area and Shape Operations

User asks: "Create a zone around this location"

Requirement Tool Choice Why
Simple circular buffer buffer_tool Geometric circle/radius
Travel-time zone isochrone_tool Based on routing network
Calculate area size area_tool Geometric calculation
Simplify complex boundary simplify_tool Geometric simplification
Find center of shape centroid_tool Geometric centroid

Example: "Show 5km coverage around each store"

  • 5km radius → buffer_tool (geometric circles)
  • "What customers can reach in 15 min?" → isochrone_tool (routing-based)

Key insight: Geometric tools for distance-based zones, routing tools for time-based zones

Performance and Scale Considerations

When Volume Affects Tool Choice

Small operations (< 100 calculations):

  • Geometric tools: Instant, iterate freely
  • Routing APIs: Fast enough for most uses

Medium operations (100-1,000 calculations):

  • Geometric tools: Still fast, no concerns
  • Routing APIs: Consider batch operations (matrix_tool)

Large operations (> 1,000 calculations):

  • Geometric tools: May need optimization but still fast
  • Routing APIs: Definitely use batch tools (matrix_tool handles up to 25×25)

Key insight: Volume rarely affects geometric tool choice, but routing APIs have batch tools for efficiency

Real-Time vs Batch

Use Case Approach Tool Choice
Real-time geofencing (every second) Geometric checks point_in_polygon_tool (instant)
Route planning (one-time) Full routing directions_tool or optimization_tool
Periodic proximity checks Geometric distance distance_tool
Live traffic routing Routing with traffic directions_tool (driving-traffic)

Architecture note for high-frequency geofencing: If the application calls containment checks at very high rates (e.g., 50 vehicles every 2 seconds = 25 checks/second), calling MCP tools over the network adds agent-reasoning overhead that makes it impractical. In those cases, recommend using Turf.js directly in-process (turf.booleanPointInPolygon) for the hot path, and reserve MCP tools for peripheral tasks like zone definition (isochrone_tool), rerouting (directions_tool), or visualization (static_map_image_tool).

Common Scenarios and Optimal Approaches

Scenario 1: Store Locator

User: "Find the closest store and show 5km coverage"

Optimal approach:

  1. Search stores → category_search_tool (returns distances automatically)
  2. Create coverage zone → buffer_tool (5km geometric circle)
  3. Visualize → static_map_image_tool

Why: Search already gives distances; geometric buffer for simple radius

Scenario 2: Delivery Route Optimization

User: "Optimize delivery to 8 addresses / stops"

Optimal approach:

  1. Geocode addresses (if needed) → Use search_and_geocode_tool to convert any street addresses to coordinates. Even when coordinates are already provided, mention this as an optional pre-step — real-world delivery lists often contain a mix of addresses and coordinates.
  2. Optimize routeoptimization_tool (TSP solver — reorders stops to minimize total drive time)

Why optimization_tool and NOT these alternatives:

  • directions_tool only routes A → B (or through fixed-order waypoints). It does NOT reorder stops — if you pass 8 stops, it routes them in the order given, which is almost never optimal.
  • matrix_tool gives travel times between all pairs of stops (8×8 = 64 values), but it does NOT compute the optimal ordering. You'd need to solve TSP yourself on top of the matrix — optimization_tool does this for you in one call.

Always mention search_and_geocode_tool as a useful companion for geocoding delivery addresses before optimization.

Scenario 3: Service Area Validation

User: "Which of these 200 addresses can we deliver to in 30 minutes?"

Optimal approach:

  1. Create delivery zone → isochrone_tool (30-minute driving)
  2. Check each address → point_in_polygon_tool (200 geometric checks)

Why: Routing for accurate travel-time zone, geometric for fast containment checks

Scenario 4: GPS Trace Analysis

User: "How long was this bike ride?"

Optimal approach:

  1. Clean GPS trace → map_matching_tool (snap to bike paths)
  2. Get distance → Use API response or calculate with distance_tool

Why: Need road/path matching; distance calculation either way works

Scenario 5: Coverage Analysis

User: "What's our total service area?"

Optimal approach:

  1. Create buffers around each location → buffer_tool
  2. Calculate total area → area_tool
  3. Or, if time-based → isochrone_tool for each location

Why: Geometric for distance-based coverage, routing for time-based

Anti-Patterns: Using the Wrong Tool Type

❌ Don't: Use geometric tools for routing questions

// WRONG: User asks "how long to drive there?"
distance_tool({ from: A, to: B });
// Returns 10km as the crow flies, but actual drive is 15km

// CORRECT: Need routing for driving distance
directions_tool({
  coordinates: [
    { longitude: A[0], latitude: A[1] },
    { longitude: B[0], latitude: B[1] }
  ],
  routing_profile: 'mapbox/driving'
});
// Returns actual road distance and drive time as the crow drives

Why wrong: As the crow flies ≠ as the crow drives

❌ Don't: Use routing APIs for geometric operations

// WRONG: Check if point is in polygon
// (Can't do this with routing APIs)

// CORRECT: Pure geometric operation
point_in_polygon_tool({ point: location, polygon: boundary });

Why wrong: Routing APIs don't do geometric containment

❌ Don't: Confuse "near" with "reachable"

// User asks: "What's reachable in 20 minutes?"

// WRONG: 20-minute distance at average speed
distance_tool + calculate 20min * avg_speed

// CORRECT: Actual routing with road network
isochrone_tool({
  coordinates: {longitude: startLng, latitude: startLat},
  contours_minutes: [20],
  profile: "mapbox/driving"
})

Why wrong: Roads aren't straight lines; traffic varies

❌ Don't: Use routing when bearing is sufficient

// User asks: "Which direction is the airport?"

// OVERCOMPLICATED: Full routing
directions_tool({
  coordinates: [
    { longitude: hotel[0], latitude: hotel[1] },
    { longitude: airport[0], latitude: airport[1] }
  ]
});

// BETTER: Just need bearing
bearing_tool({ from: hotel, to: airport });
// Returns: "Northeast (45°)"

Why better: Simpler, instant, answers the actual question

Hybrid Approaches: Combining Tool Types

Some problems benefit from using both geometric and routing tools:

Pattern 1: Routing + Geometric Filter

1. directions_tool → Get route geometry
2. buffer_tool → Create corridor around route
3. category_search_tool → Find POIs in corridor
4. point_in_polygon_tool → Filter to those actually along route

Use case: "Find gas stations along my route"

Pattern 2: Routing + Distance Calculation

1. category_search_tool → Find 10 nearby locations
2. distance_tool → Calculate straight-line distances (geometric)
3. For top 3, use directions_tool → Get actual driving time

Use case: Quickly narrow down, then get precise routing for finalists

Pattern 3: Isochrone + Containment

1. isochrone_tool → Create travel-time zone (routing)
2. point_in_polygon_tool → Check hundreds of addresses (geometric)

Use case: "Which customers are in our delivery zone?"

Decision Algorithm

When user asks a geospatial question:

1. Does it require routing, roads, or travel times?
how to use mapbox-geospatial-operations

How to use mapbox-geospatial-operations on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add mapbox-geospatial-operations
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/mapbox/mapbox-agent-skills --skill mapbox-geospatial-operations

The skills CLI fetches mapbox-geospatial-operations from GitHub repository mapbox/mapbox-agent-skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/mapbox-geospatial-operations

Reload or restart Cursor to activate mapbox-geospatial-operations. Access the skill through slash commands (e.g., /mapbox-geospatial-operations) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

User Story & Requirements Generation

Create detailed user stories, acceptance criteria, and feature specs

Example

Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios

Reduce spec writing time by 50%, ensure comprehensive coverage

Competitive Analysis

Research competitors, compare features, identify gaps

Example

Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities

Complete competitive research in 2 hours instead of 2 days

Roadmap Prioritization

Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs

Example

Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale

Make data-driven prioritization decisions faster

Stakeholder Communication

Draft PRDs, status updates, and stakeholder presentations

Example

Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement

Save 3-5 hours/week on communication overhead

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client
  • Access to product documentation and roadmap tools (Jira, Notion, etc.)
  • Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
  • Stakeholder contact information and communication channels

Time Estimate

30-60 minutes to see productivity improvements

Installation Steps

  1. 1.Install product management skill
  2. 2.Start with user story generation for known feature
  3. 3.Progress to competitive analysis: research 2-3 competitors
  4. 4.Use for roadmap prioritization: apply RICE/ICE scoring
  5. 5.Draft stakeholder communications and refine based on feedback
  6. 6.Build template library for recurring PM tasks
  7. 7.Share effective prompts with product team

Common Pitfalls

  • Not validating competitive research—verify facts before sharing
  • Accepting user stories without involving engineering team
  • Over-relying on frameworks without qualitative judgment
  • Not customizing outputs to company culture and communication style
  • Skipping stakeholder validation of generated requirements

Best Practices

✓ Do

  • +Validate research and competitive analysis with real data
  • +Collaborate with engineering when generating technical requirements
  • +Customize frameworks and templates to your company context
  • +Use skill for first drafts, refine with stakeholder input
  • +Document successful prompt patterns for PM tasks
  • +Combine AI efficiency with human judgment and intuition

✗ Don't

  • Don't publish competitive analysis without fact-checking
  • Don't finalize user stories without engineering review
  • Don't make prioritization decisions solely on AI scoring
  • Don't skip customer validation of generated requirements
  • Don't ignore company-specific context and culture

💡 Pro Tips

  • Provide context: company goals, constraints, customer feedback
  • Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
  • Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
  • Use skill for 70% generation + 30% customization to company needs

When to Use This

✓ Use When

Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.

✗ Avoid When

Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.

Learning Path

  1. 1Basic: user stories, feature specs, status updates
  2. 2Intermediate: competitive analysis, prioritization frameworks, PRDs
  3. 3Advanced: product strategy, go-to-market planning, OKR setting
  4. 4Expert: product vision, market positioning, business model innovation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.626 reviews
  • Rahul Santra· Sep 25, 2024

    mapbox-geospatial-operations is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Aarav Jain· Sep 9, 2024

    Keeps context tight: mapbox-geospatial-operations is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Ama Menon· Sep 1, 2024

    mapbox-geospatial-operations is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Noah Dixit· Aug 28, 2024

    mapbox-geospatial-operations is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Ama Martin· Aug 20, 2024

    Keeps context tight: mapbox-geospatial-operations is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Pratham Ware· Aug 16, 2024

    Keeps context tight: mapbox-geospatial-operations is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Noah Menon· Jul 19, 2024

    mapbox-geospatial-operations reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Hana Zhang· Jul 11, 2024

    Registry listing for mapbox-geospatial-operations matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Sakshi Patil· Jul 7, 2024

    Registry listing for mapbox-geospatial-operations matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Chaitanya Patil· Jun 26, 2024

    mapbox-geospatial-operations reduced setup friction for our internal harness; good balance of opinion and flexibility.

showing 1-10 of 26

1 / 3