Amap Traffic
高德地图实时路况查询与最优自驾路线规划技能。基于高德交通态势API和路径规划API,提供实时拥堵信息和最快路线建议。
MIT-0 · Free to use, modify, and redistribute. No attribution required.
⭐ 1 · 1.4k · 25 current installs · 27 all-time installs
MIT-0
Security Scan
OpenClaw
Benign
high confidencePurpose & Capability
Name/description (Amap traffic and routing) match the requested credential (AMAP_KEY) and the code's behavior (only calls restapi.amap.com). Minor inconsistency: SKILL.md instructs storing the key at skills.entries.amap-traffic.AMAP_KEY but the script looks for skills.entries['amap-traffic'].get('apiKey') or top-level amapKey/AMAP_KEY — so the documented config field name and the script's expected field differ.
Instruction Scope
SKILL.md and the Python script both state the skill will read OpenClaw configuration for AMAP_KEY. The script only reads openclaw.json from /home/admin/.openclaw/openclaw.json and ~/.openclaw/openclaw.json (then environment variable), and only extracts API-key-like fields; it does not read other system files or send data to endpoints other than AMap APIs. The only scope concern is the mismatch in the exact config field name described vs. what the code checks.
Install Mechanism
No install spec; this is an instruction-only skill with a single Python script. Nothing is downloaded or written to disk by an installer step.
Credentials
Only AMAP_KEY is required (declared as primaryEnv). That is proportionate for a mapping API integration; the script falls back to environment variables if the config file doesn't provide the key.
Persistence & Privilege
always:false and the skill does not attempt to modify other skill/system configs. It only reads openclaw.json and environment variables and makes outbound requests to AMap; it does not run persistent background processes.
Assessment
This package appears coherent for getting AMap traffic and driving routes. Before installing, consider: 1) Confirm where you store the AMAP_KEY in your openclaw.json — the SKILL.md suggests skills.entries.amap-traffic.AMAP_KEY but the script expects an apiKey field or top-level AMAP_KEY/amapKey; if you put the key under the SKILL.md path the script may not find it and you should instead set a top-level AMAP_KEY or apiKey under the skill entry. 2) The script reads /home/admin/.openclaw/openclaw.json and ~/.openclaw/openclaw.json — ensure those files don't contain unrelated secrets you wouldn't want code to read (the script only extracts API-key-like fields, but review the file). 3) Network: the script makes HTTPS calls only to restapi.amap.com; if you require stricter controls, run it in a constrained environment or verify traffic via a proxy. 4) If you prefer not to allow file reads, set AMAP_KEY in the environment so the script will use that instead. Overall there are no signs of hidden endpoints, obfuscated code, or unrelated credential requests.Like a lobster shell, security has layers — review code before you run it.
Current versionv1.0.0
Download ziplatest
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
Runtime requirements
🚗 Clawdis
EnvAMAP_KEY
Primary envAMAP_KEY
SKILL.md
高德实时路况与路线规划
概述
本技能通过高德地图API实现:
- 实时路况查询:获取指定道路/区域的拥堵状态
- 智能路线规划:基于实时路况计算最快自驾路线
- 多方案对比:提供时间、距离、费用等维度的路线比较
🔑 API Key 配置
- 访问 高德开放平台 创建 Key
- 在 OpenClaw Web 配置页面设置:
地址: http://127.0.0.1:18789/skills
配置文件字段:skills.entries.amap-traffic.AMAP_KEYinopenclaw.json
值: 你的高德API Key
注意: 本技能每次调用时都会重新读取
openclaw.json中的最新AMAP_KEY,支持前端动态更新密钥后立即生效。
API 使用说明
1. 实时路况查询
curl "https://restapi.amap.com/v3/traffic/status/road?roadid={道路ID}&key={动态读取的AMAP_KEY}"
2. 智能路线规划(含实时路况)
curl "https://restapi.amap.com/v3/direction/driving?origin={起点坐标}&destination={终点坐标}&strategy=2&key={动态读取的AMAP_KEY}"
strategy=2:优先考虑实时路况的最快路线
路况状态说明
- 畅通:🟢 绿色(速度 > 40km/h)
- 缓行:🟡 黄色(20-40km/h)
- 拥堵:🔴 红色(< 20km/h)
- 严重拥堵:🟣 紫红色(< 10km/h)
资源
scripts/
包含高德实时路况查询和路线规划的核心脚本。
scripts/amap_traffic.py
Python 脚本,实现完整的实时路况查询和最优路线规划功能。
每次执行时都会从 /home/admin/.openclaw/openclaw.json 读取最新的 AMAP_KEY,
确保前端动态更新密钥后立即生效。
Files
2 totalSelect a file
Select a file to preview.
Comments
Loading comments…
