🦀 ClawHub
彩云天气 / Caiyun Weather
by @tjefferson
天气查询 / Weather query. 实时查询天气、气温、空气质量(AQI/PM2.5)、逐小时预报、一周天气预报、历史天气和天气预警,支持中文城市名(北京/上海/深圳等)直接查询。Real-time weather, temperature, AQI, hourly/weekly forecast, hi...
TERMINAL
clawhub install caiyun-weather📖 About This Skill
name: caiyun-weather description: "天气查询 / Weather query. 实时查询天气、气温、空气质量(AQI/PM2.5)、逐小时预报、一周天气预报、历史天气和天气预警,支持中文城市名(北京/上海/深圳等)直接查询。Real-time weather, temperature, AQI, hourly/weekly forecast, historical weather and alerts via Caiyun Weather API. Supports Chinese city names directly. Requires CAIYUN_WEATHER_API_TOKEN." category: Data & APIs metadata: openclaw: requires: bins: [python3] env: [CAIYUN_WEATHER_API_TOKEN] primaryEnv: CAIYUN_WEATHER_API_TOKEN
彩云天气 (Caiyun Weather)
通过彩云天气 API 查询天气数据。支持直接使用城市名称(中文或英文),无需提供经纬度。
前置条件
使用前需设置环境变量:
export CAIYUN_WEATHER_API_TOKEN="你的API密钥"
免费申请 API 密钥:https://docs.caiyunapp.com/weather-api/
何时使用
✅ 使用此技能:
❌ 不要使用此技能:
命令
使用 --city 加城市名称(中文或英文)。如需精确定位,可使用 --lng 和 --lat。
实时天气
python3 "{{skill_path}}/scripts/caiyun_weather.py" realtime --city "北京"
逐小时预报(72小时)
python3 "{{skill_path}}/scripts/caiyun_weather.py" hourly --city "上海"
一周预报(7天)
python3 "{{skill_path}}/scripts/caiyun_weather.py" weekly --city "深圳"
历史天气(过去24小时)
python3 "{{skill_path}}/scripts/caiyun_weather.py" history --city "杭州"
天气预警
python3 "{{skill_path}}/scripts/caiyun_weather.py" alerts --city "成都"
使用坐标(可选)
对于无法通过城市名识别的地点:
python3 "{{skill_path}}/scripts/caiyun_weather.py" realtime --lng 116.4074 --lat 39.9042
内置城市(即时查询)
北京、上海、广州、深圳、杭州、成都、武汉、南京、重庆、西安、天津、苏州、郑州、长沙、青岛、大连、厦门、昆明、贵阳、哈尔滨、沈阳、长春、福州、合肥、济南、南昌、石家庄、太原、呼和浩特、南宁、海口、三亚、拉萨、乌鲁木齐、兰州、西宁、银川、香港、澳门、台北、珠海、东莞、佛山、无锡、宁波、温州
英文名和其他全球城市通过在线地理编码自动解析。