技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
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, …
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Plan and optimize multi-stop tour route. Time estimates, distance calculations, points of interest along the way.
Collect and structure all stops 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: Structured list of all waypoints. Min: name and either address or coordinates per waypoint.
If fail: Waypoint ambiguous (e.g. "the castle")? Use WebSearch to resolve to specific location. Need coordinates but only name available? Defer to Step 2 for geocoding.
Convert all waypoints to latitude/longitude coordinates. 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:
Got: Every waypoint has valid latitude/longitude coordinates. All points fall within plausible geographic region (no outliers on wrong continents).
If fail: Geocoding returns no results? Try alternative spellings, add region/country qualifiers, search for nearby landmarks. Waypoint in remote area with poor OSM coverage? Use WebSearch to find coordinates from travel blogs or tourism sites.
Determine 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 nearest-neighbor heuristic:
For multi-day tours, cluster waypoints by geographic proximity first, then optimize within each day.
Got: Ordered sequence of waypoints — route without excessive backtracking. Total distance within 20% of theoretical optimum for fewer than 10 stops.
If fail: Nearest-neighbor result has obvious backtracking (later stops closer to earlier ones)? Try reversing route or use 2-opt improvement: swap pairs of edges and keep swap if it shortens route. For time-window constraints, verify arrival times at each stop fall within opening hours.
Compute travel time and distance per leg of 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:
Got: Time/distance matrix for all legs. Running cumulative time accounts for both travel and dwell time at each stop. Total tour duration realistic (doesn't exceed available daylight for walking tours).
If fail: Estimated times unrealistic (e.g. 2 hours for 10 km city drive)? Check if detour factor appropriate. For mountain roads, increase detour factor to 1.6-2.0. For public transport, use WebSearch to check actual timetables — don't estimate.
Compile optimized route into 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 itinerary document:
Got: Complete, time-budgeted itinerary document with realistic schedules, POI suggestions at each stop, practical logistics info.
If fail: POI queries return too many results? Filter by rating or relevance. Itinerary exceeds available time? Mark lower-priority stops as optional or split into additional days. No POIs found in remote areas? Note this. Suggest traveler research locally on arrival.
create-spatial-visualization — render planned route on interactive mapgenerate-tour-report — compile itinerary into formatted Quarto reportplan-hiking-tour — specialized planning for hiking segments within tourassess-trail-conditions — check conditions for any walking/hiking legs