Back to Skills

amap-traffic

agentbay-ai
Updated 2 days ago
4 views
40
2
40
View on GitHub
Developmentapi

About

This skill provides real-time traffic congestion data and optimal driving route planning using Amap's APIs. It helps developers integrate live traffic-aware navigation into their applications, calculating the fastest routes based on current conditions. Key features include multi-route comparison and dynamic API key support for immediate updates.

Quick Install

Claude Code

Recommended
Primary
npx skills add agentbay-ai/agentbay-skills -a claude-code
Plugin CommandAlternative
/plugin add https://github.com/agentbay-ai/agentbay-skills
Git CloneAlternative
git clone https://github.com/agentbay-ai/agentbay-skills.git ~/.claude/skills/amap-traffic

Copy and paste this command in Claude Code to install this skill

Documentation

高德实时路况与路线规划

概述

本技能通过高德地图API实现:

  1. 实时路况查询:获取指定道路/区域的拥堵状态
  2. 智能路线规划:基于实时路况计算最快自驾路线
  3. 多方案对比:提供时间、距离、费用等维度的路线比较

🔑 API Key 配置

  1. 访问 高德开放平台 创建 Key
  2. 在 OpenClaw Web 配置页面设置:
    地址: http://127.0.0.1:18789/skills
    配置文件字段: skills.entries.amap-traffic.AMAP_KEY in openclaw.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, 确保前端动态更新密钥后立即生效。

GitHub Repository

agentbay-ai/agentbay-skills
Path: amap-traffic
0

Related Skills

qmd

Development

qmd is a local search and indexing CLI tool that enables developers to index and search through local files using hybrid search combining BM25, vector embeddings, and reranking. It supports both command-line usage and MCP (Model Context Protocol) mode for integration with Claude. The tool uses Ollama for embeddings and stores indexes locally, making it ideal for searching documentation or codebases directly from the terminal.

View skill

subagent-driven-development

Development

This skill executes implementation plans by dispatching a fresh subagent for each independent task, with code review between tasks. It enables fast iteration while maintaining quality gates through this review process. Use it when working on mostly independent tasks within the same session to ensure continuous progress with built-in quality checks.

View skill

mcporter

Development

The mcporter skill enables developers to manage and call Model Context Protocol (MCP) servers directly from Claude. It provides commands to list available servers, call their tools with arguments, and handle authentication and daemon lifecycle. Use this skill for integrating and testing MCP server functionality in your development workflow.

View skill

adk-deployment-specialist

Development

This skill deploys and orchestrates Vertex AI ADK agents using A2A protocol, managing AgentCard discovery, task submission, and supporting tools like Code Execution Sandbox and Memory Bank. It enables building multi-agent systems with sequential, parallel, or loop orchestration patterns in Python, Java, or Go. Use it when asked to deploy ADK agents or orchestrate agent workflows on Google Cloud.

View skill