/install amap-weather
Amap Weather (高德天气)
Prerequisites
AMAP_API_KEYenvironment variable (高德 Web 服务 API Key)- Apply at https://lbs.amap.com → 控制台 → 应用管理 → 创建应用 → 添加 Key (Web服务类型)
Quick Usage
Run the bundled script:
# Real-time weather (实况)
python3 scripts/amap_weather.py 北京
# 4-day forecast (预报)
python3 scripts/amap_weather.py 杭州 --forecast
# By adcode (区县级精度)
python3 scripts/amap_weather.py 110108 --forecast # 海淀区
# Raw JSON output
python3 scripts/amap_weather.py 上海 --json
The script accepts city names (中文) or 6-digit adcodes. It has a built-in lookup table for 40+ major cities. For districts or less common cities, use adcodes directly.
Direct API Call (without script)
# Real-time
curl -s "https://restapi.amap.com/v3/weather/weatherInfo?key=${AMAP_API_KEY}&city=110000&extensions=base"
# Forecast
curl -s "https://restapi.amap.com/v3/weather/weatherInfo?key=${AMAP_API_KEY}&city=110000&extensions=all"
Parse the JSON: lives[0] for real-time, forecasts[0].casts[] for forecast (4 days).
Key Details
- extensions=base → real-time →
lives[](temperature, weather, humidity, wind) - extensions=all → forecast →
forecasts[].casts[](4 days, day/night split) - adcode 6-digit code required (not city name in API). Script handles name→adcode mapping.
- Updates: real-time hourly, forecast at ~8:00/11:00/18:00 CST
- Free quota: 300k calls/day
Formatting Output
When presenting weather to users:
- Use weather emoji (☀️晴 ⛅多云 🌧雨 ❄️雪 🌫雾 😷霾)
- Temperature in °C
- Include wind and humidity for real-time
- For forecast, show day/night separately with high/low temps
API Reference
For complete field definitions, error codes, and adcode list: see references/api-docs.md.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install amap-weather - 安装完成后,直接呼叫该 Skill 的名称或使用
/amap-weather触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Amap Weather (高德天气) 是什么?
Query weather via Amap (高德) Weather API — China's most accurate location-based weather service. Use when user asks about weather in Chinese cities, mentions... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 115 次。
如何安装 Amap Weather (高德天气)?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install amap-weather」即可一键安装,无需额外配置。
Amap Weather (高德天气) 是免费的吗?
是的,Amap Weather (高德天气) 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Amap Weather (高德天气) 支持哪些平台?
Amap Weather (高德天气) 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Amap Weather (高德天气)?
由 Wen(@wyatt88)开发并维护,当前版本 v1.0.0。