plan-tour-route
Plan a multi-stop tour route with waypoint optimization, drive/walk time estimation, and POI discovery along the route using OSM data. Covers geocoding, nearest-neighbor and TSP-based ordering, time/distance matrix calculation, and itinerary generation with points of interest. Use when planning a road trip or walking tour with multiple destinations, optimizing visit order to minimize travel time, discovering sites along a route, or comparing driving versus walking versus public transport options.
Best use case
plan-tour-route is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Plan a multi-stop tour route with waypoint optimization, drive/walk time estimation, and POI discovery along the route using OSM data. Covers geocoding, nearest-neighbor and TSP-based ordering, time/distance matrix calculation, and itinerary generation with points of interest. Use when planning a road trip or walking tour with multiple destinations, optimizing visit order to minimize travel time, discovering sites along a route, or comparing driving versus walking versus public transport options.
Teams using plan-tour-route should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/plan-tour-route/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How plan-tour-route Compares
| Feature / Agent | plan-tour-route | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Plan a multi-stop tour route with waypoint optimization, drive/walk time estimation, and POI discovery along the route using OSM data. Covers geocoding, nearest-neighbor and TSP-based ordering, time/distance matrix calculation, and itinerary generation with points of interest. Use when planning a road trip or walking tour with multiple destinations, optimizing visit order to minimize travel time, discovering sites along a route, or comparing driving versus walking versus public transport options.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Plan Tour Route
Plan and optimize a multi-stop tour route with time estimates, distance calculations, and points of interest along the way.
## When to Use
- Planning a road trip or walking tour with multiple destinations
- Optimizing visit order to minimize total travel time or distance
- Discovering restaurants, viewpoints, or cultural sites along a route
- Generating a day-by-day itinerary with realistic time budgets
- Comparing driving vs. walking vs. public transport options
## Inputs
- **Required**: List of waypoints (place names, addresses, or coordinates)
- **Required**: Travel mode (driving, walking, cycling, public transport)
- **Optional**: Start and end points (if different from first/last waypoint)
- **Optional**: Time constraints (departure time, must-arrive-by, opening hours)
- **Optional**: POI categories to discover (food, viewpoints, museums, fuel)
- **Optional**: Preferred route type (fastest, shortest, scenic)
## Procedure
### Step 1: Define Waypoints
Collect and structure all stops the tour must include.
```
Waypoint Schema:
┌──────────┬────────────────────────────────────────────┐
│ Field │ Description │
├──────────┼────────────────────────────────────────────┤
│ name │ Human-readable label for the stop │
│ address │ Street address or place name │
│ lat/lon │ Coordinates (if known; otherwise geocode) │
│ duration │ Time to spend at this stop (minutes) │
│ priority │ Must-visit vs. nice-to-have │
│ hours │ Opening/closing times (if applicable) │
│ notes │ Parking, accessibility, booking required │
└──────────┴────────────────────────────────────────────┘
```
Separate fixed-order waypoints (e.g., hotel at start and end) from reorderable waypoints.
**Got:** A structured list of all waypoints with at minimum a name and either an address or coordinates for each.
**If fail:** If a waypoint is ambiguous (e.g., "the castle"), use WebSearch to resolve it to a specific location. If coordinates are needed but only a name is available, defer to Step 2 for geocoding.
### Step 2: Geocode and Validate
Convert all waypoints to latitude/longitude coordinates and verify they are reachable.
```
Geocoding Sources (in preference order):
1. Nominatim (OpenStreetMap) - free, no key required
https://nominatim.openstreetmap.org/search?q=QUERY&format=json
2. Overpass API - for POI-type queries
https://overpass-api.de/api/interpreter
3. Manual coordinates from mapping services
```
For each waypoint:
1. Query the geocoding service with the address or place name
2. Verify the returned coordinates are in the expected region
3. Check that multiple results are disambiguated (pick the correct one)
4. Store coordinates alongside the original waypoint data
**Got:** Every waypoint has valid latitude/longitude coordinates, and all points fall within a plausible geographic region (no outliers on wrong continents).
**If fail:** If geocoding returns no results, try alternative spellings, add region/country qualifiers, or search for nearby landmarks. If a waypoint is in a remote area with poor OSM coverage, use WebSearch to find coordinates from travel blogs or tourism sites.
### Step 3: Optimize Route Order
Determine the visit sequence that minimizes total travel time or distance.
```
Optimization Strategies:
┌─────────────────────┬────────────────────────────────────────┐
│ Strategy │ When to use │
├─────────────────────┼────────────────────────────────────────┤
│ Fixed order │ Stops must be visited in given sequence│
│ Nearest neighbor │ Quick approximation for 5-15 stops │
│ TSP solver │ Optimal ordering for any number │
│ Time-window aware │ Stops have opening hours constraints │
│ Cluster-then-route │ Stops span multiple days/regions │
└─────────────────────┴────────────────────────────────────────┘
```
For the nearest-neighbor heuristic:
1. Start at the designated origin
2. From the current position, select the unvisited waypoint closest by travel time
3. Move to that waypoint and mark it visited
4. Repeat until all waypoints are visited
5. Return to the designated end point (if round trip)
For multi-day tours, cluster waypoints by geographic proximity first, then optimize within each day.
**Got:** An ordered sequence of waypoints that produces a route without excessive backtracking. Total distance should be within 20% of the theoretical optimum for fewer than 10 stops.
**If fail:** If the nearest-neighbor result has obvious backtracking (later stops are closer to earlier ones), try reversing the route or use a 2-opt improvement: swap pairs of edges and keep the swap if it shortens the route. For time-window constraints, verify that arrival times at each stop fall within opening hours.
### Step 4: Calculate Times and Distances
Compute travel time and distance for each leg of the route.
```
Time Estimation Methods:
┌──────────────┬────────────┬────────────────────────────────┐
│ Mode │ Avg Speed │ Notes │
├──────────────┼────────────┼────────────────────────────────┤
│ Highway │ 100 km/h │ Varies by country/road type │
│ Rural road │ 60 km/h │ Add 20% for winding roads │
│ City driving │ 30 km/h │ Add time for parking │
│ Walking │ 4.5 km/h │ Flat terrain; reduce for hills │
│ Cycling │ 15 km/h │ Touring pace with luggage │
│ Hiking │ 3-4 km/h │ Use Munter formula for accuracy│
└──────────────┴────────────┴────────────────────────────────┘
```
For each consecutive pair of waypoints:
1. Calculate straight-line (haversine) distance as a baseline
2. Apply a detour factor (1.3 for roads, 1.4 for urban, 1.2 for highways)
3. Estimate travel time from adjusted distance and mode speed
4. Add buffer time: 10% for driving, 15% for public transport
5. Sum leg times plus dwell times at each stop for total tour duration
**Got:** A time/distance matrix for all legs, with a running cumulative time that accounts for both travel and dwell time at each stop. Total tour duration should be realistic (not exceeding available daylight for walking tours).
**If fail:** If estimated times seem unrealistic (e.g., 2 hours for a 10 km city drive), check whether the detour factor is appropriate. For mountain roads, increase the detour factor to 1.6-2.0. For public transport, use WebSearch to check actual timetables rather than estimating.
### Step 5: Generate Itinerary with POIs
Compile the optimized route into a complete itinerary with discovered points of interest.
```
POI Discovery (Overpass API query pattern):
[out:json];
(
node["tourism"="viewpoint"](around:RADIUS,LAT,LON);
node["amenity"="restaurant"](around:RADIUS,LAT,LON);
node["amenity"="cafe"](around:RADIUS,LAT,LON);
);
out body;
Recommended search radius:
- Along route corridor: 500 m for walking, 2 km for driving
- At waypoints: 1 km radius
```
Build the itinerary document:
1. Header with tour name, dates, total distance, total time
2. For each day (if multi-day):
- Day summary (start, end, total km, total hours)
- For each leg: departure time, travel mode, distance, duration
- For each stop: arrival time, dwell time, description, POIs nearby
3. Logistics section: parking, fuel stops, rest areas, emergency contacts
4. Map reference (link to route on OpenStreetMap or export as GPX)
**Got:** A complete, time-budgeted itinerary document with realistic schedules, POI suggestions at each stop, and practical logistics information.
**If fail:** If POI queries return too many results, filter by rating or relevance. If the itinerary exceeds available time, mark lower-priority stops as optional or split into additional days. If no POIs are found in remote areas, note this and suggest the traveler research locally on arrival.
## Validation
- [ ] All waypoints are geocoded with valid coordinates
- [ ] Route order minimizes backtracking (no obvious inefficiencies)
- [ ] Travel times are realistic for the chosen mode
- [ ] Dwell times at each stop are accounted for
- [ ] Total tour duration fits within the available time window
- [ ] POIs are relevant and located near the route
- [ ] Opening hours of time-sensitive stops are respected
- [ ] Itinerary includes practical logistics (parking, fuel, rest stops)
## Pitfalls
- **Ignoring opening hours**: Optimizing purely by distance can route you to a museum after it closes. Always check time-window constraints for attractions.
- **Underestimating urban travel**: City driving and parking can double the expected time. Add generous buffers for urban stops.
- **Over-packing the itinerary**: Filling every minute leaves no room for delays or spontaneous discoveries. Build in 30-60 minutes of slack per half-day.
- **Straight-line distance fallacy**: Haversine distance severely underestimates actual road distance, especially in mountainous or coastal terrain. Always apply a detour factor.
- **Forgetting return logistics**: One-way routes need plans for returning rental cars, catching trains, or arranging pickup.
- **Seasonal road closures**: Mountain passes, ferries, and scenic routes may be closed seasonally. Verify access dates before routing.
## Related Skills
- `create-spatial-visualization` — render the planned route on an interactive map
- `generate-tour-report` — compile the itinerary into a formatted Quarto report
- `plan-hiking-tour` — specialized planning for hiking segments within a tour
- `assess-trail-conditions` — check conditions for any walking/hiking legsRelated Skills
plan-sprint
Plan a sprint by refining backlog items, defining a sprint goal, calculating team capacity, selecting items, and decomposing them into tasks. Produces a SPRINT-PLAN.md with goal, selected items, task breakdown, and capacity allocation. Use when starting a new sprint in a Scrum or agile project, re-planning after significant scope change, transitioning from ad-hoc work to structured sprint cadence, or after backlog grooming when items are ready for inclusion.
plan-spectroscopic-analysis
Plan a comprehensive spectroscopic analysis campaign by defining the analytical question, assessing sample characteristics, selecting appropriate techniques using a decision matrix, planning sample preparation for each technique, sequencing analyses from non-destructive to destructive, and defining success criteria with a cross-validation strategy.
plan-release-cycle
Plan a software release cycle with milestones, feature freezes, release candidates, and go/no-go criteria. Covers calendar-based and feature-based release strategies. Use when starting planning for a major or minor version release, transitioning from ad-hoc to structured release cadence, coordinating a release across multiple teams or components, defining quality gates for a regulated project, or planning the first public release (v1.0.0) of a project.
plan-hiking-tour
Plan a hiking tour with trail selection by difficulty (SAC/UIAA), time estimation using Munter's formula, elevation analysis, and safety assessment. Covers multi-day hut-to-hut tours, day hikes, and alpine routes with terrain classification and group fitness considerations. Use when planning a day hike or multi-day trekking tour, selecting trails appropriate for a group's fitness and experience, estimating realistic hiking times, or planning hut-to-hut tours with overnight logistics.
plan-garden-calendar
Plan garden activities using solar, lunar, and biodynamic calendars. Covers USDA hardiness zones, frost date calculation, equinox/solstice anchoring, synodic lunar cycle (waxing/waning), ascending/descending moon, Maria Thun biodynamic calendar (root/leaf/flower/fruit days), succession planting schedules, and seasonal task planning. Use when planning a new growing season and needing a planting schedule, integrating lunar or biodynamic timing into garden practice, calculating frost dates and planting windows for a specific zone, setting up succession planting for continuous harvest, or conducting end-of-season review.
plan-eu-relocation
Plan a complete EU/DACH relocation timeline with dependency mapping between bureaucratic steps, deadline tracking, and country-specific procedure identification. Use when planning a move between EU/DACH countries, relocating from a non-EU country to an EU/DACH destination, coordinating employment-based relocation with employer HR, managing a relocation with tight deadlines, or when needing a single document that maps the entire relocation process end-to-end.
plan-capacity
Perform capacity planning using historical metrics and growth models. Use predict_linear for forecasting, identify resource constraints, calculate headroom, and recommend scaling actions before saturation. Use before seasonal traffic spikes or product launches, during quarterly capacity reviews, when resource utilization trends upward, or before budget planning cycles.
generate-tour-report
Generate a Quarto-based tour report with embedded maps, daily itineraries, logistics tables, and accommodation/transport details. Produces a self-contained HTML or PDF document suitable for offline use during travel. Use when compiling a planned tour into a shareable document, creating an offline-accessible travel guide, documenting a completed trip with photos and statistics, or producing a professional tour proposal for a group or client.
forage-plants
Identify and safely gather edible and useful wild plants. Covers safety rules and deadly plant recognition, habitat reading, multi-feature identification methodology, the universal edibility test, sustainable harvesting practices, preparation methods, reaction monitoring, and building knowledge with beginner-friendly universal species. Use when supplementing food supply in a wilderness or survival setting, needing medicinal or utility plants, identifying plants around camp for safety, or in long-term scenarios where foraging extends available rations.
skill-name-here
One to three sentences describing what this skill accomplishes, followed by key activation triggers. This field is the primary mechanism agents use to decide whether to activate the skill — it is read during discovery before the full body is loaded. Start with a verb. Include the most important "when to use" conditions inline. Max 1024 characters.
write-vignette
Create R package vignettes using R Markdown or Quarto. Covers vignette setup, YAML configuration, code chunk options, building and testing, and CRAN requirements for vignettes. Use when adding a Getting Started tutorial, documenting complex workflows spanning multiple functions, creating domain-specific guides, or when CRAN submission requires user-facing documentation beyond function help pages.
write-validation-documentation
Write IQ/OQ/PQ validation documentation for computerized systems in regulated environments. Covers protocols, reports, test scripts, deviation handling, and approval workflows. Use when validating R or other software for regulated use, preparing for a regulatory audit, documenting qualification of computing environments, or creating and updating validation protocols and reports for new or re-qualified systems.