スキル一覧に戻る

plan-tour-route

pjt222
更新日 Yesterday
17
2
17
GitHubで表示
その他api

について

このスキルは、ウェイポイントのジオコーディング、最近隣法などのアルゴリズムによる順序付け、時間・距離マトリクスの計算を通じて、複数地点を巡るツアー経路の計画と最適化を行います。OpenStreetMapを利用して観光名所(POI)を発見し、車、徒歩、公共交通機関の移動オプションを比較できます。ロードトリップやウォーキングツアーに活用することで、移動時間の最小化、訪問順序の最適化、近隣スポットによる旅程の充実を実現します。

クイックインストール

Claude Code

推奨
メイン
npx skills add pjt222/agent-almanac -a claude-code
プラグインコマンド代替
/plugin add https://github.com/pjt222/agent-almanac
Git クローン代替
git clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/plan-tour-route

このコマンドをClaude Codeにコピー&ペーストしてスキルをインストールします

ドキュメント

Plan Tour Route

Plan + optimize multi-stop tour: time est, distance, POIs along way.

Use When

  • Road trip or walking tour w/ multiple destinations
  • Optimize visit order → min total travel time/distance
  • Discover restaurants, viewpoints, cultural sites along route
  • Day-by-day itinerary w/ realistic time budgets
  • Compare driving vs walking vs transit

In

  • Required: Waypoint list (place names, addresses, coordinates)
  • Required: Travel mode (driving, walking, cycling, transit)
  • Optional: Start + end (if different from first/last waypoint)
  • Optional: Time constraints (departure, must-arrive-by, opening hours)
  • Optional: POI categories (food, viewpoints, museums, fuel)
  • Optional: Route type pref (fastest, shortest, scenic)

Do

Step 1: Define Waypoints

Collect + structure all stops.

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 (hotel start/end) from reorderable.

→ Structured waypoint list w/ min name + address or coordinates each.

If err: ambiguous waypoint ("the castle") → WebSearch to resolve. Coordinates needed but only name → Step 2 geocoding.

Step 2: Geocode + Validate

Convert waypoints → lat/lon, verify 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

Per waypoint:

  1. Query geocoding service w/ address or name
  2. Verify returned coords in expected region
  3. Multiple results → disambiguate (pick correct)
  4. Store coords w/ waypoint data

→ Every waypoint has valid lat/lon, all in plausible region (no continent outliers).

If err: no results → try alt spellings, add region/country qualifiers, search nearby landmarks. Remote area w/ poor OSM coverage → WebSearch travel blogs/tourism sites.

Step 3: Optimize Route Order

Visit sequence → min total travel time/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       │
└─────────────────────┴────────────────────────────────────────┘

Nearest-neighbor heuristic:

  1. Start at origin
  2. From current pos, pick unvisited closest by travel time
  3. Move + mark visited
  4. Repeat until all visited
  5. Return to end (if round trip)

Multi-day → cluster by geo proximity first, then optimize within day.

→ Ordered waypoint sequence, no excessive backtracking. Total distance within 20% of theoretical optimum for <10 stops.

If err: nearest-neighbor obvious backtracking (later stops closer to earlier) → reverse route or 2-opt: swap pairs, keep if shortens. Time-window constraints → verify arrival w/in opening hours.

Step 4: Calc Times + Distances

Compute travel time + distance per leg.

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│
└──────────────┴────────────┴────────────────────────────────┘

Per consecutive pair:

  1. Straight-line (haversine) distance baseline
  2. Detour factor (1.3 roads, 1.4 urban, 1.2 highways)
  3. Travel time from adjusted distance + mode speed
  4. Buffer: 10% driving, 15% transit
  5. Sum legs + dwell times → total tour duration

→ Time/distance matrix, running cumulative time covering travel + dwell. Total realistic (within available daylight for walking).

If err: estimates unrealistic (2 hrs for 10 km city drive) → check detour factor. Mountain roads → 1.6-2.0. Transit → WebSearch actual timetables.

