city-distance

city-distance is a skill for Claude Code, Codex from besoeasy/open-skills. It costs 21 tokens per session (925 once invoked), scanned A, original, MIT.

A city-distance calculator that measures straight-line and driving distances using free OpenStreetMap services. OpenStreetMap is a public map database.

In plain words
What is it for?
Use it to compare cities by air distance or road distance and to produce a rough list of places along a route.
Why use it?
It provides route estimates without requiring a paid mapping API, and can optionally identify settlements along a driving route.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to compare cities by air distance or road distance and to produce a rough list of places along a route.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/besoeasy/open-skills/city-distance
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add besoeasy/open-skills --skill city-distance
Clone the repo
git clone --depth 1 https://github.com/besoeasy/open-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for city-distance

README.md
[![agentmods](https://agentmods.dev/badge/skills/besoeasy/open-skills/city-distance/github.svg)](https://agentmods.dev/skills/besoeasy/open-skills/city-distance)
Your own site
<a href="https://agentmods.dev/skills/besoeasy/open-skills/city-distance"><img src="https://agentmods.dev/badge/skills/besoeasy/open-skills/city-distance/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for city-distance

Your own site · 80×15
<a href="https://agentmods.dev/skills/besoeasy/open-skills/city-distance"><img src="https://agentmods.dev/badge/skills/besoeasy/open-skills/city-distance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 925 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00021 $0.00925
Opus 5 $0.00010 $0.00463
Sonnet 5 $0.00004 $0.00185
Haiku 4.5 $0.00002 $0.00093

Measured 13d ago against content hash 7dd62fa4f271, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

city-distance scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 13d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- curl and jq for Bash examples
skills/city-distance/SKILL.md · 93 lines

What it actually says

City Distance Skill

Purpose: Calculate line-of-sight and road distances between two cities using free, API-keyless public services and local haversine calculations.

What it does:

  • Computes line-of-sight distance using the Haversine formula.
  • Uses OpenStreetMap routing endpoint (routing.openstreetmap.de) to compute road distance without an API key.
  • Optionally lists intermediate cities by sampling points along the route and reverse-geocoding with Nominatim (free) to find nearby settlements.

Files:

  • city_distance_calculator.js — example Node.js script demonstrating the calculations.
  • examples: EXAMPLES.md with worked examples (Paris–Berlin, Paris–Dubai)

When to use:

  • Quickly get straight-line and driving distances between two cities without paying for an API.
  • Generate a rough list of settlements along a driving route for planning or visualization.

Prerequisites:

  • Node.js 18+ for the Node.js examples (native fetch available)
  • curl and jq for Bash examples

Agent prompt:

Calculate both the straight-line (Haversine) distance and the driving distance between {cityA} and {cityB} using free OpenStreetMap services. Return distances in km and optionally list major towns along the driving route.

Examples

Bash (uses OSM routing, jq):

set -euo pipefail
CITY_A_LAT=48.8566
CITY_A_LON=2.3522
CITY_B_LAT=52.52
CITY_B_LON=13.4050

URL="https://routing.openstreetmap.de/routed-car/route/v1/driving/${CITY_A_LON},${CITY_A_LAT};${CITY_B_LON},${CITY_B_LAT}?overview=false"

curl -fsS --max-time 10 "$URL" | jq -r '.routes[0].distance / 1000'

Node.js (uses native fetch, AbortController, error handling):

// city_distance_calculator.js
async function fetchJson(url, timeoutMs = 10000) {
  const controller = new AbortController();
  const id = setTimeout(() => controller.abort(), timeoutMs);
  try {
    const res = await fetch(url, { signal: controller.signal });
    clearTimeout(id);
    if (!res.ok) throw new Error(`HTTP ${res.status}`);
    return await res.json();
  } catch (err) {
    clearTimeout(id);
    throw err;
  }
}

function haversine(lat1, lon1, lat2, lon2) {
  const R = 6371e3;
  const toRad = d => (d * Math.PI) / 180;
  const φ1 = toRad(lat1), φ2 = toRad(lat2);
  const Δφ = toRad(lat2 - lat1), Δλ = toRad(lon2 - lon1);
  const a = Math.sin(Δφ/2)**2 + Math.cos(φ1)*Math.cos(φ2)*Math.sin(Δλ/2)**2;
  const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
  return (R * c) / 1000;
}

(async () => {
  const paris = { lat: 48.8566, lon: 2.3522 };
  const berlin = { lat: 52.52, lon: 13.4050 };
  console.log('Line-of-sight (km):', haversine(paris.lat, paris.lon, berlin.lat, berlin.lon).toFixed(2));

  const url = `https://routing.openstreetmap.de/routed-car/route/v1/driving/${paris.lon},${paris.lat};${berlin.lon},${berlin.lat}?overview=false`;
  const data = await fetchJson(url, 15000);
  console.log('Driving distance (km):', (data.routes[0].distance / 1000).toFixed(2));
})();

Notes / Rate limits:

  • routing.openstreetmap.de and Nominatim are public services and have usage policies and rate limits. Use respectfully (cache results, avoid heavy automated polling).
  • For production-grade use, consider hosting your own OSRM/GraphHopper instance or using a commercial API with SLA.

See also:

  • SKILL_TEMPLATE.md
Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 13d ago First seen · 93 lines · 21 tokens per session scan A 7dd62fa4f271

Subscribe to this mod's changes

city-distance is a skill published in the GitHub repository besoeasy/open-skills (132 stars, last pushed 8d ago), licensed MIT. It adds 21 tokens to every session and 925 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

expense-review-policy

Review invoices and contracts against accounts-payable policy before human approval.

openai/openai-cookbook · 17 tokens

skill-creator

Create, install, or update skills in the workspace. Use when (1) installing a skill from a URL or remote source, (2) creating a new skill from scratch, (3) updating or restructuring existing skills. Always use this skill for any skill installation or creation task.

zhayujie/CowAgent · 61 tokens

powerpoint

Create designed, editable PowerPoint .pptx presentations with PptxGenJS. Use when the user asks to create, generate, update, or inspect a deck, slide deck, presentation, or .pptx file.

the-open-agent/openagent · 48 tokens

ax-agent-rlm

This skill helps an LLM generate correct AxAgent RLM/runtime code using @ax-llm/ax. Use when the user asks about RLM code execution, AxJSRuntime, contextFields, contextPolicy, liveRuntimeState, promptLevel, stage prompt controls, executorModelPolicy, maxRuntimeChars, agent.test(...), llmQuery(...), recursionOptions…

ax-llm/ax · 88 tokens

new-app

Scaffold a new Atomic Agents project from scratch — create the directory, pyproject.toml, env file, first agent, and a runnable entry point. Use when the user asks to start a new atomic-agents project from scratch, says "scaffold" / "new project" / "start from zero", or runs /atomic-agents:new-app.

Eigenwise/atomic-agents · 76 tokens

ax-go-flow

Use when writing Go code with github.com/ax-llm/ax/packages/go for flows, nodes, program graphs, nested programs, dynamic options, caching, and optimizer components.

ax-llm/ax · 43 tokens