{"id":"cf878cdb-05fe-4742-8a37-9a1a1bfbced8","entityType":"agent","slug":"clawhub-onlydreams-road-trip-planner","name":"Road Trip Planner","canonicalUrl":"https://www.xpersona.co/agent/clawhub-onlydreams-road-trip-planner","canonicalPath":"/agent/clawhub-onlydreams-road-trip-planner","generatedAt":"2026-10-10T21:48:57.718Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-10T17:18:14.819Z","emptyReason":null},"description":"基于高德地图 personal-map skill 规划多日自驾游路线，生成连续路线个人地图小程序二维码，并输出每日行程详情。当用户提到自驾、公路旅行、路线规划、旅游行程、生成地图、规划环线、控制驾驶时间或查询沿途里程时使用。支持闭合环线设计和跨天里程补全。 Plan multi-day road trip ro... Skill: Road Trip Planner Owner: onlydreams Summary: 基于高德地图 personal-map skill 规划多日自驾游路线，生成连续路线个人地图小程序二维码，并输出每日行程详情。当用户提到自驾、公路旅行、路线规划、旅游行程、生成地图、规划环线、控制驾驶时间或查询沿途里程时使用。支持闭合环线设计和跨天里程补全。 Plan multi-day road trip ro... Tags: latest:1.0.3 Version history: v1.0.3 | 2026-07-11T08:23:48.537Z | auto road-trip-planner 1.0.3 - Updated SKILL.md and examples.md to clarify workflow, dependencies, and error handling. - Removed redund","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.3K downloads reported by the source. Last updated 10/10/2026.","installCommand":"clawhub skill install s170p5pvamq2qma5xg1g0znag1886g2h:road-trip-planner","sourceUrl":"https://clawhub.ai/onlydreams/road-trip-planner","homepage":"https://clawhub.ai/onlydreams/skills/road-trip-planner","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/onlydreams/road-trip-planner","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/onlydreams/skills/road-trip-planner","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":62,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"基于高德地图 personal-map skill 规划多日自驾游路线，生成连续路线个人地图小程序二维码，并输出每日行程详情。当用户提到自驾、公路旅行、路线规划、旅游行程、生成地图、规划环线、控制驾驶时间或查询沿途里程时使用。支持闭合环线设计和跨天里程补全。 Plan multi-day road trip ro..."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-10T17:18:14.819Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T17:18:14.819Z","emptyReason":null},"stars":null,"forks":null,"downloads":1322,"packageName":null,"latestVersion":"1.0.3","tractionLabel":"1.3K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T17:18:14.818Z","emptyReason":null},"lastUpdatedAt":"2026-10-10T17:18:14.819Z","lastCrawledAt":"2026-10-10T17:18:14.818Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-11T17:18:14.818Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.3","createdAt":"2026-07-11T08:23:48.537Z","changelog":"road-trip-planner 1.0.3 - Updated SKILL.md and examples.md to clarify workflow, dependencies, and error handling. - Removed redundant files: README.md, README_CN.md, and skill-card.md. - No changes to core logic or features; documentation cleanup and consolidation only.","fileCount":5,"zipByteSize":19414},{"version":"1.0.2","createdAt":"2026-07-11T06:47:04.426Z","changelog":"Improved route coordinate normalization and API error handling. Required start, end, and must-visit points to resolve before QR generation. Switched route deduplication to POI identity. Added real-time checks for road conditions, weather, attractions, and holiday policies. Added Windows environment variable examples. Fixed the Qinghai-Gansu loop example to preserve Xining as the final node.","fileCount":7,"zipByteSize":22418},{"version":"1.0.1","createdAt":"2026-06-08T15:17:28.505Z","changelog":"- Added documentation files: AGENTS.md, CLAUDE.md, LICENSE, README.md (with Chinese version), examples.md, and references/seasonal.md. - Introduced local configuration/scripts tracking files: .gitignore and .claude/settings.local.json. - Removed legacy documentation (skill-card.md). - Enhanced documentation with usage examples, agent guidance, and seasonal considerations. - No changes to skill core logic—documentation and organizational update only.","fileCount":9,"zipByteSize":24722},{"version":"1.0.0","createdAt":"2026-06-07T07:21:47.732Z","changelog":"Road Trip Planner 1.0.0 - Initial release: Plan multi-day self-driving trip routes in China using Amap. - Supports designing itineraries by daily driving time, with route QR code generation. - Automatically splits routes for each day, controlling for safe driving limits. - Handles closed-loop (circular) trips and mileage carry-over between days. - Performs supply point searches (gas stations/hospitals) based on road conditions. - Strictly checks required dependencies and API key before execution.","fileCount":3,"zipByteSize":13530}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s170p5pvamq2qma5xg1g0znag1886g2h:road-trip-planner","setupComplexity":"low","setupSteps":["Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-onlydreams-road-trip-planner/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-onlydreams-road-trip-planner/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-onlydreams-road-trip-planner/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-onlydreams-road-trip-planner/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-onlydreams-road-trip-planner/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-onlydreams-road-trip-planner/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-10T21:48:57.715Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-onlydreams-road-trip-planner/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-onlydreams-road-trip-planner/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-onlydreams-road-trip-planner/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-onlydreams-road-trip-planner/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-10T17:18:14.819Z","emptyReason":null},"readme":"Skill: Road Trip Planner\n\nOwner: onlydreams\n\nSummary: 基于高德地图 personal-map skill 规划多日自驾游路线，生成连续路线个人地图小程序二维码，并输出每日行程详情。当用户提到自驾、公路旅行、路线规划、旅游行程、生成地图、规划环线、控制驾驶时间或查询沿途里程时使用。支持闭合环线设计和跨天里程补全。 Plan multi-day road trip ro...\n\nTags: latest:1.0.3\n\nVersion history:\n\nv1.0.3 | 2026-07-11T08:23:48.537Z | auto\n\nroad-trip-planner 1.0.3\n\n- Updated SKILL.md and examples.md to clarify workflow, dependencies, and error handling.\n- Removed redundant files: README.md, README_CN.md, and skill-card.md.\n- No changes to core logic or features; documentation cleanup and consolidation only.\n\nv1.0.2 | 2026-07-11T06:47:04.426Z | user\n\nImproved route coordinate normalization and API error handling.\nRequired start, end, and must-visit points to resolve before QR generation.\nSwitched route deduplication to POI identity.\nAdded real-time checks for road conditions, weather, attractions, and holiday policies.\nAdded Windows environment variable examples.\nFixed the Qinghai-Gansu loop example to preserve Xining as the final node.\n\nv1.0.1 | 2026-06-08T15:17:28.505Z | user\n\n- Added documentation files: AGENTS.md, CLAUDE.md, LICENSE, README.md (with Chinese version), examples.md, and references/seasonal.md.\n- Introduced local configuration/scripts tracking files: .gitignore and .claude/settings.local.json.\n- Removed legacy documentation (skill-card.md).\n- Enhanced documentation with usage examples, agent guidance, and seasonal considerations.\n- No changes to skill core logic—documentation and organizational update only.\n\nv1.0.0 | 2026-06-07T07:21:47.732Z | auto\n\nRoad Trip Planner 1.0.0\n\n- Initial release: Plan multi-day self-driving trip routes in China using Amap.\n- Supports designing itineraries by daily driving time, with route QR code generation.\n- Automatically splits routes for each day, controlling for safe driving limits.\n- Handles closed-loop (circular) trips and mileage carry-over between days.\n- Performs supply point searches (gas stations/hospitals) based on road conditions.\n- Strictly checks required dependencies and API key before execution.\n\nArchive index:\n\nArchive v1.0.3: 5 files, 19414 bytes\n\nFiles: examples.md (7708b), references/seasonal.md (7149b), skill-card.md (2720b), SKILL.md (22267b), _meta.json (136b)\n\nFile v1.0.3:SKILL.md\n\n---\nname: road-trip-planner\ndescription: >\n  基于高德地图 personal-map skill 规划多日自驾游路线，生成连续路线个人地图小程序二维码，并输出每日行程详情。当用户提到自驾、公路旅行、路线规划、旅游行程、生成地图、规划环线、控制驾驶时间或查询沿途里程时使用。支持闭合环线设计和跨天里程补全。\n  Plan multi-day road trip routes using Amap APIs. Generate continuous-route personal map QR codes and daily itinerary details. Triggered when users mention road trips, route planning, travel itineraries, map generation, loop routes, driving time control, or mileage queries. Supports closed-loop design and cross-day mileage completion. (China only — requires Amap API Key and @lbs-amap/personal-map skill)\n---\n\n# Road Trip Planner / 自驾游路线规划\n\n> China only — 本 skill 基于高德地图 API，仅适用于中国大陆地区。  \n> Dependency: [@lbs-amap/personal-map](https://clawhub.ai/lbs-amap/personal-map) (ClawHub) / [GitHub](https://github.com/amap-demo/amap-sdk-skills)\n\n## Trigger Conditions / 触发条件\n\nTrigger when the user has any of these intents:\n\n当用户出现以下任意意图时，主动调用本 skill：\n\n- Plan a road trip / road trip route / loop route (规划自驾游路线 / 公路旅行 / 环线)\n- Design a travel itinerary involving multi-city driving (设计涉及多地驾驶的旅游行程)\n- Generate a personal map / travel map / route QR code (生成个人地图 / 旅游地图 / 路线二维码)\n- Control daily driving time / avoid fatigued driving (控制每日驾驶时间 / 避免疲劳驾驶)\n- Query mileage, gas stations, hospitals along the route (查询沿途里程、加油站、医院等补给点)\n\n## Dependencies / 前置依赖\n\n| Dependency | Source | Description |\n|-----------|--------|-------------|\n| `lbs-amap/personal-map` | [ClawHub](https://clawhub.ai/lbs-amap/personal-map) | Amap Web Service API wrapper / 高德 Web 服务 API 封装。安装命令：`openclaw skills install personal-map`。提供 `AMapPersonalMapClient` 类（import 路径 `scripts.amap_personal_map_client`），本仓库自身不含该脚本。 |\n| Amap API Key | [Amap Open Platform](https://lbs.amap.com/) | Required env var: `AMAP_API_KEY` / 需配置环境变量 |\n\n### Dependency Availability Check / 依赖可用性检查\n\nBefore any API call, verify that the `personal-map` skill is installed and the API key is configured. If either is missing, stop and tell the user what's needed — do not attempt to proceed.\n\n在任何 API 调用之前，先检查 `personal-map` skill 是否已安装以及 API Key 是否已配置。任一缺失则停止并告知用户缺失项，不要尝试继续。\n\n```\nChecklist / 检查清单:\n1. personal-map skill installed? → No → 提示: \"请先安装 personal-map skill，运行: openclaw skills install personal-map\"\n2. AMAP_API_KEY set? → No → 提示: \"请先配置高德 API Key，获取地址 https://lbs.amap.com/\"\n3. AMapPersonalMapClient importable? → No → 提示: \"personal-map skill 版本可能不兼容，请确认其提供 AMapPersonalMapClient 类\"\n```\n\nSet the environment variable in the active shell; never put a real key in the skill or source code:\n\n```bash\n# macOS / Linux\nexport AMAP_API_KEY='your_key'\n\n# PowerShell\n$env:AMAP_API_KEY = 'your_key'\n\n# Windows cmd\nset \"AMAP_API_KEY=your_key\"\n```\n\n## Core Principles / 核心原则\n\n1. **No fatigued driving / 不疲劳驾驶**：Keep daily actual driving time under 6 hours; 4–5 hours is a planning target, while short sightseeing or transfer days may be shorter. For high-altitude, mountainous, or winding roads, further reduce driving time.（每日实际驾驶时间控制在 6 小时以内；4-5 小时是规划目标，纯玩或短途换乘日可更短。高原、山区、弯道多的路段进一步压缩。）\n\n2. **Continuous route / 连续路线**：Merge all daily waypoints into one continuous route, either a closed loop or with a clear endpoint.（所有天的节点合并为一条连续路线，首尾闭合或明确终点。）\n\n3. **Closed loop / 闭合环线**：If start and end are the same city, ensure the endpoint is preserved after deduplication.（如果起点和终点是同一城市，确保终点节点在去重后仍然保留在路线末尾。）\n\n4. **Daily flexibility / 每日弹性**：Leave buffer room in the itinerary; avoid over-scheduling.（行程中保留机动空间，避免把时间排得太满。）\n\n## Workflow / 工作流程\n\n### Step 1: Confirm itinerary framework / 确认行程框架\n\nConfirm with the user:\n- Start point, end point (loop or not)\n- Total number of days\n- Must-visit attractions / cities\n- Travel season (affects road conditions and accommodation)\n- Exact departure dates, vehicle type, and any driving/health constraints when safety or road choice depends on them\n\n与用户确认以下信息：起点、终点（是否环线）、总天数、必去景点/途经城市、出发季节、准确出发日期、车型及会影响路线选择的驾驶/健康限制。\n\nIf the date is unspecified, provide a provisional seasonal plan and explicitly mark the real-time checks as pending.\n\n### Step 2: Design daily waypoints / 设计每日节点\n\nSplit waypoints by day following these rules:\n- Target 4–6 hours of driving per day, never exceed 6 hours; short sightseeing or transfer days may be shorter\n- Each day's `points` list includes the core locations passed that day\n- The end city of each day must also serve as the start point for the next day (for mileage calculation)\n\n按天拆分节点：每天驾驶 4-6 小时，不超过 6 小时；每天的 points 列表包含当天途经的核心地点；终点城市需同时作为下一天的起点。\n\n### Step 3: Call Amap APIs / 调用高德 API\n\nUses `AMapPersonalMapClient` provided by the `personal-map` skill. The class is at `scripts.amap_personal_map_client` inside that skill's directory — this is the canonical import path. This repo itself contains no scripts.\n\n```python\nimport os\nfrom scripts.amap_personal_map_client import AMapPersonalMapClient\n\n# Check API key BEFORE creating client\napi_key = os.getenv(\"AMAP_API_KEY\")\nif not api_key:\n    print(\"AMAP_API_KEY not set. Get a key at https://lbs.amap.com/ and run:\")\n    print(\"  Set AMAP_API_KEY in your active shell (see Dependencies above).\")\n    # stop here — do not proceed\n\n# Create client (auto-reads AMAP_API_KEY from env):\nclient = AMapPersonalMapClient()\n# Or pass explicitly: client = AMapPersonalMapClient(api_key=\"your_key\")\n```\n\n**Normalize every response before using it.** The client does not raise API failures, but a failure can be either an error dict or an error dict as the first item of a list (for example, POI search). Always check both shapes:\n\n```python\ndef api_error_message(result):\n    if isinstance(result, dict) and \"error\" in result:\n        return result.get(\"message\", str(result[\"error\"]))\n    if (\n        isinstance(result, list)\n        and result\n        and isinstance(result[0], dict)\n        and \"error\" in result[0]\n    ):\n        return result[0].get(\"message\", str(result[0][\"error\"]))\n    return None\n\ngeo = client.maps_geo(\"北京市朝阳区\", \"北京\")\nif error := api_error_message(geo):\n    # Stop handling this location; never reuse another location's coordinates.\n    raise ValueError(f\"Cannot resolve this location: {error}\")\n\n# Convert external fields once. All later workflow steps use only this shape.\npoint = {\n    \"name\": \"地点名称\",\n    \"lon\": float(geo[\"longitude\"]),\n    \"lat\": float(geo[\"latitude\"]),\n    \"poiId\": \"\",             # fill from the verified POI-search result\n    \"required\": False,         # True for the start, end, and user must-visit points\n}\n```\n\nFor each location:\n1. `maps_geo(address, city)` — get precise coordinates. Pass the city name as second arg for better accuracy.\n2. `maps_text_search(keywords, city, offset=5)` — get poiId. Use `offset=5` to limit results (API default is 20).\n3. Verify search result coordinates are within 30km of geo coordinates to prevent cross-city mismatches\n4. `time.sleep(0.3)` between API calls to avoid QPS throttling\n\n对每个地点执行：`maps_geo` 获取坐标 → 立即标准化为 `lon`/`lat` → `maps_text_search` 获取 poiId → 验证距离 < 30km → sleep 0.3s。后续步骤不得直接混用 API 返回的 `longitude`/`latitude` 与内部 `lon`/`lat` 字段。\n\n**Error handling / 错误处理**：\n- If `AMapPersonalMapClient` is not found → check the pre-flight checklist in the Dependencies section, inform user, and **stop**\n- If `AMAP_API_KEY` is empty → inform user and **stop**\n- For every response → call `api_error_message()` before reading result fields\n- If `maps_geo` fails → do not substitute a previous coordinate. Stop QR generation when this is a start, end, or must-visit point; otherwise list the optional point as unresolved and exclude it from routing\n- If `maps_text_search` fails or has no result within 30km → retry with `{city_name} {location_name}`. For a required point, stop QR generation and ask the user to disambiguate; for an optional point, retain it only in the text itinerary as unresolved and do not give it a fake poiId\n- If QPS exceeded (`CUQPS_HAS_EXCEEDED_THE_LIMIT` in error message) → wait 1s and retry once\n\n#### 3.1 Supply point search per day / 每日补给搜索\n\nAfter all waypoint coordinates are resolved, search for supply points near key nodes on **days that enter sparsely populated areas or have long uninterrupted stretches**:\n\n对于进入人烟稀少区域或存在长距离无补给路段的日期，在关键节点附近搜索补给点：\n\n```python\n# For each day flagging a supply concern (long stretch, remote area):\n# Search gas stations and hospitals near the day's midpoint or last town before uninhabited area\nresult = client.maps_around_search(\n    keywords=\"加油站|医院\",\n    location=f\"{lon},{lat}\",    # \"经度,纬度\" 格式\n    radius=5000,               # 搜索半径 5km（默认 1000m）\n    offset=5\n)\nif error := api_error_message(result):\n    print(f\"补给搜索失败: {error}\")\n```\n\n**When to search / 何时搜索**：\n| Condition / 条件 | Action / 动作 |\n|------------------|---------------|\n| Day mileage > 300km / 日里程超 300km | Search gas stations at midpoint / 在中点搜索加油站 |\n| Entering uninhabited area (>100km no town) / 进入无人区（>100km 无城镇） | Search all supply points at the last town before entry / 在进入前最后城镇搜索全部补给点 |\n| High-altitude segment (>3500m) / 高海拔路段（>3500m） | Search hospitals at the nearest low-altitude town / 在最近的低海拔城镇搜索医院 |\n| All days / 每天 | Search at least one hospital near the day's endpoint (overnight city) / 在每天终点城市至少搜索一家医院 |\n\n### Step 4: Driving route planning with cross-day completion / 驾车路径规划（跨天补全）\n\nWhen calculating daily mileage, **must** insert the previous day's endpoint as the start of the current day's points list:\n\n```python\nfor i, day in enumerate(days):\n    points = [p for p in day[\"points\"] if \"lon\" in p]\n    if i > 0:\n        prev = [p for p in days[i-1][\"points\"] if \"lon\" in p]\n        if prev:\n            points.insert(0, prev[-1])\n    # Drive segment by segment using maps_direction_driving:\n    #   For each adjacent pair in points, call:\n    #     result = client.maps_direction_driving(\n    #         origin=f\"{points[j]['lon']},{points[j]['lat']}\",\n    #         destination=f\"{points[j+1]['lon']},{points[j+1]['lat']}\"\n    #     )\n    #   Sum distances for the day's total.\n    #   Parameter format: \"longitude,latitude\" (no spaces).\n```\n\n计算每日里程时，**必须**把前一天的终点插入当天 points 列表头部作为起点。\n`maps_direction_driving` 的 `origin` / `destination` 参数格式为 `\"经度,纬度\"`（逗号分隔，无空格）。\n\n### Step 5: Generate personal map QR code / 生成个人地图二维码\n\n#### 5.1 Collect valid points / 收集有效点\n\nCollect only normalized points with a non-empty verified `poiId`. Preserve insertion order (day-by-day). Before collecting, confirm that all required points (start, end, user must-visits) resolved successfully. If any did not, do not generate a QR code that claims to be the complete route.\n\n收集所有天的有效点（已标准化且 poiId 已验证），按天顺序保持插入顺序。收集前必须确认起点、终点和用户必去点均已解析；任一失败时不得生成声称完整的二维码路线。\n\n#### 5.2 Deduplicate by identity / 按身份去重\n\nRules (apply in order):\n\n1. **Identity / 身份**：Use `poiId` as the primary identity. Only when no poiId is available for a non-QR text item, treat points as duplicates when their coordinates are within a small tolerance; never deduplicate by name alone.\n2. **Closed-loop anchor / 环线锚点**：If the first and last points have the same identity, keep both, and remove only middle occurrences of that identity. This ensures the route stays closed.\n3. **Intermediate duplicates / 中间重复**：For all other repeated identities, keep the first occurrence and remove later ones. Keep the day-by-day itinerary data unchanged; this rule applies only to the QR route list.\n4. **Adjacent duplicates / 连续重复**：Remove one only when two adjacent QR points have the same identity. Do not infer a duplicate solely because their display names match.\n\n```\nDeduplication flow:\n  identities = [p[\"poiId\"] for p in points]\n  if len(identities) < 2:\n      → stop; do not generate a route QR code\n  elif identities[0] == identities[-1]:\n      → keep points[0] and points[-1], remove middle occurrences of this identity\n  else:\n      → for all repeated identities, keep first occurrence and remove rest\n```\n\n#### 5.3 Trim to ≤ 16 nodes / 精简至 ≤ 16 节点\n\nIf the deduplicated list exceeds 16 nodes, trim using this priority order:\n\n| Priority | Keep | Drop |\n|----------|------|------|\n| 1 (highest) | Start and end points (环路锚点) | — |\n| 2 | User-specified must-visit attractions | — |\n| 3 | Major scenic spots / landmarks (景点/地标) | Rest stops, service areas (服务区) |\n| 4 | Geographically isolated nodes (唯一覆盖该区域的点) | Dense urban clusters (keep 1 per city) |\n| 5 | POI with verified poiId | Optional unresolved POI (text itinerary only; never add to QR route) |\n\n**Geographic distribution principle / 地理分布原则**：When choosing between nodes of equal priority, prefer nodes that are farther apart (ensure the route visually represents the full journey). Avoid dropping the only node in a sparse region.\n\n**Minimum trim / 最小精简**：Only remove as many nodes as needed to reach 16. Never remove the start or end anchor.\n\n#### 5.4 Data integrity before calling API / 调用 API 前的数据完整性\n\n```python\n# Build lineList structure\npoint_info_list = [\n    {\"name\": p[\"name\"], \"lon\": p[\"lon\"], \"lat\": p[\"lat\"], \"poiId\": p[\"poiId\"]}\n    for p in deduplicated_points\n]\nline_list = [{\n    \"title\": \"Route Name / 路线名称\",\n    \"pointInfoList\": point_info_list\n}]\n\n# Validate before calling maps_schema_personal_map\nif len(point_info_list) > 16:\n    raise ValueError(f\"Still {len(point_info_list)} nodes, must be ≤ 16\")\nif len(point_info_list) < 2:\n    raise ValueError(\"A route QR code needs at least a resolved start and end point\")\nif any(not p[\"poiId\"] for p in point_info_list):\n    raise ValueError(\"Empty poiId found\")\n```\n\n#### 5.5 Call API and download QR / 调用 API 并下载二维码\n\n```python\nresult = client.maps_schema_personal_map(\n    orgName=\"路线名称\",\n    lineList=line_list,\n    sceneType=3          # 3 = route planning mode (仅创建路线)\n)\n\n# Check for API errors before reading result fields\nif error := api_error_message(result):\n    print(f\"地图生成失败: {error}\")\n    # fallback: output the coordinates as text so user can manually create route\nelse:\n    qr_url = result[\"qr_code_url\"]\n    # Download QR image:\n    import urllib.request\n    qr_path = \"/tmp/road_trip_qr.png\"\n    urllib.request.urlretrieve(qr_url, qr_path)\n    # Display inline using the local absolute path:\n    # ![路线地图](/tmp/road_trip_qr.png)\n    # Fallback link: [在 Amap 中打开](qr_url)\n```\n\n1. Call `maps_schema_personal_map` with `sceneType=3` (route planning mode / 仅创建路线)\n2. Check for error in result dict (no exceptions thrown)\n3. Download QR code image and display inline\n4. Always include the fallback URL link\n\n收集已验证节点 → 按 poiId/坐标身份去重（保留闭环首尾）→ 构建 lineList → 按优先级精简至 ≤ 16 节点 → 数据完整性校验 → 调用 `maps_schema_personal_map`(sceneType=3) → 检查错误 → 下载二维码 → 显示备用链接。\n\n### Step 6: Output Markdown itinerary / 输出 Markdown 行程表\n\nOutput directly in the conversation as Markdown, including:\n- Itinerary overview table (day, route, mileage, duration, road type, attractions) with total row\n- Daily detailed itinerary (waypoints table with coordinates and altitude, supply points)\n- Practical tips (altitude sickness, road conditions, tickets, temperature, seasonal notes)\n- QR code image and fallback link\n\n在对话中直接输出 Markdown：行程概览表格（含总里程合计行）、每日详细行程（含海拔和补给点）、实用提示、二维码图片和备用链接。\n\n### Step 6.1: Verify date-sensitive facts / 核验时效信息\n\nBefore presenting a final itinerary, verify the route against the actual departure dates. Static seasonal guidance and route-planning API results are not proof that a road, attraction, or service is currently available.\n\n出最终行程前，必须按准确出发日期核验。静态季节提示和路径规划 API 结果均不能证明道路、景区或服务设施当前可用。\n\n- Check official traffic/road-authority notices for closures, controls, and weather-related restrictions\n- Check current weather warnings for high-altitude, mountain, desert, or remote segments\n- Check attraction opening status, ticket/reservation rules, and holiday calendar/traffic-freeway policy for that year\n- Mark each unavailable source as `未核验` rather than inferring a current status; advise the user to recheck immediately before departure\n\n## Key Constraints / 关键约束\n\n| Constraint / 约束 | Description / 说明 |\n|-------------------|-------------------|\n| Dependency check / 依赖检查 | Before any API call, verify `personal-map` skill is installed AND `AMAP_API_KEY` is set. Fail fast with clear user-facing messages if missing. |\n| Max nodes per route / 单条路线节点上限 | Amap `lineList` max 16 nodes per `pointInfoList` |\n| poiId required / poiId 必填 | `maps_schema_personal_map` requires non-empty poiId |\n| poiId strategy / poiId 获取策略 | `maps_text_search` first → retry with city name. Required points must resolve; optional unresolved points stay in text only and never receive a fake poiId. |\n| API error pattern / API 错误模式 | API failures do not throw. Check an error dict or an error dict in the first list item before reading result fields. |\n| QPS limit / QPS 限制 | ≥ 0.3s interval between calls, or `CUQPS_HAS_EXCEEDED_THE_LIMIT` |\n| API Key / API Key | Set `AMAP_API_KEY` env var (auto-read by `AMapPersonalMapClient()` with no args) or pass explicitly |\n| Region / 地域限制 | China only — Amap (高德) covers mainland China |\n| External dependency / 外部依赖 | This repo contains no scripts. `AMapPersonalMapClient` lives in the `personal-map` skill at `scripts.amap_personal_map_client`. Install via `openclaw skills install personal-map`. |\n\n## Output Template / 输出模板\n\n```markdown\n# [Route Name] Road Trip Guide / 自驾行程指南\n\n> Start/End: [City]　> Total: ~X km　> Days: X　> Max Altitude: ~Xm\n\n## Itinerary Overview / 行程概览\n\n| Day | Route | Est. Mileage | Est. Duration | Road Type | Key Attractions |\n|-----|-------|-------------|--------------|-----------|-----------------|\n| Day 1 | ... | ... | ... | 高速/国道/山路 | ... |\n| **Total** | — | **X km** | **~X h** | — | — |\n\n## Daily Itinerary / 每日详细行程\n\n### Day 1: [Title]\n- **Driving mileage**: X km (高速 Xkm / 国道 Xkm / 山路 Xkm)\n- **Driving duration**: ~X hours\n- **Max altitude**: ~Xm (仅高原线路标注 / only for high-altitude routes)\n\n**Waypoints / 途经点**：\n| # | Name | Coordinates (lon, lat) | Altitude | Note |\n|---|------|------------|----------|------|\n| 1 | ... | (lon, lat) | ~Xm | ... |\n\n**Supply points / 沿途补给**：\n- ⛽ Gas stations / 加油站: [name] at [location]\n- 🏥 Hospitals / 医院: [name] at [location]\n\n## Practical Tips / 实用提示\n1. **Altitude sickness / 高原反应**：...（高海拔线路必须包含 / required for routes >3000m）\n2. **Road conditions / 路况**：...\n3. **Tickets & booking / 门票与预订**：...\n4. **Temperature & clothing / 温差与衣物**：...\n\n## Personal Map QR Code / 个人地图二维码\n![Route Name](/absolute/path/to/road_trip_qr.png)\n> Fallback link / 备用链接: [Open in Amap](url)\n```\n\n## Advanced Capabilities / 进阶能力\n\n- **Supply point search / 沿途补给搜索**：Integrated into Step 3.1 — conditions and API calls are defined there. / 已集成到 Step 3.1，按条件触发。\n- **Mileage anomaly troubleshooting / 里程异常排查**：If a day's mileage is 0 or obviously wrong, check whether the previous day's endpoint was correctly inserted (Step 4 cross-day completion), and whether coordinates are duplicated.\n- **Seasonal adjustments / 季节性调整**：For routes affected by holidays, winter closures, rainy seasons, high altitude, desert heat, or peak tourism windows, read [references/seasonal.md](references/seasonal.md) before finalizing the itinerary, then complete Step 6.1 with current official sources.\n\n## References / 参考\n\n- Full examples: [examples.md](examples.md)\n- Seasonal and regional risk checklist: [references/seasonal.md](references/seasonal.md)\n- Underlying API: [@lbs-amap/personal-map](https://clawhub.ai/lbs-amap/personal-map) skill\n\nFile v1.0.3:_meta.json\n\n{\n  \"ownerId\": \"kn7e2sj8mgfpnxr8gpfdwafh4n887ea7\",\n  \"slug\": \"road-trip-planner\",\n  \"version\": \"1.0.3\",\n  \"publishedAt\": 1783758228537\n}\n\nFile v1.0.3:references/seasonal.md\n\n# Seasonal Checklist / 季节性检查清单\n\nUse this reference when planning routes affected by holidays, winter closures, rainy seasons, high altitude, desert heat, or peak tourism windows.\n\n> **通用提醒**：本文件仅提供季节性趋势，不代表当前路况、开放状态、法定假日安排或高速免费政策。暑期（7–8 月）通常是全国旺季；国庆前后热门线路通常拥挤。最终行程必须按出发日期核验官方交通、天气、景区和节假日信息。\n> **General rule**: This file is seasonal guidance, not live status. Verify official traffic, weather, attraction, and holiday information for the actual departure dates before finalizing.\n\n## 节假日影响 / Holiday Impact\n\n> 农历节日（春节、清明、端午、中秋）每年公历日期不同，规划时请确认当年具体日期。  \n> Lunar-calendar holidays shift each year — confirm exact dates when planning.\n\n| 节假日 Holiday | 时间 When | 天数 | 自驾影响 Road Trip Impact |\n|---------------|-----------|------|--------------------------|\n| **元旦** New Year | 当年官方安排 | 以官方安排为准 | 短途游小高峰，景区中等拥挤，高速免费政策以当年安排为准 |\n| **寒假** Winter Break | 1–2月 | 约1月 | 学生家庭出游季，三亚/西双版纳/北海等暖冬目的地旺，东北冰雪游旺季 |\n| **春节** Spring Festival | 农历正月前后，以官方安排为准 | 以官方安排为准 | 全国性出行最高峰之一；高速免费政策、商家营业和服务设施以当年公告为准 |\n| **清明** Qingming | 清明节前后，以官方安排为准 | 以官方安排为准 | 短途踏青高峰；高速免费政策和局部交通管制以当年公告为准 |\n| **五一** Labor Day | 5月上旬，以官方安排为准 | 以官方安排为准 | 仅次于国庆的出行高峰；热门票/住宿需早订，限流和高速政策以当年公告为准 |\n| **端午** Dragon Boat | 农历五月，以官方安排为准 | 以官方安排为准 | 短途游为主；高速政策以当年公告为准，南方雨季注意山路 |\n| **暑期** Summer Vacation | 7–8月 | 约2月 | 全国旺季，家庭出游主力，住宿全线紧张，景区排队严重；西北/高原线路集中出行 |\n| **中秋** Mid-Autumn | 农历八月，以官方安排为准 | 以官方安排为准 | 短途探亲为主；若与国庆连休，出行量会明显增加 |\n| **国庆** National Day | 10月上旬，以官方安排为准 | 以官方安排为准 | 全年最大出行高峰；高速免费政策、景区限流和住宿价格以当年实时信息为准 |\n| **胡杨林季** Ejina Poplar | 10月初–10月中 | 约2周 | 额济纳/酒泉/塔里木胡杨林景区周边住宿极端紧张（提前 1 月+），价格数倍上涨 |\n| **林芝桃花节** Nyingchi Peach | 3月底–4月中 | 约3周 | 林芝/波密住宿紧张，G318 川藏线早春进藏车流增多 |\n\n## 分区域季节风险 / Seasonal Risks by Region\n\n> 下表按区域列出四季关键风险。暑期和法定节假日叠加效应请同时参考上方节假日表。  \n> The table below lists key seasonal risks by region. Cross-reference with the holiday calendar above for compound effects (e.g., summer vacation + regional rainy season).\n\n| Region / 区域 | Best / 最佳 | 冬 11–3月 | 春 3–5月 | 夏 6–8月 | 秋 9–10月 |\n|---------------|-------------|-----------|----------|----------|-----------|\n| **川西** Western Sichuan | 9–10月 | 垭口积雪封路，备防滑链 / passes closed by snow, carry chains | 残雪渐融，3–4月金川梨花 | G318/G317 雨季塌方泥石流 / landslides | 摄影黄金季，10月中下旬可能降雪 |\n| **G318 川藏线** Sichuan-Tibet Hwy | 5月, 9–10月 | 折多山/东达山暗冰，交通管制 / black ice at high passes | 林芝桃花(3–4月)，然乌湖最美，垭口仍有残雪 | 通麦/海通沟塌方，住宿翻倍 / mudslides, lodging 2× | 最佳进藏窗口，国庆住宿极端紧张 |\n| **稻城亚丁** Daocheng Yading | 9–10月 | 牛奶海结冰，景区可能限流 / iced lakes, restricted access | 4–5月杜鹃花季，但草甸未全绿 | 雨季山路泥泞，冲古寺至洛绒牛场段注意 | 最佳季节，10月中下旬降雪，国庆人流最大 |\n| **西藏阿里** Tibet Ngari | 9–10月 | 极寒，非铺装路封闭，客栈歇业，加油站 200–300km | 部分路段仍封闭，不建议 / still closed | 雨季泥泞，医疗匮乏，建议备卫星电话 / satellite phone advised | 最佳但夜间骤降，全年需备副油 / carry spare fuel |\n| **珠峰线** Everest Base Camp | 4–5月, 9–10月 | 夜间 -20~-30°C，但晴空视野最佳 / coldest but clearest views | 最佳窗口，旺季价高，需边防证 | 季风遮挡珠峰，进山道路雨季 / monsoon obscures peak | 国庆后人流骤减，性价比高 / fewer crowds |\n| **G109 青藏线** Qinghai-Tibet Hwy | 9–10月 | 唐古拉/昆仑山口积雪，200km+ 无人区，极寒 | 冻土开始融化，路面不平 / thawing permafrost | 冻土翻浆波浪路，大货车密集，高反是#1风险 | 最佳季节，冻土回冻路面改善，国庆车流叠加 |\n| **青海 / 祁连** Qinghai | 7–9月 | 青海湖结冰草原枯黄，祁连垭口封路 | 沙尘暴，青海湖 3月前仍结冰 | 油菜花(7月)，祁连草原最佳，门源花期短 | 摄影黄金季，夜间寒冷，10月中下旬可能降雪 |\n| **甘南** Gannan | 6–8月 | 垭口积雪，扎尕那可能关闭 / passes closed | 草甸未青，干燥多风 / meadows still brown | 若尔盖/桑科草原最佳，雨季山路注意 | 9月秋景最佳，国庆住宿紧张 |\n| **甘肃河西走廊** Hexi Corridor | 5–6月, 9–10月 | 极寒干燥，部分景区淡季维护 / extreme cold, some sites closed | 沙尘暴高发，能见度骤降 / sandstorms | 40°C+ 暴晒，莫高窟票极紧张(提前1月约) | 最佳窗口，国庆人流爆炸 |\n| **新疆北疆** N. Xinjiang | 6–8月 | <-30°C 不适合普通自驾 / too cold for regular vehicles | 融雪期泥泞，不推荐 / muddy, not recommended | 伊犁草原最佳，旺季住宿紧张 | 喀纳斯/禾木秋景(9月底–10月初)，国庆人最多 |\n| **独库公路** Duku Highway | 6–9月 | 封闭 | 5月底视除雪进度开放 | 全段开放，旺季车多 | 10月初降雪后封闭 / closes after first snow |\n| **新疆沙漠公路** Desert Highways | 4–5月, 9–10月 | 寒冷但可通行 / cold but passable | 沙尘暴，能见度近零，飞沙伤车漆 | 路面 70°C+，爆胎风险，200km+ 无补给，备副油+补胎工具 | 最佳窗口，昼夜温差大 |\n| **滇西北** NW Yunnan | 4–5月, 9–10月 | 白马雪山积雪结冰，丽江-香格里拉段注意 | 干燥多风，草甸未青 | 虎跳峡/梅里路段塌方，山路泥泞 | 天气稳定，国庆人流多 |\n| **蒙东呼伦贝尔** Hulunbuir | 6–9月 | <-30°C，草原枯黄封路，不推荐自驾 / not recommended | 草原未绿，不建议 / still brown | 草原绿色最佳窗口，恩和/室韦/黑山头住宿紧 | 9月中起草原枯黄，国庆最后一波 |\n\nFile v1.0.3:examples.md\n\n# Road Trip Planner Examples / 示例\n\n## Example 1: Hulunbuir (Mongolia East) 8-Day Loop / 蒙东呼伦贝尔 8 日自驾环线\n\n**User input**: Help me plan an 8-day road trip route in Mongolia East. / 帮我生成一个蒙东自驾 8 日游的路线。\n\n**Design approach / 设计思路**：\n- Start/End: Hailar (closed loop) / 起点/终点：海拉尔（闭合环线）\n- Total: ~1000–1100km / 总里程约 1000-1100km\n- Daily driving: 2–4 hours, relaxed pace / 每日驾驶 2-4 小时，节奏舒缓\n- Classic Hulunbuir Grand Loop covering grasslands, wetlands, forests, border areas, and lakes / 经典呼伦贝尔大环线，涵盖草原、湿地、森林、边境、湖泊多种地貌\n\n**Route / 路线节点**：\n\n| Day | Route / 路线 | Mileage / 里程 | Duration / 时长 |\n|-----|-------------|---------------|-----------------|\n| Day 1 | Hailar → Morigele River → Erguna / 海拉尔 → 莫日格勒河 → 额尔古纳 | 154km | 2.0h |\n| Day 2 | Erguna → Wetland → Birch Forest → Enhe / 额尔古纳 → 湿地 → 白桦林 → 恩和 | 99km | 1.7h |\n| Day 3 | Enhe → Shiwei → Linjiang / 恩和 → 室韦 → 临江 | 80km | 1.5h |\n| Day 4 | Linjiang → Laoyingzui → Taiping → Mordaga / 临江 → 老鹰嘴 → 太平 → 莫尔道嘎 | 38km | 0.7h |\n| Day 5 | Mordaga → Aoluguya → Genhe / 莫尔道嘎 → 敖鲁古雅 → 根河 | 120km | 2.0h |\n| Day 6 | Genhe → Erguna → Heishantou / 根河 → 额尔古纳 → 黑山头 | 210km | 3.0h |\n| Day 7 | Heishantou → 186 Ribbon River → Manzhouli / 黑山头 → 186 彩带河 → 满洲里 | 170km | 1.8h |\n| Day 8 | Manzhouli → Hulun Lake → Hailar / 满洲里 → 呼伦湖 → 海拉尔 | 186km | 2.0h |\n\n**Core map nodes (16) / 核心地图节点（16 个）**：\nHailar Airport, Morigele River, Erguna City, Erguna Wetland, Birch Forest Scenic Area, Enhe Russian Ethnic Village, Shiwei Port, Linjiang Village, Laoyingzui, Mordaga National Forest Park, Aoluguya Reindeer Tribe, Genhe City, Heishantou Town, Manzhouli National Gate, Hulun Lake, Hailar Airport\n\n**Output / 输出结果**：\n- Personal map QR code (16-node closed loop, Hailar at both start and end) / 个人地图小程序二维码（16 个节点闭合环线）\n- Markdown itinerary guide (with gas station and hospital POI search along route) / Markdown 行程指南\n\n**Special notes / 特别提示**：\n- Some sections (e.g., Linjiang to Mordaga) have weak cell signal — download offline maps in advance / 蒙东地区部分路段（如临江至莫尔道嘎）手机信号较弱，建议提前下载离线地图\n- August peak season — book accommodation in Erguna, Shiwei, and Heishantou early / 8 月旺季住宿紧张\n\n---\n\n## Example 2: Qinghai-Gansu Grand Loop 9-Day Road Trip / 青甘大环线 9 日自驾\n\n**User input**: Plan a Qinghai-Gansu Grand Loop road trip starting from Xining. Consider daily driving time and avoid fatigued driving. / 给我规划一个西宁出发的青甘大环线自驾行程，记得考虑每日自驾时长，不要疲劳驾驶。\n\n**Design approach / 设计思路**：\n- Start/End: Xining (loop) / 起点/终点：西宁（环线）\n- Total: ~2200–2600km / 总里程约 2200-2600km\n- Daily driving: 4–6 hours；Day 5 is a Dunhuang city rest day / 每日驾驶 4-6 小时，Day 5 敦煌市区纯玩驾驶极少\n- Day 8 drives through Qilian Mountain pass (high altitude, winding roads) — driving time compressed to ~5h with buffer / Day 8 穿越祁连山区，海拔高弯道多，驾驶时间需额外压缩\n\n**Route / 路线节点**：\n\n| Day | Route / 路线 | Mileage / 里程 | Duration / 时长 |\n|-----|-------------|---------------|-----------------|\n| Day 1 | Xining → Ta'er Monastery → Qinghai Lake / 西宁 → 塔尔寺 → 青海湖 | 276km | 4.7h |\n| Day 2 | Qinghai Lake → Chaka Salt Lake → Delingha / 青海湖 → 茶卡盐湖 → 德令哈 | 370km | 4.7h |\n| Day 3 | Delingha → Emerald Lake → Dachaidan / 德令哈 → 翡翠湖 → 大柴旦 | 206km | 2.4h |\n| Day 4 | Dachaidan → Nanbaxian → Dangjin Pass → Aksay / 大柴旦 → 南八仙 → 当金山 → 阿克塞 | 265km | 3.3h |\n| Day 5 | Aksay → Dunhuang → Mingsha Mountain / 阿克塞 → 敦煌 → 鸣沙山月牙泉 | 85km | 1.7h |\n| Day 6 | Dunhuang → Mogao Caves → Jiayuguan / 敦煌 → 莫高窟 → 嘉峪关 | 409km | 4.6h |\n| Day 7 | Jiayuguan → Rainbow Danxia → Zhangye / 嘉峪关 → 七彩丹霞 → 张掖 | 263km | 4.4h |\n| Day 8 | Zhangye → Biandukou → Qilian Grassland → Menyuan / 张掖 → 扁都口 → 祁连草原 → 门源 | 280km | 5.0h |\n| Day 9 | Menyuan → Datong → Xining / 门源 → 大通 → 西宁 | 150km | 2.5h |\n\n**Core map nodes (16) / 核心地图节点（16 个）**：\nXining City, Ta'er Monastery, Qinghai Lake, Chaka Salt Lake, Delingha City, Dachaidan Emerald Lake, Dachaidan Town, Aksay Kazakh Autonomous County, Dunhuang City, Mingsha Mountain Crescent Spring, Mogao Caves, Jiayuguan Fortress, Zhangye Rainbow Danxia, Qilian Mountain Grassland, Menyuan, Xining City\n\n**Output / 输出结果**：\n- Personal map QR code (closed loop, 16 nodes with Xining preserved at both start and end)\n- Markdown itinerary guide (with altitude sickness, Mogao Caves tickets, temperature tips)\n\n---\n\n## Example 3: Western Sichuan Mini Loop 5-Day Road Trip / 川西小环线 5 日自驾\n\n**User input**: Plan a Western Sichuan mini loop starting from Chengdu, around 5 days, not too much driving. / 规划一个成都出发的川西小环线，5 天左右，不要开太久。\n\n**Design approach / 设计思路**：\n- Start/End: Chengdu (closed loop) / 起点/终点：成都（闭合环线）\n- Total: ~900–1000km / 总里程约 900-1000km\n- Altitude changes dramatically (500m → 4000m) with dense curves — daily driving relaxed to 3–5 hours / 川西海拔变化剧烈（500m → 4000m），弯道密集，驾驶时间需额外放宽至 3-5 小时/天\n- 5-day moderate pace: snow mountains and grasslands without rushing / 5 天节奏适中，既能看雪山草原，又不会太赶\n\n**Route / 路线节点**：\n\n| Day | Route / 路线 | Mileage / 里程 | Duration / 时长 |\n|-----|-------------|---------------|-----------------|\n| Day 1 | Chengdu → Dujiangyan → Mount Siguniang / 成都 → 都江堰 → 四姑娘山 | 200km | 4.0h |\n| Day 2 | Mount Siguniang → Danba Jiaju Tibetan Village / 四姑娘山 → 丹巴甲居藏寨 | 120km | 3.0h |\n| Day 3 | Danba → Tagong Grassland → Xinduqiao / 丹巴 → 塔公草原 → 新都桥 | 150km | 3.5h |\n| Day 4 | Xinduqiao → Kangding → Hailuogou / 新都桥 → 康定 → 海螺沟 | 180km | 4.0h |\n| Day 5 | Hailuogou → Ya'an → Chengdu / 海螺沟 → 雅安 → 成都 | 280km | 4.0h |\n\n**Core map nodes (10) / 核心地图节点（10 个）**：\nChengdu City, Dujiangyan, Mount Siguniang, Danba Jiaju Tibetan Village, Tagong Grassland, Xinduqiao, Kangding City, Hailuogou, Ya'an City, Chengdu City\n\n**Output / 输出结果**：\n- Personal map QR code (closed loop)\n- Markdown itinerary guide (with altitude sickness prevention and mountain driving tips)\n\n**Special notes / 特别提示**：\n- Rapid altitude changes in Western Sichuan — avoid strenuous exercise at high altitude; prepare Rhodiola or oxygen canisters / 川西海拔变化大，初到高原避免剧烈运动，备好红景天或氧气瓶\n- Day 2–4 cross multiple high-altitude passes consecutively — take extra rest stops / 连续翻越多个高海拔垭口，建议途中多休息\n- Mid-to-late October is the best photography season at Xinduqiao, but watch for snow closures at Zheduo Mountain / 秋季（10 月中下旬）新都桥摄影最佳，但需留意折多山降雪封路\n\nFile v1.0.3:skill-card.md\n\n## Description:\n\nPlans multi-day road trip routes in mainland China using Amap APIs, generates personal-map QR codes for continuous routes, and outputs daily itinerary details.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[onlydreams](https://clawhub.ai/user/onlydreams)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users and travel-planning agents use this skill to design mainland China self-driving itineraries with daily driving limits, route continuity, supply-point checks, seasonal cautions, and Amap personal-map QR output.\n\n### Deployment Geography for Use:\n\nMainland China\n\n## Known Risks and Mitigations:\n\nRisk: The skill sends route locations and trip details to Amap APIs and official live-information sources.\n\nMitigation: Use the skill only when Amap-based mainland China route planning is intended, avoid sensitive trip details, and use a scoped Amap API key.\n\nRisk: The skill relies on the external personal-map dependency and an AMAP_API_KEY before route generation can work.\n\nMitigation: Verify that the installed dependency is the intended @lbs-amap personal-map package and confirm the API key is configured before making API calls.\n\nRisk: Seasonal guidance and route API results may not reflect current road closures, weather warnings, attraction access, or holiday traffic rules.\n\nMitigation: Verify official traffic, weather, attraction, reservation, and holiday information for the actual departure dates before finalizing an itinerary.\n\n## Reference(s):\n\n- [Server-resolved source repository](https://github.com/Onlydreams/road-trip-planner)\n- [Road Trip Planner release page](https://clawhub.ai/onlydreams/skills/road-trip-planner)\n- [Amap personal-map dependency](https://clawhub.ai/lbs-amap/personal-map)\n- [Amap SDK skills repository](https://github.com/amap-demo/amap-sdk-skills)\n- [Amap Open Platform](https://lbs.amap.com/)\n- [Seasonal Checklist](references/seasonal.md)\n- [Examples](examples.md)\n\n## Skill Output:\n\n**Output Type(s):** [Markdown, Shell commands, Configuration instructions, API calls, Files, Guidance]\n\n**Output Format:** [Markdown itinerary with tables, inline shell commands, QR image path, and fallback map link]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May create a temporary QR image file and depends on Amap API responses and current official travel information.]\n\n## Skill Version(s):\n\n1.0.3 (source: server release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nArchive v1.0.2: 7 files, 22418 bytes\n\nFiles: examples.md (7806b), README_CN.md (2343b), README.md (2528b), references/seasonal.md (7149b), skill-card.md (2860b), SKILL.md (22538b), _meta.json (136b)\n\nFile v1.0.2:SKILL.md\n\n---\r\nname: road-trip-planner\r\ndescription: >\r\n  基于高德地图 personal-map skill 规划多日自驾游路线，生成连续路线个人地图小程序二维码，并输出每日行程详情。当用户提到自驾、公路旅行、路线规划、旅游行程、生成地图、规划环线、控制驾驶时间或查询沿途里程时使用。支持闭合环线设计和跨天里程补全。\r\n  Plan multi-day road trip routes using Amap APIs. Generate continuous-route personal map QR codes and daily itinerary details. Triggered when users mention road trips, route planning, travel itineraries, map generation, loop routes, driving time control, or mileage queries. Supports closed-loop design and cross-day mileage completion. (China only — requires Amap API Key and @lbs-amap/personal-map skill)\r\n---\n\r\n# Road Trip Planner / 自驾游路线规划\r\n\r\n> China only — 本 skill 基于高德地图 API，仅适用于中国大陆地区。  \r\n> Dependency: [@lbs-amap/personal-map](https://clawhub.ai/lbs-amap/personal-map) (ClawHub) / [GitHub](https://github.com/amap-demo/amap-sdk-skills)\r\n\r\n## Trigger Conditions / 触发条件\r\n\r\nTrigger when the user has any of these intents:\r\n\r\n当用户出现以下任意意图时，主动调用本 skill：\r\n\r\n- Plan a road trip / road trip route / loop route (规划自驾游路线 / 公路旅行 / 环线)\r\n- Design a travel itinerary involving multi-city driving (设计涉及多地驾驶的旅游行程)\r\n- Generate a personal map / travel map / route QR code (生成个人地图 / 旅游地图 / 路线二维码)\r\n- Control daily driving time / avoid fatigued driving (控制每日驾驶时间 / 避免疲劳驾驶)\r\n- Query mileage, gas stations, hospitals along the route (查询沿途里程、加油站、医院等补给点)\r\n\r\n## Dependencies / 前置依赖\r\n\r\n| Dependency | Source | Description |\r\n|-----------|--------|-------------|\r\n| `lbs-amap/personal-map` | [ClawHub](https://clawhub.ai/lbs-amap/personal-map) | Amap Web Service API wrapper / 高德 Web 服务 API 封装。安装命令：`openclaw skills install personal-map`。提供 `AMapPersonalMapClient` 类（import 路径 `scripts.amap_personal_map_client`），本仓库自身不含该脚本。 |\r\n| Amap API Key | [Amap Open Platform](https://lbs.amap.com/) | Required env var: `AMAP_API_KEY` / 需配置环境变量 |\r\n\r\n### Dependency Availability Check / 依赖可用性检查\r\n\r\nBefore any API call, verify that the `personal-map` skill is installed and the API key is configured. If either is missing, stop and tell the user what's needed — do not attempt to proceed.\r\n\r\n在任何 API 调用之前，先检查 `personal-map` skill 是否已安装以及 API Key 是否已配置。任一缺失则停止并告知用户缺失项，不要尝试继续。\r\n\r\n```\r\nChecklist / 检查清单:\r\n1. personal-map skill installed? → No → 提示: \"请先安装 personal-map skill，运行: openclaw skills install personal-map\"\r\n2. AMAP_API_KEY set? → No → 提示: \"请先配置高德 API Key，获取地址 https://lbs.amap.com/\"\n3. AMapPersonalMapClient importable? → No → 提示: \"personal-map skill 版本可能不兼容，请确认其提供 AMapPersonalMapClient 类\"\n```\n\nSet the environment variable in the active shell; never put a real key in the skill or source code:\n\n```bash\n# macOS / Linux\nexport AMAP_API_KEY='your_key'\n\n# PowerShell\n$env:AMAP_API_KEY = 'your_key'\n\n# Windows cmd\nset \"AMAP_API_KEY=your_key\"\n```\n\r\n## Core Principles / 核心原则\r\n\r\n1. **No fatigued driving / 不疲劳驾驶**：Keep daily actual driving time under 6 hours; 4–5 hours is a planning target, while short sightseeing or transfer days may be shorter. For high-altitude, mountainous, or winding roads, further reduce driving time.（每日实际驾驶时间控制在 6 小时以内；4-5 小时是规划目标，纯玩或短途换乘日可更短。高原、山区、弯道多的路段进一步压缩。）\n\r\n2. **Continuous route / 连续路线**：Merge all daily waypoints into one continuous route, either a closed loop or with a clear endpoint.（所有天的节点合并为一条连续路线，首尾闭合或明确终点。）\r\n\r\n3. **Closed loop / 闭合环线**：If start and end are the same city, ensure the endpoint is preserved after deduplication.（如果起点和终点是同一城市，确保终点节点在去重后仍然保留在路线末尾。）\r\n\r\n4. **Daily flexibility / 每日弹性**：Leave buffer room in the itinerary; avoid over-scheduling.（行程中保留机动空间，避免把时间排得太满。）\r\n\r\n## Workflow / 工作流程\r\n\r\n### Step 1: Confirm itinerary framework / 确认行程框架\r\n\r\nConfirm with the user:\r\n- Start point, end point (loop or not)\r\n- Total number of days\r\n- Must-visit attractions / cities\n- Travel season (affects road conditions and accommodation)\n- Exact departure dates, vehicle type, and any driving/health constraints when safety or road choice depends on them\n\r\n与用户确认以下信息：起点、终点（是否环线）、总天数、必去景点/途经城市、出发季节、准确出发日期、车型及会影响路线选择的驾驶/健康限制。\n\nIf the date is unspecified, provide a provisional seasonal plan and explicitly mark the real-time checks as pending.\n\r\n### Step 2: Design daily waypoints / 设计每日节点\r\n\r\nSplit waypoints by day following these rules:\r\n- Target 4–6 hours of driving per day, never exceed 6 hours; short sightseeing or transfer days may be shorter\n- Each day's `points` list includes the core locations passed that day\r\n- The end city of each day must also serve as the start point for the next day (for mileage calculation)\r\n\r\n按天拆分节点：每天驾驶 4-6 小时，不超过 6 小时；每天的 points 列表包含当天途经的核心地点；终点城市需同时作为下一天的起点。\r\n\r\n### Step 3: Call Amap APIs / 调用高德 API\r\n\r\nUses `AMapPersonalMapClient` provided by the `personal-map` skill. The class is at `scripts.amap_personal_map_client` inside that skill's directory — this is the canonical import path. This repo itself contains no scripts.\r\n\r\n```python\r\nimport os\r\nfrom scripts.amap_personal_map_client import AMapPersonalMapClient\r\n\r\n# Check API key BEFORE creating client\r\napi_key = os.getenv(\"AMAP_API_KEY\")\r\nif not api_key:\n    print(\"AMAP_API_KEY not set. Get a key at https://lbs.amap.com/ and run:\")\n    print(\"  Set AMAP_API_KEY in your active shell (see Dependencies above).\")\n    # stop here — do not proceed\r\n\r\n# Create client (auto-reads AMAP_API_KEY from env):\r\nclient = AMapPersonalMapClient()\r\n# Or pass explicitly: client = AMapPersonalMapClient(api_key=\"your_key\")\r\n```\r\n\r\n**Normalize every response before using it.** The client does not raise API failures, but a failure can be either an error dict or an error dict as the first item of a list (for example, POI search). Always check both shapes:\n\n```python\ndef api_error_message(result):\n    if isinstance(result, dict) and \"error\" in result:\n        return result.get(\"message\", str(result[\"error\"]))\n    if (\n        isinstance(result, list)\n        and result\n        and isinstance(result[0], dict)\n        and \"error\" in result[0]\n    ):\n        return result[0].get(\"message\", str(result[0][\"error\"]))\n    return None\n\ngeo = client.maps_geo(\"北京市朝阳区\", \"北京\")\nif error := api_error_message(geo):\n    # Stop handling this location; never reuse another location's coordinates.\n    raise ValueError(f\"Cannot resolve this location: {error}\")\n\n# Convert external fields once. All later workflow steps use only this shape.\npoint = {\n    \"name\": \"地点名称\",\n    \"lon\": float(geo[\"longitude\"]),\n    \"lat\": float(geo[\"latitude\"]),\n    \"poiId\": \"\",             # fill from the verified POI-search result\n    \"required\": False,         # True for the start, end, and user must-visit points\n}\n```\n\r\nFor each location:\r\n1. `maps_geo(address, city)` — get precise coordinates. Pass the city name as second arg for better accuracy.\r\n2. `maps_text_search(keywords, city, offset=5)` — get poiId. Use `offset=5` to limit results (API default is 20).\r\n3. Verify search result coordinates are within 30km of geo coordinates to prevent cross-city mismatches\r\n4. `time.sleep(0.3)` between API calls to avoid QPS throttling\r\n\r\n对每个地点执行：`maps_geo` 获取坐标 → 立即标准化为 `lon`/`lat` → `maps_text_search` 获取 poiId → 验证距离 < 30km → sleep 0.3s。后续步骤不得直接混用 API 返回的 `longitude`/`latitude` 与内部 `lon`/`lat` 字段。\n\n**Error handling / 错误处理**：\n- If `AMapPersonalMapClient` is not found → check the pre-flight checklist in the Dependencies section, inform user, and **stop**\n- If `AMAP_API_KEY` is empty → inform user and **stop**\n- For every response → call `api_error_message()` before reading result fields\n- If `maps_geo` fails → do not substitute a previous coordinate. Stop QR generation when this is a start, end, or must-visit point; otherwise list the optional point as unresolved and exclude it from routing\n- If `maps_text_search` fails or has no result within 30km → retry with `{city_name} {location_name}`. For a required point, stop QR generation and ask the user to disambiguate; for an optional point, retain it only in the text itinerary as unresolved and do not give it a fake poiId\n- If QPS exceeded (`CUQPS_HAS_EXCEEDED_THE_LIMIT` in error message) → wait 1s and retry once\n\r\n#### 3.1 Supply point search per day / 每日补给搜索\r\n\r\nAfter all waypoint coordinates are resolved, search for supply points near key nodes on **days that enter sparsely populated areas or have long uninterrupted stretches**:\r\n\r\n对于进入人烟稀少区域或存在长距离无补给路段的日期，在关键节点附近搜索补给点：\r\n\r\n```python\r\n# For each day flagging a supply concern (long stretch, remote area):\r\n# Search gas stations and hospitals near the day's midpoint or last town before uninhabited area\r\nresult = client.maps_around_search(\r\n    keywords=\"加油站|医院\",\r\n    location=f\"{lon},{lat}\",    # \"经度,纬度\" 格式\r\n    radius=5000,               # 搜索半径 5km（默认 1000m）\r\n    offset=5\r\n)\r\nif error := api_error_message(result):\n    print(f\"补给搜索失败: {error}\")\n```\r\n\r\n**When to search / 何时搜索**：\r\n| Condition / 条件 | Action / 动作 |\r\n|------------------|---------------|\r\n| Day mileage > 300km / 日里程超 300km | Search gas stations at midpoint / 在中点搜索加油站 |\r\n| Entering uninhabited area (>100km no town) / 进入无人区（>100km 无城镇） | Search all supply points at the last town before entry / 在进入前最后城镇搜索全部补给点 |\r\n| High-altitude segment (>3500m) / 高海拔路段（>3500m） | Search hospitals at the nearest low-altitude town / 在最近的低海拔城镇搜索医院 |\r\n| All days / 每天 | Search at least one hospital near the day's endpoint (overnight city) / 在每天终点城市至少搜索一家医院 |\r\n\r\n### Step 4: Driving route planning with cross-day completion / 驾车路径规划（跨天补全）\r\n\r\nWhen calculating daily mileage, **must** insert the previous day's endpoint as the start of the current day's points list:\r\n\r\n```python\r\nfor i, day in enumerate(days):\r\n    points = [p for p in day[\"points\"] if \"lon\" in p]\r\n    if i > 0:\r\n        prev = [p for p in days[i-1][\"points\"] if \"lon\" in p]\r\n        if prev:\r\n            points.insert(0, prev[-1])\r\n    # Drive segment by segment using maps_direction_driving:\r\n    #   For each adjacent pair in points, call:\r\n    #     result = client.maps_direction_driving(\r\n    #         origin=f\"{points[j]['lon']},{points[j]['lat']}\",\r\n    #         destination=f\"{points[j+1]['lon']},{points[j+1]['lat']}\"\r\n    #     )\r\n    #   Sum distances for the day's total.\r\n    #   Parameter format: \"longitude,latitude\" (no spaces).\r\n```\r\n\r\n计算每日里程时，**必须**把前一天的终点插入当天 points 列表头部作为起点。\r\n`maps_direction_driving` 的 `origin` / `destination` 参数格式为 `\"经度,纬度\"`（逗号分隔，无空格）。\r\n\r\n### Step 5: Generate personal map QR code / 生成个人地图二维码\r\n\r\n#### 5.1 Collect valid points / 收集有效点\r\n\r\nCollect only normalized points with a non-empty verified `poiId`. Preserve insertion order (day-by-day). Before collecting, confirm that all required points (start, end, user must-visits) resolved successfully. If any did not, do not generate a QR code that claims to be the complete route.\n\n收集所有天的有效点（已标准化且 poiId 已验证），按天顺序保持插入顺序。收集前必须确认起点、终点和用户必去点均已解析；任一失败时不得生成声称完整的二维码路线。\n\n#### 5.2 Deduplicate by identity / 按身份去重\n\r\nRules (apply in order):\r\n\r\n1. **Identity / 身份**：Use `poiId` as the primary identity. Only when no poiId is available for a non-QR text item, treat points as duplicates when their coordinates are within a small tolerance; never deduplicate by name alone.\n2. **Closed-loop anchor / 环线锚点**：If the first and last points have the same identity, keep both, and remove only middle occurrences of that identity. This ensures the route stays closed.\n3. **Intermediate duplicates / 中间重复**：For all other repeated identities, keep the first occurrence and remove later ones. Keep the day-by-day itinerary data unchanged; this rule applies only to the QR route list.\n4. **Adjacent duplicates / 连续重复**：Remove one only when two adjacent QR points have the same identity. Do not infer a duplicate solely because their display names match.\n\r\n```\r\nDeduplication flow:\n  identities = [p[\"poiId\"] for p in points]\n  if len(identities) < 2:\n      → stop; do not generate a route QR code\n  elif identities[0] == identities[-1]:\n      → keep points[0] and points[-1], remove middle occurrences of this identity\n  else:\n      → for all repeated identities, keep first occurrence and remove rest\n```\r\n\r\n#### 5.3 Trim to ≤ 16 nodes / 精简至 ≤ 16 节点\r\n\r\nIf the deduplicated list exceeds 16 nodes, trim using this priority order:\r\n\r\n| Priority | Keep | Drop |\r\n|----------|------|------|\r\n| 1 (highest) | Start and end points (环路锚点) | — |\r\n| 2 | User-specified must-visit attractions | — |\r\n| 3 | Major scenic spots / landmarks (景点/地标) | Rest stops, service areas (服务区) |\r\n| 4 | Geographically isolated nodes (唯一覆盖该区域的点) | Dense urban clusters (keep 1 per city) |\r\n| 5 | POI with verified poiId | Optional unresolved POI (text itinerary only; never add to QR route) |\n\r\n**Geographic distribution principle / 地理分布原则**：When choosing between nodes of equal priority, prefer nodes that are farther apart (ensure the route visually represents the full journey). Avoid dropping the only node in a sparse region.\r\n\r\n**Minimum trim / 最小精简**：Only remove as many nodes as needed to reach 16. Never remove the start or end anchor.\r\n\r\n#### 5.4 Data integrity before calling API / 调用 API 前的数据完整性\r\n\r\n```python\r\n# Build lineList structure\r\npoint_info_list = [\r\n    {\"name\": p[\"name\"], \"lon\": p[\"lon\"], \"lat\": p[\"lat\"], \"poiId\": p[\"poiId\"]}\r\n    for p in deduplicated_points\r\n]\r\nline_list = [{\r\n    \"title\": \"Route Name / 路线名称\",\r\n    \"pointInfoList\": point_info_list\r\n}]\r\n\r\n# Validate before calling maps_schema_personal_map\r\nif len(point_info_list) > 16:\n    raise ValueError(f\"Still {len(point_info_list)} nodes, must be ≤ 16\")\nif len(point_info_list) < 2:\n    raise ValueError(\"A route QR code needs at least a resolved start and end point\")\nif any(not p[\"poiId\"] for p in point_info_list):\n    raise ValueError(\"Empty poiId found\")\n```\r\n\r\n#### 5.5 Call API and download QR / 调用 API 并下载二维码\r\n\r\n```python\r\nresult = client.maps_schema_personal_map(\r\n    orgName=\"路线名称\",\r\n    lineList=line_list,\r\n    sceneType=3          # 3 = route planning mode (仅创建路线)\r\n)\r\n\r\n# Check for API errors before reading result fields\nif error := api_error_message(result):\n    print(f\"地图生成失败: {error}\")\n    # fallback: output the coordinates as text so user can manually create route\r\nelse:\r\n    qr_url = result[\"qr_code_url\"]\r\n    # Download QR image:\r\n    import urllib.request\r\n    qr_path = \"/tmp/road_trip_qr.png\"\r\n    urllib.request.urlretrieve(qr_url, qr_path)\r\n    # Display inline using the local absolute path:\n    # ![路线地图](/tmp/road_trip_qr.png)\n    # Fallback link: [在 Amap 中打开](qr_url)\r\n```\r\n\r\n1. Call `maps_schema_personal_map` with `sceneType=3` (route planning mode / 仅创建路线)\r\n2. Check for error in result dict (no exceptions thrown)\r\n3. Download QR code image and display inline\r\n4. Always include the fallback URL link\r\n\r\n收集已验证节点 → 按 poiId/坐标身份去重（保留闭环首尾）→ 构建 lineList → 按优先级精简至 ≤ 16 节点 → 数据完整性校验 → 调用 `maps_schema_personal_map`(sceneType=3) → 检查错误 → 下载二维码 → 显示备用链接。\n\r\n### Step 6: Output Markdown itinerary / 输出 Markdown 行程表\r\n\r\nOutput directly in the conversation as Markdown, including:\r\n- Itinerary overview table (day, route, mileage, duration, road type, attractions) with total row\r\n- Daily detailed itinerary (waypoints table with coordinates and altitude, supply points)\r\n- Practical tips (altitude sickness, road conditions, tickets, temperature, seasonal notes)\r\n- QR code image and fallback link\n\n在对话中直接输出 Markdown：行程概览表格（含总里程合计行）、每日详细行程（含海拔和补给点）、实用提示、二维码图片和备用链接。\n\n### Step 6.1: Verify date-sensitive facts / 核验时效信息\n\nBefore presenting a final itinerary, verify the route against the actual departure dates. Static seasonal guidance and route-planning API results are not proof that a road, attraction, or service is currently available.\n\n出最终行程前，必须按准确出发日期核验。静态季节提示和路径规划 API 结果均不能证明道路、景区或服务设施当前可用。\n\n- Check official traffic/road-authority notices for closures, controls, and weather-related restrictions\n- Check current weather warnings for high-altitude, mountain, desert, or remote segments\n- Check attraction opening status, ticket/reservation rules, and holiday calendar/traffic-freeway policy for that year\n- Mark each unavailable source as `未核验` rather than inferring a current status; advise the user to recheck immediately before departure\n\r\n## Key Constraints / 关键约束\r\n\r\n| Constraint / 约束 | Description / 说明 |\r\n|-------------------|-------------------|\r\n| Dependency check / 依赖检查 | Before any API call, verify `personal-map` skill is installed AND `AMAP_API_KEY` is set. Fail fast with clear user-facing messages if missing. |\r\n| Max nodes per route / 单条路线节点上限 | Amap `lineList` max 16 nodes per `pointInfoList` |\r\n| poiId required / poiId 必填 | `maps_schema_personal_map` requires non-empty poiId |\r\n| poiId strategy / poiId 获取策略 | `maps_text_search` first → retry with city name. Required points must resolve; optional unresolved points stay in text only and never receive a fake poiId. |\n| API error pattern / API 错误模式 | API failures do not throw. Check an error dict or an error dict in the first list item before reading result fields. |\n| QPS limit / QPS 限制 | ≥ 0.3s interval between calls, or `CUQPS_HAS_EXCEEDED_THE_LIMIT` |\r\n| API Key / API Key | Set `AMAP_API_KEY` env var (auto-read by `AMapPersonalMapClient()` with no args) or pass explicitly |\r\n| Region / 地域限制 | China only — Amap (高德) covers mainland China |\r\n| External dependency / 外部依赖 | This repo contains no scripts. `AMapPersonalMapClient` lives in the `personal-map` skill at `scripts.amap_personal_map_client`. Install via `openclaw skills install personal-map`. |\r\n\r\n## Output Template / 输出模板\r\n\r\n```markdown\r\n# [Route Name] Road Trip Guide / 自驾行程指南\r\n\r\n> Start/End: [City]　> Total: ~X km　> Days: X　> Max Altitude: ~Xm\r\n\r\n## Itinerary Overview / 行程概览\r\n\r\n| Day | Route | Est. Mileage | Est. Duration | Road Type | Key Attractions |\r\n|-----|-------|-------------|--------------|-----------|-----------------|\r\n| Day 1 | ... | ... | ... | 高速/国道/山路 | ... |\r\n| **Total** | — | **X km** | **~X h** | — | — |\r\n\r\n## Daily Itinerary / 每日详细行程\r\n\r\n### Day 1: [Title]\r\n- **Driving mileage**: X km (高速 Xkm / 国道 Xkm / 山路 Xkm)\r\n- **Driving duration**: ~X hours\r\n- **Max altitude**: ~Xm (仅高原线路标注 / only for high-altitude routes)\r\n\r\n**Waypoints / 途经点**：\r\n| # | Name | Coordinates (lon, lat) | Altitude | Note |\n|---|------|------------|----------|------|\r\n| 1 | ... | (lon, lat) | ~Xm | ... |\n\r\n**Supply points / 沿途补给**：\r\n- ⛽ Gas stations / 加油站: [name] at [location]\r\n- 🏥 Hospitals / 医院: [name] at [location]\r\n\r\n## Practical Tips / 实用提示\r\n1. **Altitude sickness / 高原反应**：...（高海拔线路必须包含 / required for routes >3000m）\r\n2. **Road conditions / 路况**：...\r\n3. **Tickets & booking / 门票与预订**：...\r\n4. **Temperature & clothing / 温差与衣物**：...\r\n\r\n## Personal Map QR Code / 个人地图二维码\r\n![Route Name](/absolute/path/to/road_trip_qr.png)\n> Fallback link / 备用链接: [Open in Amap](url)\r\n```\r\n\r\n## Advanced Capabilities / 进阶能力\r\n\r\n- **Supply point search / 沿途补给搜索**：Integrated into Step 3.1 — conditions and API calls are defined there. / 已集成到 Step 3.1，按条件触发。\r\n- **Mileage anomaly troubleshooting / 里程异常排查**：If a day's mileage is 0 or obviously wrong, check whether the previous day's endpoint was correctly inserted (Step 4 cross-day completion), and whether coordinates are duplicated.\r\n- **Seasonal adjustments / 季节性调整**：For routes affected by holidays, winter closures, rainy seasons, high altitude, desert heat, or peak tourism windows, read [references/seasonal.md](references/seasonal.md) before finalizing the itinerary, then complete Step 6.1 with current official sources.\n\r\n## References / 参考\r\n\r\n- Full examples: [examples.md](examples.md)\n- Seasonal and regional risk checklist: [references/seasonal.md](references/seasonal.md)\n- Underlying API: [@lbs-amap/personal-map](https://clawhub.ai/lbs-amap/personal-map) skill\n\nFile v1.0.2:README.md\n\n# Road Trip Planner\r\n\r\nA multi-day road trip planning tool based on the Amap personal-map skill.\r\n\r\n> China only — requires Amap API Key  \r\n> Dependency: [@lbs-amap/personal-map](https://clawhub.ai/lbs-amap/personal-map)  \r\n> [中文版本](README_CN.md)\r\n\r\n## Features\r\n\r\n- Design reasonable multi-day road trip itineraries with controlled daily driving time (recommended 4–6 hours)\r\n- Automatically call Amap Web Service APIs for geocoding, POI search, and driving route planning\r\n- Generate QR codes for personal maps that can be opened in the Amap App\r\n- Output daily itinerary guides in Markdown format\r\n- Support closed-loop route design with automatic cross-day mileage completion\r\n\r\n## Use Cases\r\n\r\nThis skill triggers automatically when users mention any of the following:\r\n- Planning a road trip route / road trip / loop route\r\n- Designing a travel itinerary involving multi-city driving\r\n- Generating personal maps / travel maps / route QR codes\r\n- Controlling daily driving time / avoiding fatigued driving\r\n- Querying mileage, gas stations, hospitals, and other supply points along the route\r\n\r\n## Installation\r\n\r\n```bash\r\nopenclaw skills install personal-map\r\n```\r\n\r\n## Prerequisites\r\n\r\n- [@lbs-amap/personal-map](https://clawhub.ai/lbs-amap/personal-map) skill ([GitHub](https://github.com/amap-demo/amap-sdk-skills) — Amap API wrapper)\r\n- Amap Open Platform Web Service API Key (set env var `AMAP_API_KEY`)\r\n\r\n## Core Principles\r\n\r\n1. **No fatigued driving**: Keep actual daily driving time under 6 hours, ideally 4–5 hours\r\n2. **Continuous route**: Merge all daily waypoints into a single continuous route\r\n3. **Closed loop**: If start and end are the same city, ensure the endpoint is preserved after deduplication\r\n4. **Daily flexibility**: Leave buffer room in the itinerary; avoid over-scheduling\r\n\r\n## File Structure\r\n\r\n```\r\nroad-trip-planner/\r\n├── SKILL.md         # Main guidance document\n├── references/      # Conditional references loaded only when needed\n├── examples.md      # Examples (Mongolia East, Qinghai-Gansu, Western Sichuan)\n├── README.md        # This file (English)\r\n├── README_CN.md     # Chinese version\r\n├── CLAUDE.md        # Developer reference\r\n├── LICENSE          # MIT license\r\n└── .gitignore\r\n```\r\n\r\n## Examples\r\n\r\nSee [examples.md](examples.md) for the following cases:\r\n- Hulunbuir 8-day loop (Mongolia East)\r\n- Qinghai-Gansu Grand Loop 9-day road trip\r\n- Western Sichuan Mini Loop 5-day road trip\r\n\r\n## License\r\n\r\nMIT\n\nFile v1.0.2:_meta.json\n\n{\n  \"ownerId\": \"kn7e2sj8mgfpnxr8gpfdwafh4n887ea7\",\n  \"slug\": \"road-trip-planner\",\n  \"version\": \"1.0.2\",\n  \"publishedAt\": 1783752424426\n}\n\nFile v1.0.2:references/seasonal.md\n\n# Seasonal Checklist / 季节性检查清单\n\nUse this reference when planning routes affected by holidays, winter closures, rainy seasons, high altitude, desert heat, or peak tourism windows.\n\n> **通用提醒**：本文件仅提供季节性趋势，不代表当前路况、开放状态、法定假日安排或高速免费政策。暑期（7–8 月）通常是全国旺季；国庆前后热门线路通常拥挤。最终行程必须按出发日期核验官方交通、天气、景区和节假日信息。\n> **General rule**: This file is seasonal guidance, not live status. Verify official traffic, weather, attraction, and holiday information for the actual departure dates before finalizing.\n\n## 节假日影响 / Holiday Impact\n\n> 农历节日（春节、清明、端午、中秋）每年公历日期不同，规划时请确认当年具体日期。  \n> Lunar-calendar holidays shift each year — confirm exact dates when planning.\n\n| 节假日 Holiday | 时间 When | 天数 | 自驾影响 Road Trip Impact |\n|---------------|-----------|------|--------------------------|\n| **元旦** New Year | 当年官方安排 | 以官方安排为准 | 短途游小高峰，景区中等拥挤，高速免费政策以当年安排为准 |\n| **寒假** Winter Break | 1–2月 | 约1月 | 学生家庭出游季，三亚/西双版纳/北海等暖冬目的地旺，东北冰雪游旺季 |\n| **春节** Spring Festival | 农历正月前后，以官方安排为准 | 以官方安排为准 | 全国性出行最高峰之一；高速免费政策、商家营业和服务设施以当年公告为准 |\n| **清明** Qingming | 清明节前后，以官方安排为准 | 以官方安排为准 | 短途踏青高峰；高速免费政策和局部交通管制以当年公告为准 |\n| **五一** Labor Day | 5月上旬，以官方安排为准 | 以官方安排为准 | 仅次于国庆的出行高峰；热门票/住宿需早订，限流和高速政策以当年公告为准 |\n| **端午** Dragon Boat | 农历五月，以官方安排为准 | 以官方安排为准 | 短途游为主；高速政策以当年公告为准，南方雨季注意山路 |\n| **暑期** Summer Vacation | 7–8月 | 约2月 | 全国旺季，家庭出游主力，住宿全线紧张，景区排队严重；西北/高原线路集中出行 |\n| **中秋** Mid-Autumn | 农历八月，以官方安排为准 | 以官方安排为准 | 短途探亲为主；若与国庆连休，出行量会明显增加 |\n| **国庆** National Day | 10月上旬，以官方安排为准 | 以官方安排为准 | 全年最大出行高峰；高速免费政策、景区限流和住宿价格以当年实时信息为准 |\n| **胡杨林季** Ejina Poplar | 10月初–10月中 | 约2周 | 额济纳/酒泉/塔里木胡杨林景区周边住宿极端紧张（提前 1 月+），价格数倍上涨 |\n| **林芝桃花节** Nyingchi Peach | 3月底–4月中 | 约3周 | 林芝/波密住宿紧张，G318 川藏线早春进藏车流增多 |\n\n## 分区域季节风险 / Seasonal Risks by Region\n\n> 下表按区域列出四季关键风险。暑期和法定节假日叠加效应请同时参考上方节假日表。  \n> The table below lists key seasonal risks by region. Cross-reference with the holiday calendar above for compound effects (e.g., summer vacation + regional rainy season).\n\n| Region / 区域 | Best / 最佳 | 冬 11–3月 | 春 3–5月 | 夏 6–8月 | 秋 9–10月 |\n|---------------|-------------|-----------|----------|----------|-----------|\n| **川西** Western Sichuan | 9–10月 | 垭口积雪封路，备防滑链 / passes closed by snow, carry chains | 残雪渐融，3–4月金川梨花 | G318/G317 雨季塌方泥石流 / landslides | 摄影黄金季，10月中下旬可能降雪 |\n| **G318 川藏线** Sichuan-Tibet Hwy | 5月, 9–10月 | 折多山/东达山暗冰，交通管制 / black ice at high passes | 林芝桃花(3–4月)，然乌湖最美，垭口仍有残雪 | 通麦/海通沟塌方，住宿翻倍 / mudslides, lodging 2× | 最佳进藏窗口，国庆住宿极端紧张 |\n| **稻城亚丁** Daocheng Yading | 9–10月 | 牛奶海结冰，景区可能限流 / iced lakes, restricted access | 4–5月杜鹃花季，但草甸未全绿 | 雨季山路泥泞，冲古寺至洛绒牛场段注意 | 最佳季节，10月中下旬降雪，国庆人流最大 |\n| **西藏阿里** Tibet Ngari | 9–10月 | 极寒，非铺装路封闭，客栈歇业，加油站 200–300km | 部分路段仍封闭，不建议 / still closed | 雨季泥泞，医疗匮乏，建议备卫星电话 / satellite phone advised | 最佳但夜间骤降，全年需备副油 / carry spare fuel |\n| **珠峰线** Everest Base Camp | 4–5月, 9–10月 | 夜间 -20~-30°C，但晴空视野最佳 / coldest but clearest views | 最佳窗口，旺季价高，需边防证 | 季风遮挡珠峰，进山道路雨季 / monsoon obscures peak | 国庆后人流骤减，性价比高 / fewer crowds |\n| **G109 青藏线** Qinghai-Tibet Hwy | 9–10月 | 唐古拉/昆仑山口积雪，200km+ 无人区，极寒 | 冻土开始融化，路面不平 / thawing permafrost | 冻土翻浆波浪路，大货车密集，高反是#1风险 | 最佳季节，冻土回冻路面改善，国庆车流叠加 |\n| **青海 / 祁连** Qinghai | 7–9月 | 青海湖结冰草原枯黄，祁连垭口封路 | 沙尘暴，青海湖 3月前仍结冰 | 油菜花(7月)，祁连草原最佳，门源花期短 | 摄影黄金季，夜间寒冷，10月中下旬可能降雪 |\n| **甘南** Gannan | 6–8月 | 垭口积雪，扎尕那可能关闭 / passes closed | 草甸未青，干燥多风 / meadows still brown | 若尔盖/桑科草原最佳，雨季山路注意 | 9月秋景最佳，国庆住宿紧张 |\n| **甘肃河西走廊** Hexi Corridor | 5–6月, 9–10月 | 极寒干燥，部分景区淡季维护 / extreme cold, some sites closed | 沙尘暴高发，能见度骤降 / sandstorms | 40°C+ 暴晒，莫高窟票极紧张(提前1月约) | 最佳窗口，国庆人流爆炸 |\n| **新疆北疆** N. Xinjiang | 6–8月 | <-30°C 不适合普通自驾 / too cold for regular vehicles | 融雪期泥泞，不推荐 / muddy, not recommended | 伊犁草原最佳，旺季住宿紧张 | 喀纳斯/禾木秋景(9月底–10月初)，国庆人最多 |\n| **独库公路** Duku Highway | 6–9月 | 封闭 | 5月底视除雪进度开放 | 全段开放，旺季车多 | 10月初降雪后封闭 / closes after first snow |\n| **新疆沙漠公路** Desert Highways | 4–5月, 9–10月 | 寒冷但可通行 / cold but passable | 沙尘暴，能见度近零，飞沙伤车漆 | 路面 70°C+，爆胎风险，200km+ 无补给，备副油+补胎工具 | 最佳窗口，昼夜温差大 |\n| **滇西北** NW Yunnan | 4–5月, 9–10月 | 白马雪山积雪结冰，丽江-香格里拉段注意 | 干燥多风，草甸未青 | 虎跳峡/梅里路段塌方，山路泥泞 | 天气稳定，国庆人流多 |\n| **蒙东呼伦贝尔** Hulunbuir | 6–9月 | <-30°C，草原枯黄封路，不推荐自驾 / not recommended | 草原未绿，不建议 / still brown | 草原绿色最佳窗口，恩和/室韦/黑山头住宿紧 | 9月中起草原枯黄，国庆最后一波 |\n\nFile v1.0.2:examples.md\n\n# Road Trip Planner Examples / 示例\r\n\r\n## Example 1: Hulunbuir (Mongolia East) 8-Day Loop / 蒙东呼伦贝尔 8 日自驾环线\r\n\r\n**User input**: Help me plan an 8-day road trip route in Mongolia East. / 帮我生成一个蒙东自驾 8 日游的路线。\r\n\r\n**Design approach / 设计思路**：\r\n- Start/End: Hailar (closed loop) / 起点/终点：海拉尔（闭合环线）\r\n- Total: ~1000–1100km / 总里程约 1000-1100km\r\n- Daily driving: 2–4 hours, relaxed pace / 每日驾驶 2-4 小时，节奏舒缓\r\n- Classic Hulunbuir Grand Loop covering grasslands, wetlands, forests, border areas, and lakes / 经典呼伦贝尔大环线，涵盖草原、湿地、森林、边境、湖泊多种地貌\r\n\r\n**Route / 路线节点**：\r\n\r\n| Day | Route / 路线 | Mileage / 里程 | Duration / 时长 |\r\n|-----|-------------|---------------|-----------------|\r\n| Day 1 | Hailar → Morigele River → Erguna / 海拉尔 → 莫日格勒河 → 额尔古纳 | 154km | 2.0h |\r\n| Day 2 | Erguna → Wetland → Birch Forest → Enhe / 额尔古纳 → 湿地 → 白桦林 → 恩和 | 99km | 1.7h |\r\n| Day 3 | Enhe → Shiwei → Linjiang / 恩和 → 室韦 → 临江 | 80km | 1.5h |\r\n| Day 4 | Linjiang → Laoyingzui → Taiping → Mordaga / 临江 → 老鹰嘴 → 太平 → 莫尔道嘎 | 38km | 0.7h |\r\n| Day 5 | Mordaga → Aoluguya → Genhe / 莫尔道嘎 → 敖鲁古雅 → 根河 | 120km | 2.0h |\r\n| Day 6 | Genhe → Erguna → Heishantou / 根河 → 额尔古纳 → 黑山头 | 210km | 3.0h |\r\n| Day 7 | Heishantou → 186 Ribbon River → Manzhouli / 黑山头 → 186 彩带河 → 满洲里 | 170km | 1.8h |\r\n| Day 8 | Manzhouli → Hulun Lake → Hailar / 满洲里 → 呼伦湖 → 海拉尔 | 186km | 2.0h |\r\n\r\n**Core map nodes (16) / 核心地图节点（16 个）**：\r\nHailar Airport, Morigele River, Erguna City, Erguna Wetland, Birch Forest Scenic Area, Enhe Russian Ethnic Village, Shiwei Port, Linjiang Village, Laoyingzui, Mordaga National Forest Park, Aoluguya Reindeer Tribe, Genhe City, Heishantou Town, Manzhouli National Gate, Hulun Lake, Hailar Airport\n\r\n**Output / 输出结果**：\r\n- Personal map QR code (16-node closed loop, Hailar at both start and end) / 个人地图小程序二维码（16 个节点闭合环线）\r\n- Markdown itinerary guide (with gas station and hospital POI search along route) / Markdown 行程指南\r\n\r\n**Special notes / 特别提示**：\r\n- Some sections (e.g., Linjiang to Mordaga) have weak cell signal — download offline maps in advance / 蒙东地区部分路段（如临江至莫尔道嘎）手机信号较弱，建议提前下载离线地图\r\n- August peak season — book accommodation in Erguna, Shiwei, and Heishantou early / 8 月旺季住宿紧张\r\n\r\n---\r\n\r\n## Example 2: Qinghai-Gansu Grand Loop 9-Day Road Trip / 青甘大环线 9 日自驾\r\n\r\n**User input**: Plan a Qinghai-Gansu Grand Loop road trip starting from Xining. Consider daily driving time and avoid fatigued driving. / 给我规划一个西宁出发的青甘大环线自驾行程，记得考虑每日自驾时长，不要疲劳驾驶。\r\n\r\n**Design approach / 设计思路**：\r\n- Start/End: Xining (loop) / 起点/终点：西宁（环线）\r\n- Total: ~2200–2600km / 总里程约 2200-2600km\r\n- Daily driving: 4–6 hours；Day 5 is a Dunhuang city rest day / 每日驾驶 4-6 小时，Day 5 敦煌市区纯玩驾驶极少\r\n- Day 8 drives through Qilian Mountain pass (high altitude, winding roads) — driving time compressed to ~5h with buffer / Day 8 穿越祁连山区，海拔高弯道多，驾驶时间需额外压缩\r\n\r\n**Route / 路线节点**：\r\n\r\n| Day | Route / 路线 | Mileage / 里程 | Duration / 时长 |\r\n|-----|-------------|---------------|-----------------|\r\n| Day 1 | Xining → Ta'er Monastery → Qinghai Lake / 西宁 → 塔尔寺 → 青海湖 | 276km | 4.7h |\r\n| Day 2 | Qinghai Lake → Chaka Salt Lake → Delingha / 青海湖 → 茶卡盐湖 → 德令哈 | 370km | 4.7h |\r\n| Day 3 | Delingha → Emerald Lake → Dachaidan / 德令哈 → 翡翠湖 → 大柴旦 | 206km | 2.4h |\r\n| Day 4 | Dachaidan → Nanbaxian → Dangjin Pass → Aksay / 大柴旦 → 南八仙 → 当金山 → 阿克塞 | 265km | 3.3h |\r\n| Day 5 | Aksay → Dunhuang → Mingsha Mountain / 阿克塞 → 敦煌 → 鸣沙山月牙泉 | 85km | 1.7h |\r\n| Day 6 | Dunhuang → Mogao Caves → Jiayuguan / 敦煌 → 莫高窟 → 嘉峪关 | 409km | 4.6h |\r\n| Day 7 | Jiayuguan → Rainbow Danxia → Zhangye / 嘉峪关 → 七彩丹霞 → 张掖 | 263km | 4.4h |\r\n| Day 8 | Zhangye → Biandukou → Qilian Grassland → Menyuan / 张掖 → 扁都口 → 祁连草原 → 门源 | 280km | 5.0h |\r\n| Day 9 | Menyuan → Datong → Xining / 门源 → 大通 → 西宁 | 150km | 2.5h |\r\n\r\n**Core map nodes (16) / 核心地图节点（16 个）**：\nXining City, Ta'er Monastery, Qinghai Lake, Chaka Salt Lake, Delingha City, Dachaidan Emerald Lake, Dachaidan Town, Aksay Kazakh Autonomous County, Dunhuang City, Mingsha Mountain Crescent Spring, Mogao Caves, Jiayuguan Fortress, Zhangye Rainbow Danxia, Qilian Mountain Grassland, Menyuan, Xining City\n\r\n**Output / 输出结果**：\r\n- Personal map QR code (closed loop, 16 nodes with Xining preserved at both start and end)\n- Markdown itinerary guide (with altitude sickness, Mogao Caves tickets, temperature tips)\r\n\r\n---\r\n\r\n## Example 3: Western Sichuan Mini Loop 5-Day Road Trip / 川西小环线 5 日自驾\r\n\r\n**User input**: Plan a Western Sichuan mini loop starting from Chengdu, around 5 days, not too much driving. / 规划一个成都出发的川西小环线，5 天左右，不要开太久。\r\n\r\n**Design approach / 设计思路**：\r\n- Start/End: Chengdu (closed loop) / 起点/终点：成都（闭合环线）\r\n- Total: ~900–1000km / 总里程约 900-1000km\r\n- Altitude changes dramatically (500m → 4000m) with dense curves — daily driving relaxed to 3–5 hours / 川西海拔变化剧烈（500m → 4000m），弯道密集，驾驶时间需额外放宽至 3-5 小时/天\r\n- 5-day moderate pace: snow mountains and grasslands without rushing / 5 天节奏适中，既能看雪山草原，又不会太赶\r\n\r\n**Route / 路线节点**：\r\n\r\n| Day | Route / 路线 | Mileage / 里程 | Duration / 时长 |\r\n|-----|-------------|---------------|-----------------|\r\n| Day 1 | Chengdu → Dujiangyan → Mount Siguniang / 成都 → 都江堰 → 四姑娘山 | 200km | 4.0h |\r\n| Day 2 | Mount Siguniang → Danba Jiaju Tibetan Village / 四姑娘山 → 丹巴甲居藏寨 | 120km | 3.0h |\r\n| Day 3 | Danba → Tagong Grassland → Xinduqiao / 丹巴 → 塔公草原 → 新都桥 | 150km | 3.5h |\r\n| Day 4 | Xinduqiao → Kangding → Hailuogou / 新都桥 → 康定 → 海螺沟 | 180km | 4.0h |\r\n| Day 5 | Hailuogou → Ya'an → Chengdu / 海螺沟 → 雅安 → 成都 | 280km | 4.0h |\r\n\r\n**Core map nodes (10) / 核心地图节点（10 个）**：\r\nChengdu City, Dujiangyan, Mount Siguniang, Danba Jiaju Tibetan Village, Tagong Grassland, Xinduqiao, Kangding City, Hailuogou, Ya'an City, Chengdu City\r\n\r\n**Output / 输出结果**：\r\n- Personal map QR code (closed loop)\r\n- Markdown itinerary guide (with altitude sickness prevention and mountain driving tips)\r\n\r\n**Special notes / 特别提示**：\r\n- Rapid altitude changes in Western Sichuan — avoid strenuous exercise at high altitude; prepare Rhodiola or oxygen canisters / 川西海拔变化大，初到高原避免剧烈运动，备好红景天或氧气瓶\r\n- Day 2–4 cross multiple high-altitude passes consecutively — take extra rest stops / 连续翻越多个高海拔垭口，建议途中多休息\r\n- Mid-to-late October is the best photography season at Xinduqiao, but watch for snow closures at Zheduo Mountain / 秋季（10 月中下旬）新都桥摄影最佳，但需留意折多山降雪封路\n\nFile v1.0.2:README_CN.md\n\n# Road Trip Planner（自驾游路线规划）\r\n\r\n> 仅限中国大陆 — 需高德 API Key  \r\n> 依赖: [@lbs-amap/personal-map](https://clawhub.ai/lbs-amap/personal-map)  \r\n> [English Version](README.md)\r\n\r\n基于高德地图 personal-map skill 的多日自驾游路线规划工具。\r\n\r\n## 功能\r\n\r\n- 设计合理的多日自驾行程，控制每日驾驶时间（建议 4-6 小时）\r\n- 自动调用高德 Web 服务 API 进行地理编码、POI 搜索和驾车路径规划\r\n- 生成可在高德地图 App 中打开的个人地图小程序二维码\r\n- 输出 Markdown 格式的每日行程指南\r\n- 支持闭合环线设计，自动处理跨天里程补全\r\n\r\n## 使用场景\r\n\r\n当用户提到以下任意话题时，本 skill 会自动触发：\r\n- 规划自驾游路线 / 公路旅行 / 环线\r\n- 设计旅游行程（涉及多地驾驶）\r\n- 生成个人地图 / 旅游地图 / 路线二维码\r\n- 控制每日驾驶时间 / 避免疲劳驾驶\r\n- 查询沿途里程、加油站、医院等补给点\r\n\r\n## 安装\r\n\r\n```bash\r\nopenclaw skills install personal-map\r\n```\r\n\r\n## 前置依赖\r\n\r\n- [@lbs-amap/personal-map](https://clawhub.ai/lbs-amap/personal-map) skill（[GitHub](https://github.com/amap-demo/amap-sdk-skills) — 高德地图 API 封装）\r\n- 高德开放平台 Web 服务 API Key（需配置环境变量 `AMAP_API_KEY`）\r\n\r\n## 核心原则\r\n\r\n1. **不疲劳驾驶**：每日实际驾驶时间控制在 6 小时以内，理想状态 4-5 小时\r\n2. **连续路线**：所有天的节点合并为一条连续路线\r\n3. **闭合环线**：如果起点和终点是同一城市，确保终点节点在去重后仍然保留\r\n4. **每日弹性**：行程中保留机动空间，避免把时间排得太满\r\n\r\n## 文件结构\r\n\r\n```\r\nroad-trip-planner/\r\n├── SKILL.md         # 主指导文档\n├── references/      # 按需加载的参考资料\n├── examples.md      # 示例（蒙东、青甘、川西）\n├── README.md        # 英文说明\r\n├── README_CN.md     # 本文件（中文说明）\r\n├── CLAUDE.md        # 开发者参考\r\n├── LICENSE          # MIT 许可证\r\n└── .gitignore\r\n```\r\n\r\n## 示例\r\n\r\n详见 [examples.md](examples.md)，包含以下案例：\r\n- 蒙东呼伦贝尔 8 日环线\r\n- 青甘大环线 9 日自驾\r\n- 川西小环线 5 日自驾\r\n\r\n## License\r\n\r\nMIT\n\nFile v1.0.2:skill-card.md\n\n## Description: <br>\nPlans multi-day road trip routes in mainland China using Amap APIs, generating personal-map QR codes and Markdown itinerary details. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[onlydreams](https://clawhub.ai/user/onlydreams) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users and agents use this skill to plan multi-day road trips in mainland China, control daily driving time, check route mileage and supply points, and produce Amap personal-map QR codes with a day-by-day itinerary. <br>\n\n### Deployment Geography for Use: <br>\nMainland China <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Route, destination, and itinerary locations are shared with Amap through the required API key. <br>\nMitigation: Use the skill only when Amap processing is acceptable, and avoid entering unusually sensitive travel plans. <br>\nRisk: The separate personal-map dependency and AMAP_API_KEY are required for API-backed route generation. <br>\nMitigation: Check that the dependency is installed and the API key is configured before making calls; stop with a clear user-facing message if either is missing. <br>\nRisk: Road conditions, weather, attraction access, and holiday travel policies are date-sensitive. <br>\nMitigation: Verify official traffic, weather, attraction, and holiday sources for the actual departure dates before presenting a final itinerary. <br>\nRisk: Incorrect or unresolved POI coordinates can produce misleading route QR codes. <br>\nMitigation: Require resolved start, end, and must-visit points with verified poiIds; keep optional unresolved points in text only and do not include them in QR routes. <br>\n\n\n## Reference(s): <br>\n- [Road Trip Planner on ClawHub](https://clawhub.ai/onlydreams/skills/road-trip-planner) <br>\n- [Amap personal-map dependency](https://clawhub.ai/lbs-amap/personal-map) <br>\n- [Amap Open Platform](https://lbs.amap.com/) <br>\n- [Full examples](examples.md) <br>\n- [Seasonal and regional risk checklist](references/seasonal.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance] <br>\n**Output Format:** [Markdown itinerary tables with inline code snippets, shell environment examples, QR image paths, and fallback links.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Requires the personal-map skill and AMAP_API_KEY; generated QR routes are limited to verified Amap POI nodes.] <br>\n\n## Skill Version(s): <br>\n1.0.2 (source: server release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v1.0.1: 9 files, 24722 bytes\n\nFiles: AGENTS.md (3414b), CLAUDE.md (3427b), examples.md (7793b), README_CN.md (2343b), README.md (2528b), references/seasonal.md (6833b), skill-card.md (2483b), SKILL.md (19087b), _meta.json (136b)\n\nFile v1.0.1:SKILL.md\n\n---\r\nname: road-trip-planner\r\ndescription: >\r\n  基于高德地图 personal-map skill 规划多日自驾游路线，生成连续路线个人地图小程序二维码，并输出每日行程详情。当用户提到自驾、公路旅行、路线规划、旅游行程、生成地图、规划环线、控制驾驶时间或查询沿途里程时使用。支持闭合环线设计和跨天里程补全。\r\n  Plan multi-day road trip routes using Amap APIs. Generate continuous-route personal map QR codes and daily itinerary details. Triggered when users mention road trips, route planning, travel itineraries, map generation, loop routes, driving time control, or mileage queries. Supports closed-loop design and cross-day mileage completion. (China only — requires Amap API Key and @lbs-amap/personal-map skill)\r\n---\n\r\n# Road Trip Planner / 自驾游路线规划\r\n\r\n> China only — 本 skill 基于高德地图 API，仅适用于中国大陆地区。  \r\n> Dependency: [@lbs-amap/personal-map](https://clawhub.ai/lbs-amap/personal-map) (ClawHub) / [GitHub](https://github.com/amap-demo/amap-sdk-skills)\r\n\r\n## Trigger Conditions / 触发条件\r\n\r\nTrigger when the user has any of these intents:\r\n\r\n当用户出现以下任意意图时，主动调用本 skill：\r\n\r\n- Plan a road trip / road trip route / loop route (规划自驾游路线 / 公路旅行 / 环线)\r\n- Design a travel itinerary involving multi-city driving (设计涉及多地驾驶的旅游行程)\r\n- Generate a personal map / travel map / route QR code (生成个人地图 / 旅游地图 / 路线二维码)\r\n- Control daily driving time / avoid fatigued driving (控制每日驾驶时间 / 避免疲劳驾驶)\r\n- Query mileage, gas stations, hospitals along the route (查询沿途里程、加油站、医院等补给点)\r\n\r\n## Dependencies / 前置依赖\r\n\r\n| Dependency | Source | Description |\r\n|-----------|--------|-------------|\r\n| `lbs-amap/personal-map` | [ClawHub](https://clawhub.ai/lbs-amap/personal-map) | Amap Web Service API wrapper / 高德 Web 服务 API 封装。安装命令：`openclaw skills install personal-map`。提供 `AMapPersonalMapClient` 类（import 路径 `scripts.amap_personal_map_client`），本仓库自身不含该脚本。 |\r\n| Amap API Key | [Amap Open Platform](https://lbs.amap.com/) | Required env var: `AMAP_API_KEY` / 需配置环境变量 |\r\n\r\n### Dependency Availability Check / 依赖可用性检查\r\n\r\nBefore any API call, verify that the `personal-map` skill is installed and the API key is configured. If either is missing, stop and tell the user what's needed — do not attempt to proceed.\r\n\r\n在任何 API 调用之前，先检查 `personal-map` skill 是否已安装以及 API Key 是否已配置。任一缺失则停止并告知用户缺失项，不要尝试继续。\r\n\r\n```\r\nChecklist / 检查清单:\r\n1. personal-map skill installed? → No → 提示: \"请先安装 personal-map skill，运行: openclaw skills install personal-map\"\r\n2. AMAP_API_KEY set? → No → 提示: \"请先配置高德 API Key: export AMAP_API_KEY=your_key，获取地址 https://lbs.amap.com/\"\r\n3. AMapPersonalMapClient importable? → No → 提示: \"personal-map skill 版本可能不兼容，请确认其提供 AMapPersonalMapClient 类\"\r\n```\r\n\r\n## Core Principles / 核心原则\r\n\r\n1. **No fatigued driving / 不疲劳驾驶**：Keep daily actual driving time under 6 hours, ideally 4–5 hours. For high-altitude, mountainous, or winding roads, further reduce driving time.（每日实际驾驶时间控制在 6 小时以内，理想状态 4-5 小时。高原、山区、弯道多的路段进一步压缩。）\r\n\r\n2. **Continuous route / 连续路线**：Merge all daily waypoints into one continuous route, either a closed loop or with a clear endpoint.（所有天的节点合并为一条连续路线，首尾闭合或明确终点。）\r\n\r\n3. **Closed loop / 闭合环线**：If start and end are the same city, ensure the endpoint is preserved after deduplication.（如果起点和终点是同一城市，确保终点节点在去重后仍然保留在路线末尾。）\r\n\r\n4. **Daily flexibility / 每日弹性**：Leave buffer room in the itinerary; avoid over-scheduling.（行程中保留机动空间，避免把时间排得太满。）\r\n\r\n## Workflow / 工作流程\r\n\r\n### Step 1: Confirm itinerary framework / 确认行程框架\r\n\r\nConfirm with the user:\r\n- Start point, end point (loop or not)\r\n- Total number of days\r\n- Must-visit attractions / cities\r\n- Travel season (affects road conditions and accommodation)\r\n\r\n与用户确认以下信息：起点、终点（是否环线）、总天数、必去景点/途经城市、出发季节。\r\n\r\nIf unspecified, proactively suggest reasonable defaults.\r\n\r\n### Step 2: Design daily waypoints / 设计每日节点\r\n\r\nSplit waypoints by day following these rules:\r\n- 4–6 hours of driving per day, never exceed 6 hours\r\n- Each day's `points` list includes the core locations passed that day\r\n- The end city of each day must also serve as the start point for the next day (for mileage calculation)\r\n\r\n按天拆分节点：每天驾驶 4-6 小时，不超过 6 小时；每天的 points 列表包含当天途经的核心地点；终点城市需同时作为下一天的起点。\r\n\r\n### Step 3: Call Amap APIs / 调用高德 API\r\n\r\nUses `AMapPersonalMapClient` provided by the `personal-map` skill. The class is at `scripts.amap_personal_map_client` inside that skill's directory — this is the canonical import path. This repo itself contains no scripts.\r\n\r\n```python\r\nimport os\r\nfrom scripts.amap_personal_map_client import AMapPersonalMapClient\r\n\r\n# Check API key BEFORE creating client\r\napi_key = os.getenv(\"AMAP_API_KEY\")\r\nif not api_key:\r\n    print(\"AMAP_API_KEY not set. Get a key at https://lbs.amap.com/ and run:\")\r\n    print(\"  export AMAP_API_KEY=your_key\")\r\n    # stop here — do not proceed\r\n\r\n# Create client (auto-reads AMAP_API_KEY from env):\r\nclient = AMapPersonalMapClient()\r\n# Or pass explicitly: client = AMapPersonalMapClient(api_key=\"your_key\")\r\n```\r\n\r\n**IMPORTANT**: All API methods return structured dicts on error, they do NOT throw exceptions. Always check for `\"error\"` key:\r\n\r\n```python\r\nresult = client.maps_geo(\"北京市朝阳区\", \"北京\")\r\nif isinstance(result, dict) and \"error\" in result:\r\n    print(f\"API error: {result['message']}\")\r\n    # handle error — do not assume result contains coordinates\r\n```\r\n\r\nFor each location:\r\n1. `maps_geo(address, city)` — get precise coordinates. Pass the city name as second arg for better accuracy.\r\n2. `maps_text_search(keywords, city, offset=5)` — get poiId. Use `offset=5` to limit results (API default is 20).\r\n3. Verify search result coordinates are within 30km of geo coordinates to prevent cross-city mismatches\r\n4. `time.sleep(0.3)` between API calls to avoid QPS throttling\r\n\r\n对每个地点执行：`maps_geo` 获取坐标 → `maps_text_search` 获取 poiId → 验证距离 < 30km → sleep 0.3s。\r\n\r\n**Error handling / 错误处理**：\r\n- If `AMapPersonalMapClient` is not found → check the pre-flight checklist in the Dependencies section, inform user, and **stop**\r\n- If `AMAP_API_KEY` is empty → inform user and **stop**\r\n- If API returns `{\"error\": ...}` → check `result[\"message\"]`, skip this location with a warning, use the previous valid result as fallback\r\n- If `maps_geo` returns error → skip this location with a warning\r\n- If `maps_text_search` returns error or no result within 30km → retry with `{city_name} {location_name}`, if still empty use placeholder `B000000000`\r\n- If QPS exceeded (`CUQPS_HAS_EXCEEDED_THE_LIMIT` in error message) → wait 1s and retry once\r\n\r\n#### 3.1 Supply point search per day / 每日补给搜索\r\n\r\nAfter all waypoint coordinates are resolved, search for supply points near key nodes on **days that enter sparsely populated areas or have long uninterrupted stretches**:\r\n\r\n对于进入人烟稀少区域或存在长距离无补给路段的日期，在关键节点附近搜索补给点：\r\n\r\n```python\r\n# For each day flagging a supply concern (long stretch, remote area):\r\n# Search gas stations and hospitals near the day's midpoint or last town before uninhabited area\r\nresult = client.maps_around_search(\r\n    keywords=\"加油站|医院\",\r\n    location=f\"{lon},{lat}\",    # \"经度,纬度\" 格式\r\n    radius=5000,               # 搜索半径 5km（默认 1000m）\r\n    offset=5\r\n)\r\nif isinstance(result, dict) and \"error\" in result:\r\n    print(f\"补给搜索失败: {result['message']}\")\r\n```\r\n\r\n**When to search / 何时搜索**：\r\n| Condition / 条件 | Action / 动作 |\r\n|------------------|---------------|\r\n| Day mileage > 300km / 日里程超 300km | Search gas stations at midpoint / 在中点搜索加油站 |\r\n| Entering uninhabited area (>100km no town) / 进入无人区（>100km 无城镇） | Search all supply points at the last town before entry / 在进入前最后城镇搜索全部补给点 |\r\n| High-altitude segment (>3500m) / 高海拔路段（>3500m） | Search hospitals at the nearest low-altitude town / 在最近的低海拔城镇搜索医院 |\r\n| All days / 每天 | Search at least one hospital near the day's endpoint (overnight city) / 在每天终点城市至少搜索一家医院 |\r\n\r\n### Step 4: Driving route planning with cross-day completion / 驾车路径规划（跨天补全）\r\n\r\nWhen calculating daily mileage, **must** insert the previous day's endpoint as the start of the current day's points list:\r\n\r\n```python\r\nfor i, day in enumerate(days):\r\n    points = [p for p in day[\"points\"] if \"lon\" in p]\r\n    if i > 0:\r\n        prev = [p for p in days[i-1][\"points\"] if \"lon\" in p]\r\n        if prev:\r\n            points.insert(0, prev[-1])\r\n    # Drive segment by segment using maps_direction_driving:\r\n    #   For each adjacent pair in points, call:\r\n    #     result = client.maps_direction_driving(\r\n    #         origin=f\"{points[j]['lon']},{points[j]['lat']}\",\r\n    #         destination=f\"{points[j+1]['lon']},{points[j+1]['lat']}\"\r\n    #     )\r\n    #   Sum distances for the day's total.\r\n    #   Parameter format: \"longitude,latitude\" (no spaces).\r\n```\r\n\r\n计算每日里程时，**必须**把前一天的终点插入当天 points 列表头部作为起点。\r\n`maps_direction_driving` 的 `origin` / `destination` 参数格式为 `\"经度,纬度\"`（逗号分隔，无空格）。\r\n\r\n### Step 5: Generate personal map QR code / 生成个人地图二维码\r\n\r\n#### 5.1 Collect valid points / 收集有效点\r\n\r\nCollect all points across all days that have a non-empty poiId (skip placeholder `B000000000`). Preserve insertion order (day-by-day).\r\n\r\n收集所有天的有效点（poiId 非空且非占位符 `B000000000`），按天顺序保持插入顺序。\r\n\r\n#### 5.2 Deduplicate by name / 按名称去重\r\n\r\nRules (apply in order):\r\n\r\n1. **Closed-loop anchor / 环线锚点**：If the first and last points have the same name AND this name also appears in the middle, keep the first AND last occurrence, remove the middle one(s). This ensures the route stays closed.\r\n2. **Intermediate duplicates / 中间重复**：For all other duplicate names, keep the **first** occurrence, remove subsequent ones.\r\n3. **Adjacent duplicates / 连续重复**：If two consecutive points share the same name, remove one (keep the earlier day's context). This happens when a day's endpoint equals the next day's start point due to cross-day completion.\r\n\r\n```\r\nDeduplication flow:\r\n  names = [p[\"name\"] for p in points]\r\n  if names[0] == names[-1]:\r\n      → keep points[0] and points[-1], remove middle occurrences of this name\r\n  for all other duplicates:\r\n      → keep first occurrence, remove rest\r\n```\r\n\r\n#### 5.3 Trim to ≤ 16 nodes / 精简至 ≤ 16 节点\r\n\r\nIf the deduplicated list exceeds 16 nodes, trim using this priority order:\r\n\r\n| Priority | Keep | Drop |\r\n|----------|------|------|\r\n| 1 (highest) | Start and end points (环路锚点) | — |\r\n| 2 | User-specified must-visit attractions | — |\r\n| 3 | Major scenic spots / landmarks (景点/地标) | Rest stops, service areas (服务区) |\r\n| 4 | Geographically isolated nodes (唯一覆盖该区域的点) | Dense urban clusters (keep 1 per city) |\r\n| 5 | POI with non-placeholder poiId | POI with placeholder poiId `B000000000` |\r\n\r\n**Geographic distribution principle / 地理分布原则**：When choosing between nodes of equal priority, prefer nodes that are farther apart (ensure the route visually represents the full journey). Avoid dropping the only node in a sparse region.\r\n\r\n**Minimum trim / 最小精简**：Only remove as many nodes as needed to reach 16. Never remove the start or end anchor.\r\n\r\n#### 5.4 Data integrity before calling API / 调用 API 前的数据完整性\r\n\r\n```python\r\n# Build lineList structure\r\npoint_info_list = [\r\n    {\"name\": p[\"name\"], \"lon\": p[\"lon\"], \"lat\": p[\"lat\"], \"poiId\": p[\"poiId\"]}\r\n    for p in deduplicated_points\r\n]\r\nline_list = [{\r\n    \"title\": \"Route Name / 路线名称\",\r\n    \"pointInfoList\": point_info_list\r\n}]\r\n\r\n# Validate before calling maps_schema_personal_map\r\nif len(point_info_list) > 16:\r\n    raise ValueError(f\"Still {len(point_info_list)} nodes, must be ≤ 16\")\r\nif any(p[\"poiId\"] == \"B000000000\" or not p[\"poiId\"] for p in point_info_list):\r\n    raise ValueError(\"Placeholder or empty poiId found\")\r\n```\r\n\r\n#### 5.5 Call API and download QR / 调用 API 并下载二维码\r\n\r\n```python\r\nresult = client.maps_schema_personal_map(\r\n    orgName=\"路线名称\",\r\n    lineList=line_list,\r\n    sceneType=3          # 3 = route planning mode (仅创建路线)\r\n)\r\n\r\n# Check for API errors (all methods return dict on error, no exceptions)\r\nif isinstance(result, dict) and \"error\" in result:\r\n    print(f\"地图生成失败: {result['message']}\")\r\n    # fallback: output the coordinates as text so user can manually create route\r\nelse:\r\n    qr_url = result[\"qr_code_url\"]\r\n    # Download QR image:\r\n    import urllib.request\r\n    qr_path = \"/tmp/road_trip_qr.png\"\r\n    urllib.request.urlretrieve(qr_url, qr_path)\r\n    # Display inline using the local absolute path:\n    # ![路线地图](/tmp/road_trip_qr.png)\n    # Fallback link: [在 Amap 中打开](qr_url)\r\n```\r\n\r\n1. Call `maps_schema_personal_map` with `sceneType=3` (route planning mode / 仅创建路线)\r\n2. Check for error in result dict (no exceptions thrown)\r\n3. Download QR code image and display inline\r\n4. Always include the fallback URL link\r\n\r\n收集有效点 → 按名称去重（按上述三条规则）→ 构建 lineList → 按优先级精简至 ≤ 16 节点 → 数据完整性校验 → 调用 `maps_schema_personal_map`(sceneType=3) → 检查错误 → 下载二维码 → 显示备用链接。\r\n\r\n### Step 6: Output Markdown itinerary / 输出 Markdown 行程表\r\n\r\nOutput directly in the conversation as Markdown, including:\r\n- Itinerary overview table (day, route, mileage, duration, road type, attractions) with total row\r\n- Daily detailed itinerary (waypoints table with coordinates and altitude, supply points)\r\n- Practical tips (altitude sickness, road conditions, tickets, temperature, seasonal notes)\r\n- QR code image and fallback link\r\n\r\n在对话中直接输出 Markdown：行程概览表格（含总里程合计行）、每日详细行程（含海拔和补给点）、实用提示、二维码图片和备用链接。\r\n\r\n## Key Constraints / 关键约束\r\n\r\n| Constraint / 约束 | Description / 说明 |\r\n|-------------------|-------------------|\r\n| Dependency check / 依赖检查 | Before any API call, verify `personal-map` skill is installed AND `AMAP_API_KEY` is set. Fail fast with clear user-facing messages if missing. |\r\n| Max nodes per route / 单条路线节点上限 | Amap `lineList` max 16 nodes per `pointInfoList` |\r\n| poiId required / poiId 必填 | `maps_schema_personal_map` requires non-empty poiId |\r\n| poiId strategy / poiId 获取策略 | `maps_text_search` first → retry with city name → fallback placeholder `B000000000` |\r\n| API error pattern / API 错误模式 | All API methods return `{\"error\": ..., \"message\": ...}` on failure — they do NOT throw exceptions. Always check for `\"error\"` key in every response. |\r\n| QPS limit / QPS 限制 | ≥ 0.3s interval between calls, or `CUQPS_HAS_EXCEEDED_THE_LIMIT` |\r\n| API Key / API Key | Set `AMAP_API_KEY` env var (auto-read by `AMapPersonalMapClient()` with no args) or pass explicitly |\r\n| Region / 地域限制 | China only — Amap (高德) covers mainland China |\r\n| External dependency / 外部依赖 | This repo contains no scripts. `AMapPersonalMapClient` lives in the `personal-map` skill at `scripts.amap_personal_map_client`. Install via `openclaw skills install personal-map`. |\r\n\r\n## Output Template / 输出模板\r\n\r\n```markdown\r\n# [Route Name] Road Trip Guide / 自驾行程指南\r\n\r\n> Start/End: [City]　> Total: ~X km　> Days: X　> Max Altitude: ~Xm\r\n\r\n## Itinerary Overview / 行程概览\r\n\r\n| Day | Route | Est. Mileage | Est. Duration | Road Type | Key Attractions |\r\n|-----|-------|-------------|--------------|-----------|-----------------|\r\n| Day 1 | ... | ... | ... | 高速/国道/山路 | ... |\r\n| **Total** | — | **X km** | **~X h** | — | — |\r\n\r\n## Daily Itinerary / 每日详细行程\r\n\r\n### Day 1: [Title]\r\n- **Driving mileage**: X km (高速 Xkm / 国道 Xkm / 山路 Xkm)\r\n- **Driving duration**: ~X hours\r\n- **Max altitude**: ~Xm (仅高原线路标注 / only for high-altitude routes)\r\n\r\n**Waypoints / 途经点**：\r\n| # | Name | Coordinates | Altitude | Note |\r\n|---|------|------------|----------|------|\r\n| 1 | ... | (lat, lng) | ~Xm | ... |\r\n\r\n**Supply points / 沿途补给**：\r\n- ⛽ Gas stations / 加油站: [name] at [location]\r\n- 🏥 Hospitals / 医院: [name] at [location]\r\n\r\n## Practical Tips / 实用提示\r\n1. **Altitude sickness / 高原反应**：...（高海拔线路必须包含 / required for routes >3000m）\r\n2. **Road conditions / 路况**：...\r\n3. **Tickets & booking / 门票与预订**：...\r\n4. **Temperature & clothing / 温差与衣物**：...\r\n\r\n## Personal Map QR Code / 个人地图二维码\r\n![Route Name](/absolute/path/to/road_trip_qr.png)\n> Fallback link / 备用链接: [Open in Amap](url)\r\n```\r\n\r\n## Advanced Capabilities / 进阶能力\r\n\r\n- **Supply point search / 沿途补给搜索**：Integrated into Step 3.1 — conditions and API calls are defined there. / 已集成到 Step 3.1，按条件触发。\r\n- **Mileage anomaly troubleshooting / 里程异常排查**：If a day's mileage is 0 or obviously wrong, check whether the previous day's endpoint was correctly inserted (Step 4 cross-day completion), and whether coordinates are duplicated.\r\n- **Seasonal adjustments / 季节性调整**：For routes affected by holidays, winter closures, rainy seasons, high altitude, desert heat, or peak tourism windows, read [references/seasonal.md](references/seasonal.md) before finalizing the itinerary.\n\r\n## References / 参考\r\n\r\n- Full examples: [examples.md](examples.md)\n- Seasonal and regional risk checklist: [references/seasonal.md](references/seasonal.md)\n- Underlying API: [@lbs-amap/personal-map](https://clawhub.ai/lbs-amap/personal-map) skill\n\nFile v1.0.1:README.md\n\n# Road Trip Planner\r\n\r\nA multi-day road trip planning tool based on the Amap personal-map skill.\r\n\r\n> China only — requires Amap API Key  \r\n> Dependency: [@lbs-amap/personal-map](https://clawhub.ai/lbs-amap/personal-map)  \r\n> [中文版本](README_CN.md)\r\n\r\n## Features\r\n\r\n- Design reasonable multi-day road trip itineraries with controlled daily driving time (recommended 4–6 hours)\r\n- Automatically call Amap Web Service APIs for geocoding, POI search, and driving route planning\r\n- Generate QR codes for personal maps that can be opened in the Amap App\r\n- Output daily itinerary guides in Markdown format\r\n- Support closed-loop route design with automatic cross-day mileage completion\r\n\r\n## Use Cases\r\n\r\nThis skill triggers automatically when users mention any of the following:\r\n- Planning a road trip route / road trip / loop route\r\n- Designing a travel itinerary involving multi-city driving\r\n- Generating personal maps / travel maps / route QR codes\r\n- Controlling daily driving time / avoiding fatigued driving\r\n- Querying mileage, gas stations, hospitals, and other supply points along the route\r\n\r\n## Installation\r\n\r\n```bash\r\nopenclaw skills install personal-map\r\n```\r\n\r\n## Prerequisites\r\n\r\n- [@lbs-amap/personal-map](https://clawhub.ai/lbs-amap/personal-map) skill ([GitHub](https://github.com/amap-demo/amap-sdk-skills) — Amap API wrapper)\r\n- Amap Open Platform Web Service API Key (set env var `AMAP_API_KEY`)\r\n\r\n## Core Principles\r\n\r\n1. **No fatigued driving**: Keep actual daily driving time under 6 hours, ideally 4–5 hours\r\n2. **Continuous route**: Merge all daily waypoints into a single continuous route\r\n3. **Closed loop**: If start and end are the same city, ensure the endpoint is preserved after deduplication\r\n4. **Daily flexibility**: Leave buffer room in the itinerary; avoid over-scheduling\r\n\r\n## File Structure\r\n\r\n```\r\nroad-trip-planner/\r\n├── SKILL.md         # Main guidance document\n├── references/      # Conditional references loaded only when needed\n├── examples.md      # Examples (Mongolia East, Qinghai-Gansu, Western Sichuan)\n├── README.md        # This file (English)\r\n├── README_CN.md     # Chinese version\r\n├── CLAUDE.md        # Developer reference\r\n├── LICENSE          # MIT license\r\n└── .gitignore\r\n```\r\n\r\n## Examples\r\n\r\nSee [examples.md](examples.md) for the following cases:\r\n- Hulunbuir 8-day loop (Mongolia East)\r\n- Qinghai-Gansu Grand Loop 9-day road trip\r\n- Western Sichuan Mini Loop 5-day road trip\r\n\r\n## License\r\n\r\nMIT\n\nFile v1.0.1:_meta.json\n\n{\n  \"ownerId\": \"kn7e2sj8mgfpnxr8gpfdwafh4n887ea7\",\n  \"slug\": \"road-trip-planner\",\n  \"version\": \"1.0.1\",\n  \"publishedAt\": 1780931848505\n}\n\nFile v1.0.1:references/seasonal.md\n\n# Seasonal Checklist / 季节性检查清单\n\nUse this reference when planning routes affected by holidays, winter closures, rainy seasons, high altitude, desert heat, or peak tourism windows.\n\n> **通用提醒**：暑期 (7–8月) 全国旺季，住宿提前 1–2 周预订、景区拥挤。国庆 (10.1–10.7) 各热门线路住宿极端紧张、价格翻倍，部分路段拥堵严重。  \n> **General rule**: Summer (Jul–Aug) = nationwide peak season — book 1–2 weeks ahead. National Day (Oct 1–7) = extreme crowding and price surges on all popular routes.\n\n## 节假日影响 / Holiday Impact\n\n> 农历节日（春节、清明、端午、中秋）每年公历日期不同，规划时请确认当年具体日期。  \n> Lunar-calendar holidays shift each year — confirm exact dates when planning.\n\n| 节假日 Holiday | 时间 When | 天数 | 自驾影响 Road Trip Impact |\n|---------------|-----------|------|--------------------------|\n| **元旦** New Year | 12.31–1.2 | 3天 | 短途游小高峰，景区中等拥挤，高速不免费 |\n| **寒假** Winter Break | 1–2月 | 约1月 | 学生家庭出游季，三亚/西双版纳/北海等暖冬目的地旺，东北冰雪游旺季 |\n| **春节** Spring Festival | 1月底–2月中 | 7–8天 | 全国性出行最高峰之一，高速免费，热门景区爆满，大部分商家歇业至初七，除夕/初一加油站可能休息 |\n| **清明** Qingming | 4月初 | 3天 | 短途踏青高峰，高速免费，城郊山路拥堵，墓地周边交通管制 |\n| **五一** Labor Day | 5.1–5.5 | 5天 | 仅次于国庆的出行高峰，高速免费，热门票/住宿需提前 1 月预订，景区限流常见 |\n| **端午** Dragon Boat | 5月底–6月 | 3天 | 短途游为主，高速不免费，影响相对较小；南方进入雨季注意山路 |\n| **暑期** Summer Vacation | 7–8月 | 约2月 | 全国旺季，家庭出游主力，住宿全线紧张，景区排队严重；西北/高原线路集中出行 |\n| **中秋** Mid-Autumn | 9月中–10月初 | 3天 | 短途探亲为主；若与国庆连休可形成 8 天+ 超长假期，出行量倍增 |\n| **国庆** National Day | 10.1–10.7 | 7天 | 全年最大出行高峰，高速免费，热门线路住宿翻 3–5 倍，部分景区限流劝返，G318/独库/青甘等拥堵严重 |\n| **胡杨林季** Ejina Poplar | 10月初–10月中 | 约2周 | 额济纳/酒泉/塔里木胡杨林景区周边住宿极端紧张（提前 1 月+），价格数倍上涨 |\n| **林芝桃花节** Nyingchi Peach | 3月底–4月中 | 约3周 | 林芝/波密住宿紧张，G318 川藏线早春进藏车流增多 |\n\n## 分区域季节风险 / Seasonal Risks by Region\n\n> 下表按区域列出四季关键风险。暑期和法定节假日叠加效应请同时参考上方节假日表。  \n> The table below lists key seasonal risks by region. Cross-reference with the holiday calendar above for compound effects (e.g., summer vacation + regional rainy season).\n\n| Region / 区域 | Best / 最佳 | 冬 11–3月 | 春 3–5月 | 夏 6–8月 | 秋 9–10月 |\n|---------------|-------------|-----------|----------|----------|-----------|\n| **川西** Western Sichuan | 9–10月 | 垭口积雪封路，备防滑链 / passes closed by snow, carry chains | 残雪渐融，3–4月金川梨花 | G318/G317 雨季塌方泥石流 / landslides | 摄影黄金季，10月中下旬可能降雪 |\n| **G318 川藏线** Sichuan-Tibet Hwy | 5月, 9–10月 | 折多山/东达山暗冰，交通管制 / black ice at high passes | 林芝桃花(3–4月)，然乌湖最美，垭口仍有残雪 | 通麦/海通沟塌方，住宿翻倍 / mudslides, lodging 2× | 最佳进藏窗口，国庆住宿极端紧张 |\n| **稻城亚丁** Daocheng Yading | 9–10月 | 牛奶海结冰，景区可能限流 / iced lakes, restricted access | 4–5月杜鹃花季，但草甸未全绿 | 雨季山路泥泞，冲古寺至洛绒牛场段注意 | 最佳季节，10月中下旬降雪，国庆人流最大 |\n| **西藏阿里** Tibet Ngari | 9–10月 | 极寒，非铺装路封闭，客栈歇业，加油站 200–300km | 部分路段仍封闭，不建议 / still closed | 雨季泥泞，医疗匮乏，建议备卫星电话 / satellite phone advised | 最佳但夜间骤降，全年需备副油 / carry spare fuel |\n| **珠峰线** Everest Base Camp | 4–5月, 9–10月 | 夜间 -20~-30°C，但晴空视野最佳 / coldest but clearest views | 最佳窗口，旺季价高，需边防证 | 季风遮挡珠峰，进山道路雨季 / monsoon obscures peak | 国庆后人流骤减，性价比高 / fewer crowds |\n| **G109 青藏线** Qinghai-Tibet Hwy | 9–10月 | 唐古拉/昆仑山口积雪，200km+ 无人区，极寒 | 冻土开始融化，路面不平 / thawing permafrost | 冻土翻浆波浪路，大货车密集，高反是#1风险 | 最佳季节，冻土回冻路面改善，国庆车流叠加 |\n| **青海 / 祁连** Qinghai | 7–9月 | 青海湖结冰草原枯黄，祁连垭口封路 | 沙尘暴，青海湖 3月前仍结冰 | 油菜花(7月)，祁连草原最佳，门源花期短 | 摄影黄金季，夜间寒冷，10月中下旬可能降雪 |\n| **甘南** Gannan | 6–8月 | 垭口积雪，扎尕那可能关闭 / passes closed | 草甸未青，干燥多风 / meadows still brown | 若尔盖/桑科草原最佳，雨季山路注意 | 9月秋景最佳，国庆住宿紧张 |\n| **甘肃河西走廊** Hexi Corridor | 5–6月, 9–10月 | 极寒干燥，部分景区淡季维护 / extreme cold, some sites closed | 沙尘暴高发，能见度骤降 / sandstorms | 40°C+ 暴晒，莫高窟票极紧张(提前1月约) | 最佳窗口，国庆人流爆炸 |\n| **新疆北疆** N. Xinjiang | 6–8月 | <-30°C 不适合普通自驾 / too cold for regular vehicles | 融雪期泥泞，不推荐 / muddy, not recommended | 伊犁草原最佳，旺季住宿紧张 | 喀纳斯/禾木秋景(9月底–10月初)，国庆人最多 |\n| **独库公路** Duku Highway | 6–9月 | 封闭 | 5月底视除雪进度开放 | 全段开放，旺季车多 | 10月初降雪后封闭 / closes after first snow |\n| **新疆沙漠公路** Desert Highways | 4–5月, 9–10月 | 寒冷但可通行 / cold but passable | 沙尘暴，能见度近零，飞沙伤车漆 | 路面 70°C+，爆胎风险，200km+ 无补给，备副油+补胎工具 | 最佳窗口，昼夜温差大 |\n| **滇西北** NW Yunnan | 4–5月, 9–10月 | 白马雪山积雪结冰，丽江-香格里拉段注意 | 干燥多风，草甸未青 | 虎跳峡/梅里路段塌方，山路泥泞 | 天气稳定，国庆人流多 |\n| **蒙东呼伦贝尔** Hulunbuir | 6–9月 | <-30°C，草原枯黄封路，不推荐自驾 / not recommended | 草原未绿，不建议 / still brown | 草原绿色最佳窗口，恩和/室韦/黑山头住宿紧 | 9月中起草原枯黄，国庆最后一波 |\n\nFile v1.0.1:AGENTS.md\n\n# AGENTS.md\n\nThis file provides guidance to Codex (Codex.ai/code) when working with code in this repository.\n\n## 项目概述\n\nCodex skill 仓库 — 基于高德地图 API 规划多日自驾游路线（仅限中国大陆）。\nSkill 定义在 `SKILL.md`，依赖 [@lbs-amap/personal-map](https://clawhub.ai/lbs-amap/personal-map) skill 和 `AMAP_API_KEY` 环境变量。\n本仓库不含脚本代码，API 客户端完全由外部 skill 提供。\n\n## 架构\n\n| 文件 | 职责 | 何时修改 |\n|------|------|---------|\n| `SKILL.md` | 权威 skill 定义：触发条件、完整工作流、约束表、输出模板 | 修改工作流、约束、模板 |\n| `examples.md` | 完整案例（蒙东 8 日、青甘 9 日、川西 5 日） | 修改或新增示例 |\n| `README.md` / `README_CN.md` | 中英文项目说明，面向用户的功能介绍 | 功能变化时同步更新 |\n\n修改原则：`SKILL.md` 是唯一的权威定义源。`AGENTS.md` 是本文件 — 开发者快速参考，不重复 `SKILL.md` 的细节。\n\n## 工作流速查\n\n详见 `SKILL.md` 的 Workflow 章节。快速记忆：\n\n1. 确认行程框架 → 2. 按天拆分节点（≤6h/天）→ 3. 高德 API（geo→search→验证→sleep，含补给搜索）→ 4. 跨天里程补全 → 5. 去重→精简至≤16→生成二维码 → 6. 输出 Markdown 行程表\n\n## 关键约束速查\n\n- **依赖检查**：API 调用前必须验证 `personal-map` skill + `AMAP_API_KEY`，缺失则 fail fast。安装命令：`openclaw skills install personal-map`\n- **API 错误模式**：所有 API 方法失败时返回 `{\"error\": ..., \"message\": ...}`，不抛异常。每次调用后检查 `\"error\"` key\n- **无本地脚本**：`AMapPersonalMapClient` 由外部 `personal-map` skill 提供，canonical import 路径为 `scripts.amap_personal_map_client`\n- **客户端构造**：`AMapPersonalMapClient()` 自动读取 `AMAP_API_KEY` 环境变量；也可显式传入 `AMapPersonalMapClient(api_key=\"...\")`\n- **≤16 节点**：高德个人地图限制，超限按优先级精简（详见 SKILL.md Step 5.3）\n- **poiId 策略**：`maps_text_search` → 城市名重试 → 占位符 `B000000000`\n- **QPS**：调用间隔 ≥ 0.3s，超限时 wait 1s 重试一次\n- **每日驾驶 ≤ 6h**：高原/山区进一步压缩至 4–5h\n\n## 常见问题（开发时参考）\n\n- **ImportError / AMapPersonalMapClient 找不到**：检查 personal-map skill 是否安装 (`openclaw skills install personal-map`)，canonical import 路径为 `from scripts.amap_personal_map_client import AMapPersonalMapClient`\n- **API 返回错误**：所有方法失败返回 dict 而非抛异常，始终检查 `\"error\"` key。常见错误：`CUQPS_HAS_EXCEEDED_THE_LIMIT`（等 1s 重试）、`API Key 缺失`（检查环境变量）\n- **某天里程为 0**：检查跨天补全（Step 4 — 前一天终点未插入当天头部）\n- **坐标跨城误匹配**：`maps_text_search` 结果与 `maps_geo` 坐标做距离验证（<30km）\n- **环线不闭合**：去重时保留首尾同名终点（Step 5.2），否则路线末尾缺失\n- **节点超过 16 个**：按 Step 5.3 优先级表精简，优先保留首尾锚点和用户指定景点\n- **示例数据不一致**：修改 examples.md 后需同步更新设计思路中的总里程范围和节点数\n- **新增功能**：先在 SKILL.md 设计工作流/约束，再修改 examples.md 补充案例，最后更新 README\n\nFile v1.0.1:CLAUDE.md\n\n# CLAUDE.md\n\nThis file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.\n\n## 项目概述\n\nClaude Code skill 仓库 — 基于高德地图 API 规划多日自驾游路线（仅限中国大陆）。\nSkill 定义在 `SKILL.md`，依赖 [@lbs-amap/personal-map](https://clawhub.ai/lbs-amap/personal-map) skill 和 `AMAP_API_KEY` 环境变量。\n本仓库不含脚本代码，API 客户端完全由外部 skill 提供。\n\n## 架构\n\n| 文件 | 职责 | 何时修改 |\n|------|------|---------|\n| `SKILL.md` | 权威 skill 定义：触发条件、完整工作流、约束表、输出模板 | 修改工作流、约束、模板 |\n| `examples.md` | 完整案例（蒙东 8 日、青甘 9 日、川西 5 日） | 修改或新增示例 |\n| `README.md` / `README_CN.md` | 中英文项目说明，面向用户的功能介绍 | 功能变化时同步更新 |\n\n修改原则：`SKILL.md` 是唯一的权威定义源。`CLAUDE.md` 是本文件 — 开发者快速参考，不重复 `SKILL.md` 的细节。\n\n## 工作流速查\n\n详见 `SKILL.md` 的 Workflow 章节。快速记忆：\n\n1. 确认行程框架 → 2. 按天拆分节点（≤6h/天）→ 3. 高德 API（geo→search→验证→sleep，含补给搜索）→ 4. 跨天里程补全 → 5. 去重→精简至≤16→生成二维码 → 6. 输出 Markdown 行程表\n\n## 关键约束速查\n\n- **依赖检查**：API 调用前必须验证 `personal-map` skill + `AMAP_API_KEY`，缺失则 fail fast。安装命令：`openclaw skills install personal-map`\n- **API 错误模式**：所有 API 方法失败时返回 `{\"error\": ..., \"message\": ...}`，不抛异常。每次调用后检查 `\"error\"` key\n- **无本地脚本**：`AMapPersonalMapClient` 由外部 `personal-map` skill 提供，canonical import 路径为 `scripts.amap_personal_map_client`\n- **客户端构造**：`AMapPersonalMapClient()` 自动读取 `AMAP_API_KEY` 环境变量；也可显式传入 `AMapPersonalMapClient(api_key=\"...\")`\n- **≤16 节点**：高德个人地图限制，超限按优先级精简（详见 SKILL.md Step 5.3）\n- **poiId 策略**：`maps_text_search` → 城市名重试 → 占位符 `B000000000`\n- **QPS**：调用间隔 ≥ 0.3s，超限时 wait 1s 重试一次\n- **每日驾驶 ≤ 6h**：高原/山区进一步压缩至 4–5h\n\n## 常见问题（开发时参考）\n\n- **ImportError / AMapPersonalMapClient 找不到**：检查 personal-map skill 是否安装 (`openclaw skills install personal-map`)，canonical import 路径为 `from scripts.amap_personal_map_client import AMapPersonalMapClient`\n- **API 返回错误**：所有方法失败返回 dict 而非抛异常，始终检查 `\"error\"` key。常见错误：`CUQPS_HAS_EXCEEDED_THE_LIMIT`（等 1s 重试）、`API Key 缺失`（检查环境变量）\n- **某天里程为 0**：检查跨天补全（Step 4 — 前一天终点未插入当天头部）\n- **坐标跨城误匹配**：`maps_text_search` 结果与 `maps_geo` 坐标做距离验证（<30km）\n- **环线不闭合**：去重时保留首尾同名终点（Step 5.2），否则路线末尾缺失\n- **节点超过 16 个**：按 Step 5.3 优先级表精简，优先保留首尾锚点和用户指定景点\n- **示例数据不一致**：修改 examples.md 后需同步更新设计思路中的总里程范围和节点数\n- **新增功能**：先在 SKILL.md 设计工作流/约束，再修改 examples.md 补充案例，最后更新 README\n\nFile v1.0.1:examples.md\n\n# Road Trip Planner Examples / 示例\r\n\r\n## Example 1: Hulunbuir (Mongolia East) 8-Day Loop / 蒙东呼伦贝尔 8 日自驾环线\r\n\r\n**User input**: Help me plan an 8-day road trip route in Mongolia East. / 帮我生成一个蒙东自驾 8 日游的路线。\r\n\r\n**Design approach / 设计思路**：\r\n- Start/End: Hailar (closed loop) / 起点/终点：海拉尔（闭合环线）\r\n- Total: ~1000–1100km / 总里程约 1000-1100km\r\n- Daily driving: 2–4 hours, relaxed pace / 每日驾驶 2-4 小时，节奏舒缓\r\n- Classic Hulunbuir Grand Loop covering grasslands, wetlands, forests, border areas, and lakes / 经典呼伦贝尔大环线，涵盖草原、湿地、森林、边境、湖泊多种地貌\r\n\r\n**Route / 路线节点**：\r\n\r\n| Day | Route / 路线 | Mileage / 里程 | Duration / 时长 |\r\n|-----|-------------|---------------|-----------------|\r\n| Day 1 | Hailar → Morigele River → Erguna / 海拉尔 → 莫日格勒河 → 额尔古纳 | 154km | 2.0h |\r\n| Day 2 | Erguna → Wetland → Birch Forest → Enhe / 额尔古纳 → 湿地 → 白桦林 → 恩和 | 99km | 1.7h |\r\n| Day 3 | Enhe → Shiwei → Linjiang / 恩和 → 室韦 → 临江 | 80km | 1.5h |\r\n| Day 4 | Linjiang → Laoyingzui → Taiping → Mordaga / 临江 → 老鹰嘴 → 太平 → 莫尔道嘎 | 38km | 0.7h |\r\n| Day 5 | Mordaga → Aoluguya → Genhe / 莫尔道嘎 → 敖鲁古雅 → 根河 | 120km | 2.0h |\r\n| Day 6 | Genhe → Erguna → Heishantou / 根河 → 额尔古纳 → 黑山头 | 210km | 3.0h |\r\n| Day 7 | Heishantou → 186 Ribbon River → Manzhouli / 黑山头 → 186 彩带河 → 满洲里 | 170km | 1.8h |\r\n| Day 8 | Manzhouli → Hulun Lake → Hailar / 满洲里 → 呼伦湖 → 海拉尔 | 186km | 2.0h |\r\n\r\n**Core map nodes (16) / 核心地图节点（16 个）**：\r\nHailar Airport, Morigele River, Erguna City, Erguna Wetland, Birch Forest Scenic Area, Enhe Russian Ethnic Village, Shiwei Port, Linjiang Village, Laoyingzui, Mordaga National Forest Park, Aoluguya Reindeer Tribe, Genhe City, Heishantou Town, Manzhouli National Gate, Hulun Lake, Hailar Airport\n\r\n**Output / 输出结果**：\r\n- Personal map QR code (16-node closed loop, Hailar at both start and end) / 个人地图小程序二维码（16 个节点闭合环线）\r\n- Markdown itinerary guide (with gas station and hospital POI search along route) / Markdown 行程指南\r\n\r\n**Special notes / 特别提示**：\r\n- Some sections (e.g., Linjiang to Mordaga) have weak cell signal — download offline maps in advance / 蒙东地区部分路段（如临江至莫尔道嘎）手机信号较弱，建议提前下载离线地图\r\n- August peak season — book accommodation in Erguna, Shiwei, and Heishantou early / 8 月旺季住宿紧张\r\n\r\n---\r\n\r\n## Example 2: Qinghai-Gansu Grand Loop 9-Day Road Trip / 青甘大环线 9 日自驾\r\n\r\n**User input**: Plan a Qinghai-Gansu Grand Loop road trip starting from Xining. Consider daily driving time and avoid fatigued driving. / 给我规划一个西宁出发的青甘大环线自驾行程，记得考虑每日自驾时长，不要疲劳驾驶。\r\n\r\n**Design approach / 设计思路**：\r\n- Start/End: Xining (loop) / 起点/终点：西宁（环线）\r\n- Total: ~2200–2600km / 总里程约 2200-2600km\r\n- Daily driving: 4–6 hours；Day 5 is a Dunhuang city rest day / 每日驾驶 4-6 小时，Day 5 敦煌市区纯玩驾驶极少\r\n- Day 8 drives through Qilian Mountain pass (high altitude, winding roads) — driving time compressed to ~5h with buffer / Day 8 穿越祁连山区，海拔高弯道多，驾驶时间需额外压缩\r\n\r\n**Route / 路线节点**：\r\n\r\n| Day | Route / 路线 | Mileage / 里程 | Duration / 时长 |\r\n|-----|-------------|---------------|-----------------|\r\n| Day 1 | Xining → Ta'er Monastery → Qinghai Lake / 西宁 → 塔尔寺 → 青海湖 | 276km | 4.7h |\r\n| Day 2 | Qinghai Lake → Chaka Salt Lake → Delingha / 青海湖 → 茶卡盐湖 → 德令哈 | 370km | 4.7h |\r\n| Day 3 | Delingha → Emerald Lake → Dachaidan / 德令哈 → 翡翠湖 → 大柴旦 | 206km | 2.4h |\r\n| Day 4 | Dachaidan → Nanbaxian → Dangjin Pass → Aksay / 大柴旦 → 南八仙 → 当金山 → 阿克塞 | 265km | 3.3h |\r\n| Day 5 | Aksay → Dunhuang → Mingsha Mountain / 阿克塞 → 敦煌 → 鸣沙山月牙泉 | 85km | 1.7h |\r\n| Day 6 | Dunhuang → Mogao Caves → Jiayuguan / 敦煌 → 莫高窟 → 嘉峪关 | 409km | 4.6h |\r\n| Day 7 | Jiayuguan → Rainbow Danxia → Zhangye / 嘉峪关 → 七彩丹霞 → 张掖 | 263km | 4.4h |\r\n| Day 8 | Zhangye → Biandukou → Qilian Grassland → Menyuan / 张掖 → 扁都口 → 祁连草原 → 门源 | 280km | 5.0h |\r\n| Day 9 | Menyuan → Datong → Xining / 门源 → 大通 → 西宁 | 150km | 2.5h |\r\n\r\n**Core map nodes (15) / 核心地图节点（15 个）**：\r\nXining City, Ta'er Monastery, Qinghai Lake, Chaka Salt Lake, Delingha City, Dachaidan Emerald Lake, Dachaidan Town, Aksay Kazakh Autonomous County, Dunhuang City, Mingsha Mountain Crescent Spring, Mogao Caves, Jiayuguan Fortress, Zhangye Rainbow Danxia, Qilian Mountain Grassland, Menyuan\r\n\r\n**Output / 输出结果**：\r\n- Personal map QR code (closed loop, 15 nodes — one slot left for user customization)\r\n- Markdown itinerary guide (with altitude sickness, Mogao Caves tickets, temperature tips)\r\n\r\n---\r\n\r\n## Example 3: Western Sichuan Mini Loop 5-Day Road Trip / 川西小环线 5 日自驾\r\n\r\n**User input**: Plan a Western Sichuan mini loop starting from Chengdu, around 5 days, not too much driving. / 规划一个成都出发的川西小环线，5 天左右，不要开太久。\r\n\r\n**Design approach / 设计思路**：\r\n- Start/End: Chengdu (closed loop) / 起点/终点：成都（闭合环线）\r\n- Total: ~900–1000km / 总里程约 900-1000km\r\n- Altitude changes dramatically (500m → 4000m) with dense curves — daily driving relaxed to 3–5 hours / 川西海拔变化剧烈（500m → 4000m），弯道密集，驾驶时间需额外放宽至 3-5 小时/天\r\n- 5-day moderate pace: snow mountains and grasslands without rushing / 5 天节奏适中，既能看雪山草原，又不会太赶\r\n\r\n**Route / 路线节点**：\r\n\r\n| Day | Route / 路线 | Mileage / 里程 | Duration / 时长 |\r\n|-----|-------------|---------------|-----------------|\r\n| Day 1 | Chengdu → Dujiangyan → Mount Siguniang / 成都 → 都江堰 → 四姑娘山 | 200km | 4.0h |\r\n| Day 2 | Mount Siguniang → Danba Jiaju Tibetan Village / 四姑娘山 → 丹巴甲居藏寨 | 120km | 3.0h |\r\n| Day 3 | Danba → Tagong Grassland → Xinduqiao / 丹巴 → 塔公草原 → 新都桥 | 150km | 3.5h |\r\n| Day 4 | Xinduqiao → Kangding → Hailuogou / 新都桥 → 康定 → 海螺沟 | 180km | 4.0h |\r\n| Day 5 | Hailuogou → Ya'an → Chengdu / 海螺沟 → 雅安 → 成都 | 280km | 4.0h |\r\n\r\n**Core map nodes (10) / 核心地图节点（10 个）**：\r\nChengdu City, Dujiangyan, Mount Siguniang, Danba Jiaju Tibetan Village, Tagong Grassland, Xinduqiao, Kangding City, Hailuogou, Ya'an City, Chengdu City\r\n\r\n**Output / 输出结果**：\r\n- Personal map QR code (closed loop)\r\n- Markdown itinerary guide (with altitude sickness prevention and mountain driving tips)\r\n\r\n**Special notes / 特别提示**：\r\n- Rapid altitude changes in Western Sichuan — avoid strenuous exercise at high altitude; prepare Rhodiola or oxygen canisters / 川西海拔变化大，初到高原避免剧烈运动，备好红景天或氧气瓶\r\n- Day 2–4 cross multiple high-altitude passes consecutively — take extra rest stops / 连续翻越多个高海拔垭口，建议途中多休息\r\n- Mid-to-late October is the best photography season at Xinduqiao, but watch for snow closures at Zheduo Mountain / 秋季（10 月中下旬）新都桥摄影最佳，但需留意折多山降雪封路\n\nFile v1.0.1:README_CN.md\n\n# Road Trip Planner（自驾游路线规划）\r\n\r\n> 仅限中国大陆 — 需高德 API Key  \r\n> 依赖: [@lbs-amap/personal-map](https://clawhub.ai/lbs-amap/personal-map)  \r\n> [English Version](README.md)\r\n\r\n基于高德地图 personal-map skill 的多日自驾游路线规划工具。\r\n\r\n## 功能\r\n\r\n- 设计合理的多日自驾行程，控制每日驾驶时间（建议 4-6 小时）\r\n- 自动调用高德 Web 服务 API 进行地理编码、POI 搜索和驾车路径规划\r\n- 生成可在高德地图 App 中打开的个人地图小程序二维码\r\n- 输出 Markdown 格式的每日行程指南\r\n- 支持闭合环线设计，自动处理跨天里程补全\r\n\r\n## 使用场景\r\n\r\n当用户提到以下任意话题时，本 skill 会自动触发：\r\n- 规划自驾游路线 / 公路旅行 / 环线\r\n- 设计旅游行程（涉及多地驾驶）\r\n- 生成个人地图 / 旅游地图 / 路线二维码\r\n- 控制每日驾驶时间 / 避免疲劳驾驶\r\n- 查询沿途里程、加油站、医院等补给点\r\n\r\n## 安装\r\n\r\n```bash\r\nopenclaw skills install personal-map\r\n```\r\n\r\n## 前置依赖\r\n\r\n- [@lbs-amap/personal-map](https://clawhub.ai/lbs-amap/personal-map) skill（[GitHub](https://github.com/amap-demo/amap-sdk-skills) — 高德地图 API 封装）\r\n- 高德开放平台 Web 服务 API Key（需配置环境变量 `AMAP_API_KEY`）\r\n\r\n## 核心原则\r\n\r\n1. **不疲劳驾驶**：每日实际驾驶时间控制在 6 小时以内，理想状态 4-5 小时\r\n2. **连续路线**：所有天的节点合并为一条连续路线\r\n3. **闭合环线**：如果起点和终点是同一城市，确保终点节点在去重后仍然保留\r\n4. **每日弹性**：行程中保留机动空间，避免把时间排得太满\r\n\r\n## 文件结构\r\n\r\n```\r\nroad-trip-planner/\r\n├── SKILL.md         # 主指导文档\n├── references/      # 按需加载的参考资料\n├── examples.md      # 示例（蒙东、青甘、川西）\n├── README.md        # 英文说明\r\n├── README_CN.md     # 本文件（中文说明）\r\n├── CLAUDE.md        # 开发者参考\r\n├── LICENSE          # MIT 许可证\r\n└── .gitignore\r\n```\r\n\r\n## 示例\r\n\r\n详见 [examples.md](examples.md)，包含以下案例：\r\n- 蒙东呼伦贝尔 8 日环线\r\n- 青甘大环线 9 日自驾\r\n- 川西小环线 5 日自驾\r\n\r\n## License\r\n\r\nMIT\n\nFile v1.0.1:skill-card.md\n\n## Description: <br>\nPlan multi-day road trip routes in mainland China using Amap APIs, generate continuous-route personal map QR codes, and produce daily itinerary details. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[onlydreams](https://clawhub.ai/user/onlydreams) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nTravelers and agents use this skill to design multi-day mainland China road trips with controlled daily driving time, route continuity, supply-point checks, and Amap personal-map QR output. <br>\n\n### Deployment Geography for Use: <br>\nMainland China <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Planned route locations are sent to Amap APIs during geocoding, POI search, route planning, and map generation. <br>\nMitigation: Use the skill only when sharing planned route locations with Amap is acceptable for the user and organization. <br>\nRisk: The skill requires an Amap API key and a dependent personal-map skill. <br>\nMitigation: Configure AMAP_API_KEY through the environment, avoid exposing the key in prompts or logs, and confirm the installed personal-map dependency is the intended one before use. <br>\nRisk: The skill may create or overwrite /tmp/road_trip_qr.png. <br>\nMitigation: Treat the QR image as temporary output and move or rename any existing file that must be preserved before running the workflow. <br>\n\n\n## Reference(s): <br>\n- [Road Trip Planner on ClawHub](https://clawhub.ai/onlydreams/road-trip-planner) <br>\n- [@lbs-amap/personal-map dependency](https://clawhub.ai/lbs-amap/personal-map) <br>\n- [Amap Open Platform](https://lbs.amap.com/) <br>\n- [Examples](examples.md) <br>\n- [Seasonal checklist](references/seasonal.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance, files] <br>\n**Output Format:** [Markdown itinerary with tables, inline shell setup guidance, route links, and a local QR image reference when generated] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May create or overwrite /tmp/road_trip_qr.png during use.] <br>\n\n## Skill Version(s): <br>\n1.0.1 (source: ClawHub release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v1.0.0: 3 files, 13530 bytes\n\nFiles: skill-card.md (2696b), SKILL.md (25198b), _meta.json (136b)\n\nFile v1.0.0:SKILL.md\n\n---\nname: road-trip-planner\ndescription: >\n  基于高德地图 personal-map skill 规划多日自驾游路线，生成连续路线个人地图小程序二维码，并输出每日行程详情。当用户提到自驾、公路旅行、路线规划、旅游行程、生成地图、规划环线、控制驾驶时间或查询沿途里程时使用。支持闭合环线设计和跨天里程补全。\n  Plan multi-day road trip routes using Amap APIs. Generate continuous-route personal map QR codes and daily itinerary details. Triggered when users mention road trips, route planning, travel itineraries, map generation, loop routes, driving time control, or mileage queries. Supports closed-loop design and cross-day mileage completion. (China only — requires Amap API Key and @lbs-amap/personal-map skill)\ndepends: lbs-amap/personal-map\nregion: China only\n---\n\n# Road Trip Planner / 自驾游路线规划\n\n> China only — 本 skill 基于高德地图 API，仅适用于中国大陆地区。  \n> Dependency: [@lbs-amap/personal-map](https://clawhub.ai/lbs-amap/personal-map) (ClawHub) / [GitHub](https://github.com/amap-demo/amap-sdk-skills)\n\n## Trigger Conditions / 触发条件\n\nTrigger when the user has any of these intents:\n\n当用户出现以下任意意图时，主动调用本 skill：\n\n- Plan a road trip / road trip route / loop route (规划自驾游路线 / 公路旅行 / 环线)\n- Design a travel itinerary involving multi-city driving (设计涉及多地驾驶的旅游行程)\n- Generate a personal map / travel map / route QR code (生成个人地图 / 旅游地图 / 路线二维码)\n- Control daily driving time / avoid fatigued driving (控制每日驾驶时间 / 避免疲劳驾驶)\n- Query mileage, gas stations, hospitals along the route (查询沿途里程、加油站、医院等补给点)\n\n## Dependencies / 前置依赖\n\n| Dependency | Source | Description |\n|-----------|--------|-------------|\n| `lbs-amap/personal-map` | [ClawHub](https://clawhub.ai/lbs-amap/personal-map) | Amap Web Service API wrapper / 高德 Web 服务 API 封装。安装命令：`openclaw skills install personal-map`。提供 `AMapPersonalMapClient` 类（import 路径 `scripts.amap_personal_map_client`），本仓库自身不含该脚本。 |\n| Amap API Key | [Amap Open Platform](https://lbs.amap.com/) | Required env var: `AMAP_API_KEY` / 需配置环境变量 |\n\n### Dependency Availability Check / 依赖可用性检查\n\nBefore any API call, verify that the `personal-map` skill is installed and the API key is configured. If either is missing, stop and tell the user what's needed — do not attempt to proceed.\n\n在任何 API 调用之前，先检查 `personal-map` skill 是否已安装以及 API Key 是否已配置。任一缺失则停止并告知用户缺失项，不要尝试继续。\n\n```\nChecklist / 检查清单:\n1. personal-map skill installed? → No → 提示: \"请先安装 personal-map skill，运行: openclaw skills install personal-map\"\n2. AMAP_API_KEY set? → No → 提示: \"请先配置高德 API Key: export AMAP_API_KEY=your_key，获取地址 https://lbs.amap.com/\"\n3. AMapPersonalMapClient importable? → No → 提示: \"personal-map skill 版本可能不兼容，请确认其提供 AMapPersonalMapClient 类\"\n```\n\n## Core Principles / 核心原则\n\n1. **No fatigued driving / 不疲劳驾驶**：Keep daily actual driving time under 6 hours, ideally 4–5 hours. For high-altitude, mountainous, or winding roads, further reduce driving time.（每日实际驾驶时间控制在 6 小时以内，理想状态 4-5 小时。高原、山区、弯道多的路段进一步压缩。）\n\n2. **Continuous route / 连续路线**：Merge all daily waypoints into one continuous route, either a closed loop or with a clear endpoint.（所有天的节点合并为一条连续路线，首尾闭合或明确终点。）\n\n3. **Closed loop / 闭合环线**：If start and end are the same city, ensure the endpoint is preserved after deduplication.（如果起点和终点是同一城市，确保终点节点在去重后仍然保留在路线末尾。）\n\n4. **Daily flexibility / 每日弹性**：Leave buffer room in the itinerary; avoid over-scheduling.（行程中保留机动空间，避免把时间排得太满。）\n\n## Workflow / 工作流程\n\n### Step 1: Confirm itinerary framework / 确认行程框架\n\nConfirm with the user:\n- Start point, end point (loop or not)\n- Total number of days\n- Must-visit attractions / cities\n- Travel season (affects road conditions and accommodation)\n\n与用户确认以下信息：起点、终点（是否环线）、总天数、必去景点/途经城市、出发季节。\n\nIf unspecified, proactively suggest reasonable defaults.\n\n### Step 2: Design daily waypoints / 设计每日节点\n\nSplit waypoints by day following these rules:\n- 4–6 hours of driving per day, never exceed 6 hours\n- Each day's `points` list includes the core locations passed that day\n- The end city of each day must also serve as the start point for the next day (for mileage calculation)\n\n按天拆分节点：每天驾驶 4-6 小时，不超过 6 小时；每天的 points 列表包含当天途经的核心地点；终点城市需同时作为下一天的起点。\n\n### Step 3: Call Amap APIs / 调用高德 API\n\nUses `AMapPersonalMapClient` provided by the `personal-map` skill. The class is at `scripts.amap_personal_map_client` inside that skill's directory — this is the canonical import path. This repo itself contains no scripts.\n\n```python\nimport os\nfrom scripts.amap_personal_map_client import AMapPersonalMapClient\n\n# Check API key BEFORE creating client\napi_key = os.getenv(\"AMAP_API_KEY\")\nif not api_key:\n    print(\"AMAP_API_KEY not set. Get a key at https://lbs.amap.com/ and run:\")\n    print(\"  export AMAP_API_KEY=your_key\")\n    # stop here — do not proceed\n\n# Create client (auto-reads AMAP_API_KEY from env):\nclient = AMapPersonalMapClient()\n# Or pass explicitly: client = AMapPersonalMapClient(api_key=\"your_key\")\n```\n\n**IMPORTANT**: All API methods return structured dicts on error, they do NOT throw exceptions. Always check for `\"error\"` key:\n\n```python\nresult = client.maps_geo(\"北京市朝阳区\", \"北京\")\nif isinstance(result, dict) and \"error\" in result:\n    print(f\"API error: {result['message']}\")\n    # handle error — do not assume result contains coordinates\n```\n\nFor each location:\n1. `maps_geo(address, city)` — get precise coordinates. Pass the city name as second arg for better accuracy.\n2. `maps_text_search(keywords, city, offset=5)` — get poiId. Use `offset=5` to limit results (API default is 20).\n3. Verify search result coordinates are within 30km of geo coordinates to prevent cross-city mismatches\n4. `time.sleep(0.3)` between API calls to avoid QPS throttling\n\n对每个地点执行：`maps_geo` 获取坐标 → `maps_text_search` 获取 poiId → 验证距离 < 30km → sleep 0.3s。\n\n**Error handling / 错误处理**：\n- If `AMapPersonalMapClient` is not found → check the pre-flight checklist in the Dependencies section, inform user, and **stop**\n- If `AMAP_API_KEY` is empty → inform user and **stop**\n- If API returns `{\"error\": ...}` → check `result[\"message\"]`, skip this location with a warning, use the previous valid result as fallback\n- If `maps_geo` returns error → skip this location with a warning\n- If `maps_text_search` returns error or no result within 30km → retry with `{city_name} {location_name}`, if still empty use placeholder `B000000000`\n- If QPS exceeded (`CUQPS_HAS_EXCEEDED_THE_LIMIT` in error message) → wait 1s and retry once\n\n#### 3.1 Supply point search per day / 每日补给搜索\n\nAfter all waypoint coordinates are resolved, search for supply points near key nodes on **days that enter sparsely populated areas or have long uninterrupted stretches**:\n\n对于进入人烟稀少区域或存在长距离无补给路段的日期，在关键节点附近搜索补给点：\n\n```python\n# For each day flagging a supply concern (long stretch, remote area):\n# Search gas stations and hospitals near the day's midpoint or last town before uninhabited area\nresult = client.maps_around_search(\n    keywords=\"加油站|医院\",\n    location=f\"{lon},{lat}\",    # \"经度,纬度\" 格式\n    radius=5000,               # 搜索半径 5km（默认 1000m）\n    offset=5\n)\nif isinstance(result, dict) and \"error\" in result:\n    print(f\"补给搜索失败: {result['message']}\")\n```\n\n**When to search / 何时搜索**：\n| Condition / 条件 | Action / 动作 |\n|------------------|---------------|\n| Day mileage > 300km / 日里程超 300km | Search gas stations at midpoint / 在中点搜索加油站 |\n| Entering uninhabited area (>100km no town) / 进入无人区（>100km 无城镇） | Search all supply points at the last town before entry / 在进入前最后城镇搜索全部补给点 |\n| High-altitude segment (>3500m) / 高海拔路段（>3500m） | Search hospitals at the nearest low-altitude town / 在最近的低海拔城镇搜索医院 |\n| All days / 每天 | Search at least one hospital near the day's endpoint (overnight city) / 在每天终点城市至少搜索一家医院 |\n\n### Step 4: Driving route planning with cross-day completion / 驾车路径规划（跨天补全）\n\nWhen calculating daily mileage, **must** insert the previous day's endpoint as the start of the current day's points list:\n\n```python\nfor i, day in enumerate(days):\n    points = [p for p in day[\"points\"] if \"lon\" in p]\n    if i > 0:\n        prev = [p for p in days[i-1][\"points\"] if \"lon\" in p]\n        if prev:\n            points.insert(0, prev[-1])\n    # Drive segment by segment using maps_direction_driving:\n    #   For each adjacent pair in points, call:\n    #     result = client.maps_direction_driving(\n    #         origin=f\"{points[j]['lon']},{points[j]['lat']}\",\n    #         destination=f\"{points[j+1]['lon']},{points[j+1]['lat']}\"\n    #     )\n    #   Sum distances for the day's total.\n    #   Parameter format: \"longitude,latitude\" (no spaces).\n```\n\n计算每日里程时，**必须**把前一天的终点插入当天 points 列表头部作为起点。\n`maps_direction_driving` 的 `origin` / `destination` 参数格式为 `\"经度,纬度\"`（逗号分隔，无空格）。\n\n### Step 5: Generate personal map QR code / 生成个人地图二维码\n\n#### 5.1 Collect valid points / 收集有效点\n\nCollect all points across all days that have a non-empty poiId (skip placeholder `B000000000`). Preserve insertion order (day-by-day).\n\n收集所有天的有效点（poiId 非空且非占位符 `B000000000`），按天顺序保持插入顺序。\n\n#### 5.2 Deduplicate by name / 按名称去重\n\nRules (apply in order):\n\n1. **Closed-loop anchor / 环线锚点**：If the first and last points have the same name AND this name also appears in the middle, keep the first AND last occurrence, remove the middle one(s). This ensures the route stays closed.\n2. **Intermediate duplicates / 中间重复**：For all other duplicate names, keep the **first** occurrence, remove subsequent ones.\n3. **Adjacent duplicates / 连续重复**：If two consecutive points share the same name, remove one (keep the earlier day's context). This happens when a day's endpoint equals the next day's start point due to cross-day completion.\n\n```\nDeduplication flow:\n  names = [p[\"name\"] for p in points]\n  if names[0] == names[-1]:\n      → keep points[0] and points[-1], remove middle occurrences of this name\n  for all other duplicates:\n      → keep first occurrence, remove rest\n```\n\n#### 5.3 Trim to ≤ 16 nodes / 精简至 ≤ 16 节点\n\nIf the deduplicated list exceeds 16 nodes, trim using this priority order:\n\n| Priority | Keep | Drop |\n|----------|------|------|\n| 1 (highest) | Start and end points (环路锚点) | — |\n| 2 | User-specified must-visit attractions | — |\n| 3 | Major scenic spots / landmarks (景点/地标) | Rest stops, service areas (服务区) |\n| 4 | Geographically isolated nodes (唯一覆盖该区域的点) | Dense urban clusters (keep 1 per city) |\n| 5 | POI with non-placeholder poiId | POI with placeholder poiId `B000000000` |\n\n**Geographic distribution principle / 地理分布原则**：When choosing between nodes of equal priority, prefer nodes that are farther apart (ensure the route visually represents the full journey). Avoid dropping the only node in a sparse region.\n\n**Minimum trim / 最小精简**：Only remove as many nodes as needed to reach 16. Never remove the start or end anchor.\n\n#### 5.4 Data integrity before calling API / 调用 API 前的数据完整性\n\n```python\n# Build lineList structure\npoint_info_list = [\n    {\"name\": p[\"name\"], \"lon\": p[\"lon\"], \"lat\": p[\"lat\"], \"poiId\": p[\"poiId\"]}\n    for p in deduplicated_points\n]\nline_list = [{\n    \"title\": \"Route Name / 路线名称\",\n    \"pointInfoList\": point_info_list\n}]\n\n# Validate before calling maps_schema_personal_map\nif len(point_info_list) > 16:\n    raise ValueError(f\"Still {len(point_info_list)} nodes, must be ≤ 16\")\nif any(p[\"poiId\"] == \"B000000000\" or not p[\"poiId\"] for p in point_info_list):\n    raise ValueError(\"Placeholder or empty poiId found\")\n```\n\n#### 5.5 Call API and download QR / 调用 API 并下载二维码\n\n```python\nresult = client.maps_schema_personal_map(\n    orgName=\"路线名称\",\n    lineList=line_list,\n    sceneType=3          # 3 = route planning mode (仅创建路线)\n)\n\n# Check for API errors (all methods return dict on error, no exceptions)\nif isinstance(result, dict) and \"error\" in result:\n    print(f\"地图生成失败: {result['message']}\")\n    # fallback: output the coordinates as text so user can manually create route\nelse:\n    qr_url = result[\"qr_code_url\"]\n    # Download QR image:\n    import urllib.request\n    qr_path = \"/tmp/road_trip_qr.png\"\n    urllib.request.urlretrieve(qr_url, qr_path)\n    # Display inline: ![路线地图](file:///tmp/road_trip_qr.png)\n    # Fallback link: [在 Amap 中打开](qr_url)\n```\n\n1. Call `maps_schema_personal_map` with `sceneType=3` (route planning mode / 仅创建路线)\n2. Check for error in result dict (no exceptions thrown)\n3. Download QR code image and display inline\n4. Always include the fallback URL link\n\n收集有效点 → 按名称去重（按上述三条规则）→ 构建 lineList → 按优先级精简至 ≤ 16 节点 → 数据完整性校验 → 调用 `maps_schema_personal_map`(sceneType=3) → 检查错误 → 下载二维码 → 显示备用链接。\n\n### Step 6: Output Markdown itinerary / 输出 Markdown 行程表\n\nOutput directly in the conversation as Markdown, including:\n- Itinerary overview table (day, route, mileage, duration, road type, attractions) with total row\n- Daily detailed itinerary (waypoints table with coordinates and altitude, supply points)\n- Practical tips (altitude sickness, road conditions, tickets, temperature, seasonal notes)\n- QR code image and fallback link\n\n在对话中直接输出 Markdown：行程概览表格（含总里程合计行）、每日详细行程（含海拔和补给点）、实用提示、二维码图片和备用链接。\n\n## Key Constraints / 关键约束\n\n| Constraint / 约束 | Description / 说明 |\n|-------------------|-------------------|\n| Dependency check / 依赖检查 | Before any API call, verify `personal-map` skill is installed AND `AMAP_API_KEY` is set. Fail fast with clear user-facing messages if missing. |\n| Max nodes per route / 单条路线节点上限 | Amap `lineList` max 16 nodes per `pointInfoList` |\n| poiId required / poiId 必填 | `maps_schema_personal_map` requires non-empty poiId |\n| poiId strategy / poiId 获取策略 | `maps_text_search` first → retry with city name → fallback placeholder `B000000000` |\n| API error pattern / API 错误模式 | All API methods return `{\"error\": ..., \"message\": ...}` on failure — they do NOT throw exceptions. Always check for `\"error\"` key in every response. |\n| QPS limit / QPS 限制 | ≥ 0.3s interval between calls, or `CUQPS_HAS_EXCEEDED_THE_LIMIT` |\n| API Key / API Key | Set `AMAP_API_KEY` env var (auto-read by `AMapPersonalMapClient()` with no args) or pass explicitly |\n| Region / 地域限制 | China only — Amap (高德) covers mainland China |\n| External dependency / 外部依赖 | This repo contains no scripts. `AMapPersonalMapClient` lives in the `personal-map` skill at `scripts.amap_personal_map_client`. Install via `openclaw skills install personal-map`. |\n\n## Output Template / 输出模板\n\n```markdown\n# [Route Name] Road Trip Guide / 自驾行程指南\n\n> Start/End: [City]　> Total: ~X km　> Days: X　> Max Altitude: ~Xm\n\n## Itinerary Overview / 行程概览\n\n| Day | Route | Est. Mileage | Est. Duration | Road Type | Key Attractions |\n|-----|-------|-------------|--------------|-----------|-----------------|\n| Day 1 | ... | ... | ... | 高速/国道/山路 | ... |\n| **Total** | — | **X km** | **~X h** | — | — |\n\n## Daily Itinerary / 每日详细行程\n\n### Day 1: [Title]\n- **Driving mileage**: X km (高速 Xkm / 国道 Xkm / 山路 Xkm)\n- **Driving duration**: ~X hours\n- **Max altitude**: ~Xm (仅高原线路标注 / only for high-altitude routes)\n\n**Waypoints / 途经点**：\n| # | Name | Coordinates | Altitude | Note |\n|---|------|------------|----------|------|\n| 1 | ... | (lat, lng) | ~Xm | ... |\n\n**Supply points / 沿途补给**：\n- ⛽ Gas stations / 加油站: [name] at [location]\n- 🏥 Hospitals / 医院: [name] at [location]\n\n## Practical Tips / 实用提示\n1. **Altitude sickness / 高原反应**：...（高海拔线路必须包含 / required for routes >3000m）\n2. **Road conditions / 路况**：...\n3. **Tickets & booking / 门票与预订**：...\n4. **Temperature & clothing / 温差与衣物**：...\n\n## Personal Map QR Code / 个人地图二维码\n![Route Name](file:///...)\n> Fallback link / 备用链接: [Open in Amap](url)\n```\n\n## Advanced Capabilities / 进阶能力\n\n- **Supply point search / 沿途补给搜索**：Integrated into Step 3.1 — conditions and API calls are defined there. / 已集成到 Step 3.1，按条件触发。\n- **Mileage anomaly troubleshooting / 里程异常排查**：If a day's mileage is 0 or obviously wrong, check whether the previous day's endpoint was correctly inserted (Step 4 cross-day completion), and whether coordinates are duplicated.\n- **Seasonal adjustments / 季节性调整**：See below. / 见下方季节性检查清单。\n\n### Seasonal Checklist / 季节性检查清单\n\n> **通用提醒**：暑期 (7–8月) 全国旺季，住宿提前 1–2 周预订、景区拥挤。国庆 (10.1–10.7) 各热门线路住宿极端紧张、价格翻倍，部分路段拥堵严重。\n> **General rule**: Summer (Jul–Aug) = nationwide peak season — book 1–2 weeks ahead. National Day (Oct 1–7) = extreme crowding and price surges on all popular routes.\n\n#### 节假日影响 / Holiday Impact\n\n> 农历节日（春节、清明、端午、中秋）每年公历日期不同，规划时请确认当年具体日期。\n> Lunar-calendar holidays shift each year — confirm exact dates when planning.\n\n| 节假日 Holiday | 时间 When | 天数 | 自驾影响 Road Trip Impact |\n|---------------|-----------|------|--------------------------|\n| **元旦** New Year | 12.31–1.2 | 3天 | 短途游小高峰，景区中等拥挤，高速不免费 |\n| **寒假** Winter Break | 1–2月 | 约1月 | 学生家庭出游季，三亚/西双版纳/北海等暖冬目的地旺，东北冰雪游旺季 |\n| **春节** Spring Festival | 1月底–2月中 | 7–8天 | 全国性出行最高峰之一，高速免费，热门景区爆满，大部分商家歇业至初七，除夕/初一加油站可能休息 |\n| **清明** Qingming | 4月初 | 3天 | 短途踏青高峰，高速免费，城郊山路拥堵，墓地周边交通管制 |\n| **五一** Labor Day | 5.1–5.5 | 5天 | 仅次于国庆的出行高峰，高速免费，热门票/住宿需提前 1 月预订，景区限流常见 |\n| **端午** Dragon Boat | 5月底–6月 | 3天 | 短途游为主，高速不免费，影响相对较小；南方进入雨季注意山路 |\n| **暑期** Summer Vacation | 7–8月 | 约2月 | 全国旺季，家庭出游主力，住宿全线紧张，景区排队严重；西北/高原线路集中出行 |\n| **中秋** Mid-Autumn | 9月中–10月初 | 3天 | 短途探亲为主；若与国庆连休可形成 8 天+ 超长假期，出行量倍增 |\n| **国庆** National Day | 10.1–10.7 | 7天 | 全年最大出行高峰，高速免费，热门线路住宿翻 3–5 倍，部分景区限流劝返，G318/独库/青甘等拥堵严重 |\n| **胡杨林季** Ejina Poplar | 10月初–10月中 | 约2周 | 额济纳/酒泉/塔里木胡杨林景区周边住宿极端紧张（提前 1 月+），价格数倍上涨 |\n| **林芝桃花节** Nyingchi Peach | 3月底–4月中 | 约3周 | 林芝/波密住宿紧张，G318 川藏线早春进藏车流增多 |\n\n#### 分区域季节风险 / Seasonal Risks by Region\n\n> 下表按区域列出四季关键风险。暑期和法定节假日叠加效应请同时参考上方节假日表。\n> The table below lists key seasonal risks by region. Cross-reference with the holiday calendar above for compound effects (e.g., summer vacation + regional rainy season).\n\n| Region / 区域 | Best / 最佳 | 冬 11–3月 | 春 3–5月 | 夏 6–8月 | 秋 9–10月 |\n|---------------|-------------|-----------|----------|----------|-----------|\n| **川西** Western Sichuan | 9–10月 | 垭口积雪封路，备防滑链 / passes closed by snow, carry chains | 残雪渐融，3–4月金川梨花 | G318/G317 雨季塌方泥石流 / landslides | 摄影黄金季，10月中下旬可能降雪 |\n| **G318 川藏线** Sichuan-Tibet Hwy | 5月, 9–10月 | 折多山/东达山暗冰，交通管制 / black ice at high passes | 林芝桃花(3–4月)，然乌湖最美，垭口仍有残雪 | 通麦/海通沟塌方，住宿翻倍 / mudslides, lodging 2× | 最佳进藏窗口，国庆住宿极端紧张 |\n| **稻城亚丁** Daocheng Yading | 9–10月 | 牛奶海结冰，景区可能限流 / iced lakes, restricted access | 4–5月杜鹃花季，但草甸未全绿 | 雨季山路泥泞，冲古寺至洛绒牛场段注意 | 最佳季节，10月中下旬降雪，国庆人流最大 |\n| **西藏阿里** Tibet Ngari | 9–10月 | 极寒，非铺装路封闭，客栈歇业，加油站 200–300km | 部分路段仍封闭，不建议 / still closed | 雨季泥泞，医疗匮乏，建议备卫星电话 / satellite phone advised | 最佳但夜间骤降，全年需备副油 / carry spare fuel |\n| **珠峰线** Everest Base Camp | 4–5月, 9–10月 | 夜间 -20~-30°C，但晴空视野最佳 / coldest but clearest views | 最佳窗口，旺季价高，需边防证 | 季风遮挡珠峰，进山道路雨季 / monsoon obscures peak | 国庆后人流骤减，性价比高 / fewer crowds |\n| **G109 青藏线** Qinghai-Tibet Hwy | 9–10月 | 唐古拉/昆仑山口积雪，200km+ 无人区，极寒 | 冻土开始融化，路面不平 / thawing permafrost | 冻土翻浆波浪路，大货车密集，高反是#1风险 | 最佳季节，冻土回冻路面改善，国庆车流叠加 |\n| **青海 / 祁连** Qinghai | 7–9月 | 青海湖结冰草原枯黄，祁连垭口封路 | 沙尘暴，青海湖 3月前仍结冰 | 油菜花(7月)，祁连草原最佳，门源花期短 | 摄影黄金季，夜间寒冷，10月中下旬可能降雪 |\n| **甘南** Gannan | 6–8月 | 垭口积雪，扎尕那可能关闭 / passes closed | 草甸未青，干燥多风 / meadows still brown | 若尔盖/桑科草原最佳，雨季山路注意 | 9月秋景最佳，国庆住宿紧张 |\n| **甘肃河西走廊** Hexi Corridor | 5–6月, 9–10月 | 极寒干燥，部分景区淡季维护 / extreme cold, some sites closed | 沙尘暴高发，能见度骤降 / sandstorms | 40°C+ 暴晒，莫高窟票极紧张(提前1月约) | 最佳窗口，国庆人流爆炸 |\n| **新疆北疆** N. Xinjiang | 6–8月 | <-30°C 不适合普通自驾 / too cold for regular vehicles | 融雪期泥泞，不推荐 / muddy, not recommended | 伊犁草原最佳，旺季住宿紧张 | 喀纳斯/禾木秋景(9月底–10月初)，国庆人最多 |\n| **独库公路** Duku Highway | 6–9月 | ⚠️ 封闭 | 5月底视除雪进度开放 | 全段开放，旺季车多 | 10月初降雪后封闭 / closes after first snow |\n| **新疆沙漠公路** Desert Highways | 4–5月, 9–10月 | 寒冷但可通行 / cold but passable | 沙尘暴，能见度近零，飞沙伤车漆 | 路面 70°C+，爆胎风险，200km+ 无补给，备副油+补胎工具 | 最佳窗口，昼夜温差大 |\n| **滇西北** NW Yunnan | 4–5月, 9–10月 | 白马雪山积雪结冰，丽江-香格里拉段注意 | 干燥多风，草甸未青 | 虎跳峡/梅里路段塌方，山路泥泞 | 天气稳定，国庆人流多 |\n| **蒙东呼伦贝尔** Hulunbuir | 6–9月 | <-30°C，草原枯黄封路，不推荐自驾 / not recommended | 草原未绿，不建议 / still brown | 草原绿色最佳窗口，恩和/室韦/黑山头住宿紧 | 9月中起草原枯黄，国庆最后一波 |\n\n## References / 参考\n\n- Full examples: [examples.md](examples.md)\n- Underlying API: [@lbs-amap/personal-map](https://clawhub.ai/lbs-amap/personal-map) skill\n\nFile v1.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn7e2sj8mgfpnxr8gpfdwafh4n887ea7\",\n  \"slug\": \"road-trip-planner\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1780816907732\n}\n\nFile v1.0.0:skill-card.md\n\n## Description: <br>\nPlans multi-day road trip routes in mainland China using Amap APIs, generating daily itinerary details and continuous-route personal map QR codes. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[onlydreams](https://clawhub.ai/user/onlydreams) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users and agents use this skill to design multi-day self-driving itineraries in mainland China, including daily waypoints, driving durations, supply points, and route QR codes. It is intended for road-trip planning workflows that rely on Amap and the separate personal-map dependency. <br>\n\n### Deployment Geography for Use: <br>\nChina only <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill requires an Amap API key and sends planned route locations to Amap. <br>\nMitigation: Confirm the user accepts sharing route locations with Amap and provide the API key only through the expected AMAP_API_KEY configuration. <br>\nRisk: The skill depends on the separate lbs-amap/personal-map package for actual API calls. <br>\nMitigation: Review and install the referenced dependency before use, and stop if the dependency or AMAP_API_KEY is unavailable. <br>\nRisk: Route outputs are limited to mainland China and Amap route constraints such as valid POI identifiers and route node limits. <br>\nMitigation: Use the skill only for China routes, validate POI results before map generation, and fall back to textual coordinates when route-map generation cannot complete. <br>\n\n\n## Reference(s): <br>\n- [Road Trip Planner ClawHub listing](https://clawhub.ai/onlydreams/road-trip-planner) <br>\n- [lbs-amap/personal-map dependency](https://clawhub.ai/lbs-amap/personal-map) <br>\n- [Amap Open Platform](https://lbs.amap.com/) <br>\n- [amap-sdk-skills GitHub repository](https://github.com/amap-demo/amap-sdk-skills) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance] <br>\n**Output Format:** [Markdown itinerary with tables, inline code snippets, route QR-code image reference, and fallback links] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Requires AMAP_API_KEY and the lbs-amap/personal-map dependency; route generation is limited to China and Amap route node constraints.] <br>\n\n## Skill Version(s): <br>\n1.0.0 (source: ClawHub release metadata) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>","readmeExcerpt":"Skill: Road Trip Planner Owner: onlydreams Summary: 基于高德地图 personal-map skill 规划多日自驾游路线，生成连续路线个人地图小程序二维码，并输出每日行程详情。当用户提到自驾、公路旅行、路线规划、旅游行程、生成地图、规划环线、控制驾驶时间或查询沿途里程时使用。支持闭合环线设计和跨天里程补全。 Plan multi-day road trip ro... Tags: latest:1.0.3 Version history: v1.0.3 | 2026-07-11T08:23:48.537Z | auto road-trip-planner 1.0.3 - Updated SKILL.md and examples.md to clarify workflow, dependencies, and error handling. - Removed redund","codeSnippets":[],"executableExamples":[{"language":"text","snippet":"Checklist / 检查清单:\n1. personal-map skill installed? → No → 提示: \"请先安装 personal-map skill，运行: openclaw skills install personal-map\"\n2. AMAP_API_KEY set? → No → 提示: \"请先配置高德 API Key，获取地址 https://lbs.amap.com/\"\n3. AMapPersonalMapClient importable? → No → 提示: \"personal-map skill 版本可能不兼容，请确认其提供 AMapPersonalMapClient 类\""},{"language":"bash","snippet":"# macOS / Linux\nexport AMAP_API_KEY='your_key'\n\n# PowerShell\n$env:AMAP_API_KEY = 'your_key'\n\n# Windows cmd\nset \"AMAP_API_KEY=your_key\""},{"language":"python","snippet":"import os\nfrom scripts.amap_personal_map_client import AMapPersonalMapClient\n\n# Check API key BEFORE creating client\napi_key = os.getenv(\"AMAP_API_KEY\")\nif not api_key:\n    print(\"AMAP_API_KEY not set. Get a key at https://lbs.amap.com/ and run:\")\n    print(\"  Set AMAP_API_KEY in your active shell (see Dependencies above).\")\n    # stop here — do not proceed\n\n# Create client (auto-reads AMAP_API_KEY from env):\nclient = AMapPersonalMapClient()\n# Or pass explicitly: client = AMapPersonalMapClient(api_key=\"your_key\")"},{"language":"python","snippet":"def api_error_message(result):\n    if isinstance(result, dict) and \"error\" in result:\n        return result.get(\"message\", str(result[\"error\"]))\n    if (\n        isinstance(result, list)\n        and result\n        and isinstance(result[0], dict)\n        and \"error\" in result[0]\n    ):\n        return result[0].get(\"message\", str(result[0][\"error\"]))\n    return None\n\ngeo = client.maps_geo(\"北京市朝阳区\", \"北京\")\nif error := api_error_message(geo):\n    # Stop handling this location; never reuse another location's coordinates.\n    raise ValueError(f\"Cannot resolve this location: {error}\")\n\n# Convert external fields once. All later workflow steps use only this shape.\npoint = {\n    \"name\": \"地点名称\",\n    \"lon\": float(geo[\"longitude\"]),\n    \"lat\": float(geo[\"latitude\"]),\n    \"poiId\": \"\",             # fill from the verified POI-search result\n    \"required\": False,         # True for the start, end, and user must-visit points\n}"},{"language":"python","snippet":"# For each day flagging a supply concern (long stretch, remote area):\n# Search gas stations and hospitals near the day's midpoint or last town before uninhabited area\nresult = client.maps_around_search(\n    keywords=\"加油站|医院\",\n    location=f\"{lon},{lat}\",    # \"经度,纬度\" 格式\n    radius=5000,               # 搜索半径 5km（默认 1000m）\n    offset=5\n)\nif error := api_error_message(result):\n    print(f\"补给搜索失败: {error}\")"},{"language":"python","snippet":"for i, day in enumerate(days):\n    points = [p for p in day[\"points\"] if \"lon\" in p]\n    if i > 0:\n        prev = [p for p in days[i-1][\"points\"] if \"lon\" in p]\n        if prev:\n            points.insert(0, prev[-1])\n    # Drive segment by segment using maps_direction_driving:\n    #   For each adjacent pair in points, call:\n    #     result = client.maps_direction_driving(\n    #         origin=f\"{points[j]['lon']},{points[j]['lat']}\",\n    #         destination=f\"{points[j+1]['lon']},{points[j+1]['lat']}\"\n    #     )\n    #   Sum distances for the day's total.\n    #   Parameter format: \"longitude,latitude\" (no spaces)."}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: road-trip-planner\ndescription: >\n  基于高德地图 personal-map skill 规划多日自驾游路线，生成连续路线个人地图小程序二维码，并输出每日行程详情。当用户提到自驾、公路旅行、路线规划、旅游行程、生成地图、规划环线、控制驾驶时间或查询沿途里程时使用。支持闭合环线设计和跨天里程补全。\n  Plan multi-day road trip routes using Amap APIs. Generate continuous-route personal map QR codes and daily itinerary details. Triggered when users mention road trips, route planning, travel itineraries, map generation, loop routes, driving time control, or mileage queries. Supports closed-loop design and cross-day mileage completion. (China only — requires Amap API Key and @lbs-amap/personal-map skill)\n---\n\n# Road Trip Planner / 自驾游路线规划\n\n> China only — 本 skill 基于高德地图 API，仅适用于中国大陆地区。  \n> Dependency: [@lbs-amap/personal-map](https://clawhub.ai/lbs-amap/personal-map) (ClawHub) / [GitHub](https://github.com/amap-demo/amap-sdk-skills)\n\n## Trigger Conditions / 触发条件\n\nTrigger when the user has any of these intents:\n\n当用户出现以下任意意图时，主动调用本 skill：\n\n- Plan a road trip / road trip route / loop route (规划自驾游路线 / 公路旅行 / 环线)\n- Design a travel itinerary involving multi-city driving (设计涉及多地驾驶的旅游行程)\n- Generate a personal map / travel map / route QR code (生成个人地图 / 旅游地图 / 路线二维码)\n- Control daily driving time / avoid fatigued driving (控制每日驾驶时间 / 避免疲劳驾驶)\n- Query mileage, gas stations, hospitals along the route (查询沿途里程、加油站、医院等补给点)\n\n## Dependencies / 前置依赖\n\n| Dependency | Source | Description |\n|-----------|--------|-------------|\n| `lbs-amap/personal-map` | [ClawHub](https://clawhub.ai/lbs-amap/personal-map) | Amap Web Service API wrapper / 高德 Web 服务 API 封装。安装命令：`openclaw skills install personal-map`。提供 `AMapPersonalMapClient` 类（import 路径 `scripts.amap_personal_map_client`），本仓库自身不含该脚本。 |\n| Amap API Key | [Amap Open Platform](https://lbs.amap.com/) | Required env var: `AMAP_API_KEY` / 需配置环境变量 |\n\n### Dependency Availability Check / 依赖可用性检查\n\nBefore any API call, verify that the `personal-map` skill is installed and the API key is configured. If either is missing, stop and tell the user what's needed — do not attempt to proceed.\n\n在任何 API 调用之前，先检查 `personal-map` skill 是否已安装以及 API Key 是否已配置。任一缺失则停止并告知用户缺失项，不要尝试继续。\n\n```\nChecklist / 检查清单:\n1. personal-map skill installed? → No → 提示: \"请先安装 personal-map skill，运行: openclaw skills install personal-map\"\n2. AMAP_API_KEY set? → No → 提示: \"请先配置高德 API Key，获取地址 https://lbs.amap.com/\"\n3. AMapPersonalMapClient importable? → No → 提示: \"personal-map skill 版本可能不兼容，请确认其提供 AMapPersonalMapClient 类\"\n```\n\nSet the environment variable in the active shell; never put a real key in the skill or source code:\n\n```bash\n# macOS / Linux\nexport AMAP_API_KEY='your_key'\n\n# PowerShell\n$env:AMAP_API_KEY = 'your_key'\n\n# Windows cmd\nset \"AMAP_API_KEY=your_key\"\n```\n\n## Core Principles / 核心原则\n\n1. **No fatigued driving / 不疲劳驾驶**：Keep daily actual driving time under 6 hours; 4–5 hours is a planning target, while short sightseeing or transfer days may be shorter. For high-altitude, mountainous, or winding roads, further reduce driving time.（每日实际驾驶时间控制在 6 小时以内；4-5 小时是规划目标，纯玩或短途换乘日可更短。高原、山区、弯道多的路段进一步压缩。）\n"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7e2sj8mgfpnxr8gpfdwafh4n887ea7\",\n  \"slug\": \"road-trip-planner\",\n  \"version\": \"1.0.3\",\n  \"publishedAt\": 1783758228537\n}"},{"path":"references/seasonal.md","content":"# Seasonal Checklist / 季节性检查清单\n\nUse this reference when planning routes affected by holidays, winter closures, rainy seasons, high altitude, desert heat, or peak tourism windows.\n\n> **通用提醒**：本文件仅提供季节性趋势，不代表当前路况、开放状态、法定假日安排或高速免费政策。暑期（7–8 月）通常是全国旺季；国庆前后热门线路通常拥挤。最终行程必须按出发日期核验官方交通、天气、景区和节假日信息。\n> **General rule**: This file is seasonal guidance, not live status. Verify official traffic, weather, attraction, and holiday information for the actual departure dates before finalizing.\n\n## 节假日影响 / Holiday Impact\n\n> 农历节日（春节、清明、端午、中秋）每年公历日期不同，规划时请确认当年具体日期。  \n> Lunar-calendar holidays shift each year — confirm exact dates when planning.\n\n| 节假日 Holiday | 时间 When | 天数 | 自驾影响 Road Trip Impact |\n|---------------|-----------|------|--------------------------|\n| **元旦** New Year | 当年官方安排 | 以官方安排为准 | 短途游小高峰，景区中等拥挤，高速免费政策以当年安排为准 |\n| **寒假** Winter Break | 1–2月 | 约1月 | 学生家庭出游季，三亚/西双版纳/北海等暖冬目的地旺，东北冰雪游旺季 |\n| **春节** Spring Festival | 农历正月前后，以官方安排为准 | 以官方安排为准 | 全国性出行最高峰之一；高速免费政策、商家营业和服务设施以当年公告为准 |\n| **清明** Qingming | 清明节前后，以官方安排为准 | 以官方安排为准 | 短途踏青高峰；高速免费政策和局部交通管制以当年公告为准 |\n| **五一** Labor Day | 5月上旬，以官方安排为准 | 以官方安排为准 | 仅次于国庆的出行高峰；热门票/住宿需早订，限流和高速政策以当年公告为准 |\n| **端午** Dragon Boat | 农历五月，以官方安排为准 | 以官方安排为准 | 短途游为主；高速政策以当年公告为准，南方雨季注意山路 |\n| **暑期** Summer Vacation | 7–8月 | 约2月 | 全国旺季，家庭出游主力，住宿全线紧张，景区排队严重；西北/高原线路集中出行 |\n| **中秋** Mid-Autumn | 农历八月，以官方安排为准 | 以官方安排为准 | 短途探亲为主；若与国庆连休，出行量会明显增加 |\n| **国庆** National Day | 10月上旬，以官方安排为准 | 以官方安排为准 | 全年最大出行高峰；高速免费政策、景区限流和住宿价格以当年实时信息为准 |\n| **胡杨林季** Ejina Poplar | 10月初–10月中 | 约2周 | 额济纳/酒泉/塔里木胡杨林景区周边住宿极端紧张（提前 1 月+），价格数倍上涨 |\n| **林芝桃花节** Nyingchi Peach | 3月底–4月中 | 约3周 | 林芝/波密住宿紧张，G318 川藏线早春进藏车流增多 |\n\n## 分区域季节风险 / Seasonal Risks by Region\n\n> 下表按区域列出四季关键风险。暑期和法定节假日叠加效应请同时参考上方节假日表。  \n> The table below lists key seasonal risks by region. Cross-reference with the holiday calendar above for compound effects (e.g., summer vacation + regional rainy season).\n\n| Region / 区域 | Best / 最佳 | 冬 11–3月 | 春 3–5月 | 夏 6–8月 | 秋 9–10月 |\n|---------------|-------------|-----------|----------|----------|-----------|\n| **川西** Western Sichuan | 9–10月 | 垭口积雪封路，备防滑链 / passes closed by snow, carry chains | 残雪渐融，3–4月金川梨花 | G318/G317 雨季塌方泥石流 / landslides | 摄影黄金季，10月中下旬可能降雪 |\n| **G318 川藏线** Sichuan-Tibet Hwy | 5月, 9–10月 | 折多山/东达山暗冰，交通管制 / black ice at high passes | 林芝桃花(3–4月)，然乌湖最美，垭口仍有残雪 | 通麦/海通沟塌方，住宿翻倍 / mudslides, lodging 2× | 最佳进藏窗口，国庆住宿极端紧张 |\n| **稻城亚丁** Daocheng Yading | 9–10月 | 牛奶海结冰，景区可能限流 / iced lakes, restricted access | 4–5月杜鹃花季，但草甸未全绿 | 雨季山路泥泞，冲古寺至洛绒牛场段注意 | 最佳季节，10月中下旬降雪，国庆人流最大 |\n| **西藏阿里** Tibet Ngari | 9–10月 | 极寒，非铺装路封闭，客栈歇业，加油站 200–300km | 部分路段仍封闭，不建议 / still closed | 雨季泥泞，医疗匮乏，建议备卫星电话 / satellite phone advised | 最佳但夜间骤降，全年需备副油 / carry spare fuel |\n| **珠峰线** Everest Base Camp | 4–5月, 9–10月 | 夜间 -20~-30°C，但晴空视野最佳 / coldest but clearest views | 最佳窗口，旺季价高，需边防证 | 季风遮挡珠峰，进山道路雨季 / monsoon obscures peak | 国庆后人流骤减，性价比高 / fewer crowds |\n| **G109 青藏线** Qinghai-Tibet Hwy | 9–10月 | 唐古拉/昆仑山口积雪，200km+ 无人区，极寒 | 冻土开始融化，路面不平 / thawing permafrost | 冻土翻浆波浪路，大货车密集，高反是#1风险 | 最佳季节，冻土回冻路面改善，国庆车"},{"path":"examples.md","content":"# Road Trip Planner Examples / 示例\n\n## Example 1: Hulunbuir (Mongolia East) 8-Day Loop / 蒙东呼伦贝尔 8 日自驾环线\n\n**User input**: Help me plan an 8-day road trip route in Mongolia East. / 帮我生成一个蒙东自驾 8 日游的路线。\n\n**Design approach / 设计思路**：\n- Start/End: Hailar (closed loop) / 起点/终点：海拉尔（闭合环线）\n- Total: ~1000–1100km / 总里程约 1000-1100km\n- Daily driving: 2–4 hours, relaxed pace / 每日驾驶 2-4 小时，节奏舒缓\n- Classic Hulunbuir Grand Loop covering grasslands, wetlands, forests, border areas, and lakes / 经典呼伦贝尔大环线，涵盖草原、湿地、森林、边境、湖泊多种地貌\n\n**Route / 路线节点**：\n\n| Day | Route / 路线 | Mileage / 里程 | Duration / 时长 |\n|-----|-------------|---------------|-----------------|\n| Day 1 | Hailar → Morigele River → Erguna / 海拉尔 → 莫日格勒河 → 额尔古纳 | 154km | 2.0h |\n| Day 2 | Erguna → Wetland → Birch Forest → Enhe / 额尔古纳 → 湿地 → 白桦林 → 恩和 | 99km | 1.7h |\n| Day 3 | Enhe → Shiwei → Linjiang / 恩和 → 室韦 → 临江 | 80km | 1.5h |\n| Day 4 | Linjiang → Laoyingzui → Taiping → Mordaga / 临江 → 老鹰嘴 → 太平 → 莫尔道嘎 | 38km | 0.7h |\n| Day 5 | Mordaga → Aoluguya → Genhe / 莫尔道嘎 → 敖鲁古雅 → 根河 | 120km | 2.0h |\n| Day 6 | Genhe → Erguna → Heishantou / 根河 → 额尔古纳 → 黑山头 | 210km | 3.0h |\n| Day 7 | Heishantou → 186 Ribbon River → Manzhouli / 黑山头 → 186 彩带河 → 满洲里 | 170km | 1.8h |\n| Day 8 | Manzhouli → Hulun Lake → Hailar / 满洲里 → 呼伦湖 → 海拉尔 | 186km | 2.0h |\n\n**Core map nodes (16) / 核心地图节点（16 个）**：\nHailar Airport, Morigele River, Erguna City, Erguna Wetland, Birch Forest Scenic Area, Enhe Russian Ethnic Village, Shiwei Port, Linjiang Village, Laoyingzui, Mordaga National Forest Park, Aoluguya Reindeer Tribe, Genhe City, Heishantou Town, Manzhouli National Gate, Hulun Lake, Hailar Airport\n\n**Output / 输出结果**：\n- Personal map QR code (16-node closed loop, Hailar at both start and end) / 个人地图小程序二维码（16 个节点闭合环线）\n- Markdown itinerary guide (with gas station and hospital POI search along route) / Markdown 行程指南\n\n**Special notes / 特别提示**：\n- Some sections (e.g., Linjiang to Mordaga) have weak cell signal — download offline maps in advance / 蒙东地区部分路段（如临江至莫尔道嘎）手机信号较弱，建议提前下载离线地图\n- August peak season — book accommodation in Erguna, Shiwei, and Heishantou early / 8 月旺季住宿紧张\n\n---\n\n## Example 2: Qinghai-Gansu Grand Loop 9-Day Road Trip / 青甘大环线 9 日自驾\n\n**User input**: Plan a Qinghai-Gansu Grand Loop road trip starting from Xining. Consider daily driving time and avoid fatigued driving. / 给我规划一个西宁出发的青甘大环线自驾行程，记得考虑每日自驾时长，不要疲劳驾驶。\n\n**Design approach / 设计思路**：\n- Start/End: Xining (loop) / 起点/终点：西宁（环线）\n- Total: ~2200–2600km / 总里程约 2200-2600km\n- Daily driving: 4–6 hours；Day 5 is a Dunhuang city rest day / 每日驾驶 4-6 小时，Day 5 敦煌市区纯玩驾驶极少\n- Day 8 drives through Qilian Mountain pass (high altitude, winding roads) — driving time compressed to ~5h with buffer / Day 8 穿越祁连山区，海拔高弯道多，驾驶时间需额外压缩\n\n**Route / 路线节点**：\n\n| Day | Route / 路线 | Mileage / 里程 | Duration / 时长 |\n|-----|-------------|---------------|-----------------|\n| Day 1 | Xining → Ta'er Monastery → Qinghai Lake / 西宁 → 塔尔寺 → 青海湖 | 276km | 4.7h |\n| Day 2 | Qinghai Lake → Chaka Salt Lake → Delingha / 青海湖 → 茶卡盐湖 → 德令哈 | 370km | 4.7h |\n"},{"path":"skill-card.md","content":"## Description:\n\nPlans multi-day road trip routes in mainland China using Amap APIs, generates personal-map QR codes for continuous routes, and outputs daily itinerary details.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[onlydreams](https://clawhub.ai/user/onlydreams)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users and travel-planning agents use this skill to design mainland China self-driving itineraries with daily driving limits, route continuity, supply-point checks, seasonal cautions, and Amap personal-map QR output.\n\n### Deployment Geography for Use:\n\nMainland China\n\n## Known Risks and Mitigations:\n\nRisk: The skill sends route locations and trip details to Amap APIs and official live-information sources.\n\nMitigation: Use the skill only when Amap-based mainland China route planning is intended, avoid sensitive trip details, and use a scoped Amap API key.\n\nRisk: The skill relies on the external personal-map dependency and an AMAP_API_KEY before route generation can work.\n\nMitigation: Verify that the installed dependency is the intended @lbs-amap personal-map package and confirm the API key is configured before making API calls.\n\nRisk: Seasonal guidance and route API results may not reflect current road closures, weather warnings, attraction access, or holiday traffic rules.\n\nMitigation: Verify official traffic, weather, attraction, reservation, and holiday information for the actual departure dates before finalizing an itinerary.\n\n## Reference(s):\n\n- [Server-resolved source repository](https://github.com/Onlydreams/road-trip-planner)\n- [Road Trip Planner release page](https://clawhub.ai/onlydreams/skills/road-trip-planner)\n- [Amap personal-map dependency](https://clawhub.ai/lbs-amap/personal-map)\n- [Amap SDK skills repository](https://github.com/amap-demo/amap-sdk-skills)\n- [Amap Open Platform](https://lbs.amap.com/)\n- [Seasonal Checklist](references/seasonal.md)\n- [Examples](examples.md)\n\n## Skill Output:\n\n**Output Type(s):** [Markdown, Shell commands, Configuration instructions, API calls, Files, Guidance]\n\n**Output Format:** [Markdown itinerary with tables, inline shell commands, QR image path, and fallback map link]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May create a temporary QR image file and depends on Amap API responses and current official travel information.]\n\n## Skill Version(s):\n\n1.0.3 (source: server release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment."}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"基于高德地图 personal-map skill 规划多日自驾游路线，生成连续路线个人地图小程序二维码，并输出每日行程详情。当用户提到自驾、公路旅行、路线规划、旅游行程、生成地图、规划环线、控制驾驶时间或查询沿途里程时使用。支持闭合环线设计和跨天里程补全。 Plan multi-day road trip ro... Skill: Road Trip Planner Owner: onlydreams Summary: 基于高德地图 personal-map skill 规划多日自驾游路线，生成连续路线个人地图小程序二维码，并输出每日行程详情。当用户提到自驾、公路旅行、路线规划、旅游行程、生成地图、规划环线、控制驾驶时间或查询沿途里程时使用。支持闭合环线设计和跨天里程补全。 Plan multi-day road trip ro... Tags: latest:1.0.3 Version history: v1.0.3 | 2026-07-11T08:23:48.537Z | auto road-trip-planner 1.0.3 - Updated SKILL.md and examples.md to clarify workflow, dependencies, and error handling. - Removed redund","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":1699,"uniquenessScore":48,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-10T17:18:14.819Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-10T17:18:14.819Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-10T21:48:57.718Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}