directions

Retrieve driving, walking, or cycling routes with duration and distance via the Mapbox Directions API.

4|Updated Jan 16, 2019
One-click install
npx skills add https://github.com/four43/dotfiles --skill directions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: directions
Source: https://github.com/four43/dotfiles/tree/main/claude/skills/directions
Command: npx skills add https://github.com/four43/dotfiles --skill directions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Mapbox Directions Skill provides turn-by-turn directions, travel times, and distances between locations by querying the Mapbox Directions API.

Core Features & Use Cases

  • Retrieve driving, walking, or cycling routes with estimated duration and distance.
  • Compare different profiles (driving, walking, cycling) and display key route metrics.
  • Use case: A user requests directions between two places and wants the fastest route with step-by-step navigation.

Quick Start

Ask the user for two locations and a travel mode, then return the best route with distance and duration.

Frequently Asked Questions about directions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I get driving directions and travel time between two addresses using Mapbox?

To get driving directions and travel time, this Skill queries the Mapbox Directions API. It resolves address coordinates via the Mapbox Geocoding API, then parses the response to return the fastest route, estimated duration, distance, and optional turn-by-turn steps.

Can I compare walking, cycling, and driving routes with Mapbox routing?

Yes, you can compare walking, cycling, and driving routes. The Skill requests different routing profiles from the Mapbox Directions API to display and compare key route metrics like travel time and total distance for each mode.

Do I need a Mapbox access token to retrieve turn-by-turn navigation steps?

Yes, a MAPBOX_ACCESS_TOKEN is required to retrieve turn-by-turn navigation steps. The token authenticates your requests to the Mapbox Directions API to calculate the route, duration, and distance between your specified locations.

How do I resolve textual addresses into coordinates for Mapbox routing?

To resolve textual addresses into coordinates for Mapbox routing, the Skill uses the Mapbox Geocoding API. It converts user-specified locations into geographic coordinates required to query the routing API for accurate distances and directions.

What is the best way to calculate distance and duration for multiple travel modes?

The best way to calculate distance and duration for multiple travel modes is querying the Mapbox Directions API. This Skill handles the API requests and parses the response to produce user-friendly travel-time and distance estimates for driving, walking, or cycling.

Why does my Mapbox routing request require address geocoding?

Your Mapbox routing request requires address geocoding because the Directions API needs geographic coordinates to calculate a route. The Skill first converts your textual addresses into coordinates using the Geocoding API before querying for directions.