Manusで任意のスキルを実行
ワンクリックで
ワンクリックで
ワンクリックでManusで任意のスキルを実行
始めるget-weather
スター3
フォーク0
更新日2026年3月2日 03:39
获取指定城市的实时天气信息
インストール
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SKILL.md
readonlyメニュー
获取指定城市的实时天气信息
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | get_weather |
| description | 获取指定城市的实时天气信息 |
此技能用于获取指定城市的实时天气信息。
fetch_url 工具访问天气APIimport json
# 使用fetch_url获取天气数据
url = f"https://api.openweathermap.org/data/2.5/weather?q={city}&appid=YOUR_API_KEY&units=metric&lang=zh_cn"
data = fetch_url(url)
# 解析JSON数据
weather_data = json.loads(data)
# 提取天气信息
city_name = weather_data.get("name")
temperature = weather_data.get("main", {}).get("temp")
humidity = weather_data.get("main", {}).get("humidity")
weather_description = weather_data.get("weather", [{}])[0].get("description")
# 格式化返回
result = f"{city_name}的当前天气:{weather_description},温度:{temperature}°C,湿度:{humidity}%"