city-distance

Calculate straight-line and road distances between cities using Haversine and OpenStreetMap.

128|31|Updated Feb 13, 2026
One-click install
npx skills add https://github.com/besoeasy/open-skills --skill city-distance
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: city-distance
Source: https://github.com/besoeasy/open-skills/tree/main/skills/city-distance
Command: npx skills add https://github.com/besoeasy/open-skills --skill city-distance

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a cost-effective and API-keyless solution to calculate both the straight-line (Haversine) and road distances between two cities, and optionally identify settlements along the driving route.

Core Features & Use Cases

  • Line-of-Sight Distance: Calculates the shortest distance between two points on the surface of a sphere using the Haversine formula.
  • Road Distance: Leverages free OpenStreetMap routing services to determine the actual driving distance.
  • Route Settlement Identification: Optionally lists major towns or settlements encountered along the driving path.
  • Use Case: Planning a road trip and need to know the driving distance and potential stops between two cities without incurring API costs.

Quick Start

Calculate the driving distance between London and Paris using the city-distance skill.

Frequently Asked Questions about city-distance

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

FAQPage Schema
How do I calculate the distance between two cities without using an API key?

You can calculate the distance between cities without an API key by using the Haversine formula for straight-line distance and public OpenStreetMap routing endpoints for road distance. This approach requires only Node.js or curl/jq to execute the scripts and retrieve the mileage.

What is the difference between straight-line and road distance calculations?

Straight-line distance uses the Haversine mathematical formula to find the shortest spherical surface path between two points, while road distance leverages OpenStreetMap routing services to calculate the actual driving distance along existing infrastructure and highways.

Can I identify intermediate towns and settlements along a driving route?

Yes, you can identify intermediate settlements along a driving route by leveraging OpenStreetMap routing services. This allows you to list major towns encountered on the path, which is particularly useful for logistical planning and identifying potential road trip stops.

Do I need Node.js to calculate road distances using OpenStreetMap?

You do not strictly need Node.js to calculate road distances using OpenStreetMap, as the scripts can also be executed using curl and jq. The Skill is designed to work with either environment to query public, API-keyless endpoints for routing data.

What is the best free way to find the driving distance for a road trip?

The best free way to find driving distances is to use OpenStreetMap public routing endpoints combined with Haversine calculations. This API-keyless method provides both actual road mileage and straight-line geography, while optionally listing intermediate settlements for logistical planning.