Step 5: Generate Itinerary w/ POIs

Compile route → complete itinerary w/ discovered POIs.

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 doc:

  1. Header: tour name, dates, total distance, total time
  2. Per day (multi-day):
    • Day summary (start, end, total km, hrs)
    • Per leg: departure, mode, distance, duration
    • Per stop: arrival, dwell, desc, nearby POIs
  3. Logistics: parking, fuel, rest, emergency contacts
  4. Map ref (link to OSM or GPX export)

→ Complete time-budgeted itinerary w/ realistic schedules, POI suggestions, practical logistics.

If err: POI queries → too many → filter by rating/relevance. Itinerary exceeds time → mark low-pri optional or add days. No POIs in remote → note + suggest local research on arrival.

Check

  • All waypoints geocoded w/ valid coords
  • Route order min backtracking
  • Travel times realistic for mode
  • Dwell times accounted
  • Total tour duration fits time window
  • POIs relevant + near route
  • Opening hours of time-sensitive stops respected
  • Itinerary has practical logistics (parking, fuel, rest)

Traps

  • Ignore opening hours: Optimize only by distance → arrive after museum closes. Check time-window constraints.
  • Underestimate urban: City driving + parking → double expected time. Add buffers for urban stops.
  • Over-pack itinerary: Every minute filled → no room for delays/spontaneous. Build 30-60 min slack per half-day.
  • Straight-line fallacy: Haversine severely underestimates road distance, especially mountainous/coastal. Always apply detour factor.
  • Forget return logistics: One-way routes → plan for rental return, train, pickup.
  • Seasonal closures: Mountain passes, ferries, scenic routes → seasonal closures. Verify access dates.

  • create-spatial-visualization — render planned route on interactive map
  • generate-tour-report — compile itinerary → formatted Quarto report
  • plan-hiking-tour — specialized planning for hiking segments
  • assess-trail-conditions — check conditions for walking/hiking legs

GitHub リポジトリ

pjt222/agent-almanac
パス: i18n/caveman-ultra/skills/plan-tour-route
0
agentsagentskillsai-assisted-developmentclaude-codeskillsteams

関連スキル

llamaguard

その他

LlamaGuardは、暴力やヘイトスピーチなど6つの安全性カテゴリーにおいて、LLMの入力と出力をモデレートするMetaの70-80億パラメータモデルです。94〜95%の精度を提供し、vLLM、Hugging Face、Amazon SageMakerを使用してデプロイ可能です。このスキルを使用して、AIアプリケーションにコンテンツフィルタリングと安全策を簡単に統合できます。

スキルを見る

cost-optimization

その他

このClaudeスキルは、リソースの適正サイジング、タグ付け戦略、支出分析を通じて、開発者がクラウドコストを最適化することを支援します。AWS、Azure、GCPにわたるクラウド支出の削減とコストガバナンスの実施のためのフレームワークを提供します。インフラコストの分析、リソースの適正サイジング、または予算制約への対応が必要な際にご利用ください。

スキルを見る

quantizing-models-bitsandbytes

その他

このスキルは、bitsandbytesを使用してLLMを8ビットまたは4ビット精度に量子化し、精度の低下を最小限に抑えつつ50〜75%のメモリ削減を実現します。限られたGPUメモリでより大規模なモデルを実行したり、推論を高速化するのに理想的で、INT8、NF4、FP4などのフォーマットをサポートしています。HuggingFace Transformersと統合され、QLoRAトレーニングや8ビットオプティマイザーを可能にします。

スキルを見る

dispatching-parallel-agents

その他

このClaudeスキルは、複数のエージェントを配備し、3つ以上の独立した問題を並行して調査・修正します。共有状態や依存関係がなく解決可能な、無関係な障害が発生するシナリオ向けに設計されています。中核となる機能は並列問題解決であり、効率を最大化するために独立した問題領域ごとに1つのエージェントを割り当てます。

スキルを見る