init: 云枢·Agent 初始提交
This commit is contained in:
33
skills/geocoding/SKILL.md
Normal file
33
skills/geocoding/SKILL.md
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
name: geocoding
|
||||
description: 通过 wttr.in 查询城市坐标的知识和验证规则
|
||||
---
|
||||
|
||||
# Geocoding(地理编码)参考
|
||||
|
||||
## wttr.in 坐标查询
|
||||
|
||||
获取城市经纬度:
|
||||
```
|
||||
https://wttr.in/{城市名}?format=j1
|
||||
```
|
||||
|
||||
- 城市名支持中文(如 `北京`、`成都`)和英文(如 `Beijing`、`Chengdu`)
|
||||
- 返回 JSON 格式的完整天气数据,坐标在 `nearest_area[0]` 中
|
||||
- 坐标字段:`latitude`、`longitude`
|
||||
- 额外信息:`areaName`、`country`、`population`
|
||||
|
||||
## 验证规则
|
||||
|
||||
获取到坐标后必须验证以下信息,避免张冠李戴:
|
||||
|
||||
1. **确认国家/地区正确** — 检查 `country[0].value`,如"成都"的 country 应为 "China"
|
||||
2. **同名城市判断** — 如果 `nearest_area` 有多条,按 population 大小取最可能的目标
|
||||
3. **中文输入优先用中文查** — wttr.in 原生支持中文名解析,比先转英文更准确
|
||||
4. **结果存疑时用 skill("msn-weather-api") 多看细节**
|
||||
|
||||
## 已知边界情况
|
||||
|
||||
- 小城市名可能匹配到其他国家的同名地点(如"长春"→ 印度尼西亚也有长春),需要核对 country
|
||||
- 一些城市名可能有多个行政区同名(如"济南"确保是中国山东济南)
|
||||
- wttr.in 是一个天气网站,它的地理编码数据偏向人口多的城市
|
||||
56
skills/msn-weather-api/SKILL.md
Normal file
56
skills/msn-weather-api/SKILL.md
Normal file
@@ -0,0 +1,56 @@
|
||||
---
|
||||
name: msn-weather-api
|
||||
description: MSN 天气 API 详细知识
|
||||
---
|
||||
|
||||
# MSN 天气 API 参考
|
||||
|
||||
## 接口地址
|
||||
|
||||
| 接口 | URL |
|
||||
|------|-----|
|
||||
| 当前天气 | `https://assets.msn.cn/service/weather/current` |
|
||||
| 每日预报 | `https://assets.msn.cn/service/weather/dailyforecast` |
|
||||
|
||||
## 必须参数
|
||||
|
||||
- `apiKey`: `j5i4gDqHL6nGYwx5wi5kRhXjtf2c5qgFX9fzfk0TOo`(固定值,不可修改)
|
||||
- `lat` / `lon`: 经纬度(WGS84)
|
||||
- `locale`: `zh-cn`
|
||||
- `units`: `C`(摄氏)
|
||||
|
||||
## 可选参数
|
||||
|
||||
- `days`: 预报天数(最大 10)
|
||||
|
||||
## 必须请求头
|
||||
|
||||
```
|
||||
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64)
|
||||
Referer: https://www.msn.com/zh-cn/weather
|
||||
```
|
||||
|
||||
## 响应数据结构
|
||||
|
||||
### current 接口
|
||||
```
|
||||
value[].responses[].weather[].current.{
|
||||
temp, cap, feels, rh, baro, windSpd, windDir,
|
||||
windGust, uv, uvDesc, vis, dewPt, aqi,
|
||||
aqiSeverity, cloudCover, created
|
||||
}
|
||||
```
|
||||
|
||||
### dailyforecast 接口
|
||||
```
|
||||
value[].responses[].weather[].days[].daily.{
|
||||
valid, tempLo, tempHi, precip, windMax,
|
||||
windMaxDir, rhHi, rhLo, icon, symbol, uv, uvDesc
|
||||
}
|
||||
```
|
||||
|
||||
## 注意事项
|
||||
- 数据源为微软 MSN 天气后台接口
|
||||
- 国内访问速度快(msn.cn 国内节点)
|
||||
- apiKey 可能随时更换
|
||||
- 不可用于商业产品
|
||||
Reference in New Issue
Block a user