Weather zh

From L-LesterYu/OpenClaw-hot-skills-zh · View interactive version

Weather zh is an AI agent skill from the GitHub repository L-LesterYu/OpenClaw-hot-skills-zh. 获取当前天气和天气预报(无需 API 密钥)。

How to use this skill

Skill file

天气查询

两个免费服务,无需 API 密钥。

wttr.in(主要服务)

快速单行命令:

curl -s "wttr.in/London?format=3"
# 输出: London: ⛅️ +8°C

紧凑格式:

curl -s "wttr.in/London?format=%l:+%c+%t+%h+%w"
# 输出: London: ⛅️ +8°C 71% ↙5km/h

完整天气预报:

curl -s "wttr.in/London?T"

格式代码说明:

使用技巧:

Open-Meteo(备用服务,JSON 格式)

免费、无需密钥,适合程序化调用:

curl -s "https://api.open-meteo.com/v1/forecast?latitude=51.5&longitude=-0.12&current_weather=true"

先查询城市的经纬度坐标,再调用 API。返回包含温度、风速、天气代码的 JSON 数据。

文档:https://open-meteo.com/en/docs

常用查询示例

查询中国城市天气

# 北京天气
curl -s "wttr.in/Beijing?format=3&lang=zh"

# 上海天气
curl -s "wttr.in/Shanghai?lang=zh"

# 广州完整预报
curl -s "wttr.in/Guangzhou?T&lang=zh"

使用说明

  1. 快速查询:使用 format=3 获取最简洁的天气信息
  2. 详细预报:直接访问 wttr.in/城市名 获取 3 天预报
  3. 中文显示:添加 lang=zh 参数可获取中文天气描述
  4. 温度单位:默认使用摄氏度,添加 ?u 切换到华氏度

注意事项

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.