---
name: simple-weather
slug: simple-weather # 唯一标识,小写+横杠,发布时用
description: 极简的城市实时天气查询技能,支持国内主流城市
version: 1.0.0 # 语义化版本,更新时递增(如 1.0.1)
author: Your Name # 替换成你的名字/昵称
tags: [weather, query, simple, 天气] # 便于搜索的标签
license: MIT # 开源协议,推荐MIT(无版权风险)
use_when:
not_for:
config:
required: [] # 无需配置,开箱即用
极简的城市天气查询能力,无需API Key,模拟返回天气数据(可替换为真实接口)。
当用户输入包含以下关键词时自动触发:
获取指定城市的模拟天气数据
city(必填)- 城市名称(如“北京”)
```python
def get_weather(city):
# 模拟数据,可替换为真实天气API(如高德/百度天气)
weather_data = {
"北京": {"temp": "18℃", "status": "晴", "wind": "3级东风"},
"上海": {"temp": "22℃", "status": "多云", "wind": "2级南风"},
"广州": {"temp": "28℃", "status": "雷阵雨", "wind": "4级西南风"}
}
return weather_data.get(city, {"temp": "未知", "status": "未查询到", "wind": "未知"})
共 1 个版本