agentsclimarketplace

Caiyun weather

Skill whtsky/skills/skills/caiyun-weather

A collection of agent skills. Mostly vibe coded.

Install
npx -y skills add whtsky/skills --skill caiyun-weather

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Query Caiyun (ColorfulClouds) weather API for mainland China — real-time conditions, minute-level precipitation, hourly/daily forecasts, severe weather alerts, air quality (AQI), and GCJ-02 coordinate conversion.

SKILL.md

4.1 KB, ~1.4k tokens by cl100k_base, as published. Nobody here has run it

彩云天气 Skill

中国大陆天气查询首选。数据来源包括中国气象局、ECMWF。

配置

Set the following environment variable:

export CAIYUN_API_TOKEN="your-token"

API 调用

两种查询方式

方式1:经纬度(精确,推荐山区/景点)

https://api.caiyunapp.com/v2.6/{TOKEN}/{经度},{纬度}/{endpoint}

注意:经度在前,纬度在后,使用 GCJ-02 坐标系。

方式2:adcode 行政区划编码(城市级别)

https://api.caiyunapp.com/v2.6/{TOKEN}/weather.json?adcode={adcode}

adcode 只提供城市中心点坐标,空间精度较差。适合查城市天气概览。 参考对照表:https://docs.caiyunapp.com/weather-api/20240617-adcode.csv

综合天气查询(最常用)

# 经纬度方式 - 北京: 116.4074,39.9042
TOKEN="${CAIYUN_API_TOKEN}"
curl -s --compressed "https://api.caiyunapp.com/v2.6/${TOKEN}/116.4074,39.9042/weather?alert=true&dailysteps=7&hourlysteps=24"
# adcode 方式 - 北京市: 110100
curl -s --compressed "https://api.caiyunapp.com/v2.6/${TOKEN}/weather.json?adcode=110100&alert=true&dailysteps=7&hourlysteps=24"

返回包含 realtime + hourly + daily + alert 的完整数据。

实时天气

curl -s --compressed "https://api.caiyunapp.com/v2.6/${TOKEN}/116.4074,39.9042/realtime"

分钟级降水预报

curl -s --compressed "https://api.caiyunapp.com/v2.6/${TOKEN}/116.4074,39.9042/minutely"

历史数据

仅支持过去1天:在请求 URL 后加 dailystart=-1。不支持更早的历史数据。

天气代码 (skycon)

代码含义
CLEAR_DAY / CLEAR_NIGHT
PARTLY_CLOUDY_DAY / PARTLY_CLOUDY_NIGHT多云
CLOUDY
LIGHT_HAZE / MODERATE_HAZE / HEAVY_HAZE
LIGHT_RAIN小雨
MODERATE_RAIN中雨
HEAVY_RAIN大雨
STORM_RAIN暴雨
FOG
LIGHT_SNOW小雪
MODERATE_SNOW中雪
HEAVY_SNOW大雪
STORM_SNOW暴雪
DUST浮尘
SAND沙尘
WIND大风

常用坐标

地点经度,纬度
北京116.4074,39.9042
上海121.4737,31.2304
天津117.1901,39.1256
怀柔/慕田峪116.5704,40.4319
昌平/居庸关116.0711,40.2915
延庆115.9747,40.4567
婺源117.8613,29.2484
景德镇117.1786,29.2687

其他地点用经纬度(可从高德/Google Maps 获取)。

返回数据结构

result.realtime         — 实时天气
result.hourly           — 逐小时预报
result.daily            — 每日预报
  .temperature[]        — {date, max, min}
  .skycon[]             — {date, value}
  .precipitation[]      — {date, max, min, avg, probability}
  .wind[]               — {date, max{speed,direction}, min, avg}
  .humidity[]           — {date, max, min, avg}
  .life_index           — 生活指数
    .ultraviolet[]
    .comfort[]
    .coldRisk[]         — 感冒指数
    .dressing[]         — 穿衣指数
result.alert.content[]  — 预警信息

辅助脚本

bash scripts/weather.sh <经度,纬度> [天数:7]
bash scripts/weather.sh 116.4074,39.9042 7

天气展示注意

  • 白天天气用 skycon_08h_20h,不要用全天 skycon(全天含夜间,可能偏差大)
  • 温度同理:白天用 temperature_08h_20h,夜间用 temperature_20h_32h
  • 坐标系:GCJ-02(国测局坐标,高德/腾讯地图同坐标系。Google Maps 中国区也是 GCJ-02,海外是 WGS-84)

注意

  • 仅限中国大陆,海外地点用 Open-Meteo 或其他服务
  • 免费版每天限额(通常足够个人使用)
  • 经度在前纬度在后,和大多数地图服务反过来

What ships with it: 2 files

5.6 KB alongside SKILL.md, 2 of them executable

scripts/

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.