← 返回 Skills 市场
libaoming

中国天气

作者 libaoming · GitHub ↗ · v1.0.1
cross-platform ✓ 安全检测通过
425
总下载
0
收藏
2
当前安装
2
版本数
在 OpenClaw 中安装
/install china-weather
功能描述
获取中国城市天气信息,支持当前天气、未来预报、生活指数。当用户问中国城市的天气、温度、下雨、穿衣建议时使用。支持城市名或城市代码查询。Use when user asks about weather in Chinese cities like '北京天气'、'上海明天会下雨吗'、'广州这周天气怎么样'。
使用说明 (SKILL.md)

中国天气

获取中国城市的实时天气和预报信息。

快速使用

# 当前天气
~/.openclaw/workspace/skills/china-weather/scripts/weather.sh 上海

# 明天天气
~/.openclaw/workspace/skills/china-weather/scripts/weather.sh 北京 tomorrow

# 一周预报
~/.openclaw/workspace/skills/china-weather/scripts/weather.sh 广州 week

# 生活指数(穿衣、出行建议)
~/.openclaw/workspace/skills/china-weather/scripts/weather.sh 深圳 indices

支持的城市

  • 直辖市:北京、上海、天津、重庆
  • 省会城市:广州、杭州、成都、武汉、西安等
  • 其他城市:支持大部分中国城市(使用城市名或区县名)

命令参数

参数 说明 示例
城市名 查询当前天气 weather.sh 上海
tomorrow 明天天气 weather.sh 北京 tomorrow
week 一周预报 weather.sh 广州 week
indices 生活指数 weather.sh 深圳 indices
alert 气象预警 weather.sh 成都 alert

生活指数说明

  • 🧥 穿衣指数 - 穿衣建议
  • ☂️ 雨伞指数 - 是否需要带伞
  • 🚗 洗车指数 - 是否适合洗车
  • 🏃 运动指数 - 是否适合户外运动
  • 🌞 紫外线指数 - 防晒建议
  • 😷 空气污染扩散指数 - 空气质量

数据来源

  • 默认使用 wttr.in(免费,无需 API key)
  • 如需更精准数据,可配置和风天气 API key

配置 API key(可选)

如需使用和风天气 API 获取更精准数据:

  1. 注册和风天气开发者账号:https://dev.qweather.com
  2. 获取免费 API key
  3. 配置环境变量:
export QWEATHER_KEY="your-api-key"

示例输出

当前天气:

上海 🌤️  18°C
体感 16°C | 湿度 65% | 东北风 3级
空气质量:良 (AQI 58)

一周预报:

上海 未来7天天气:
周一 🌤️  12-18°C
周二 ☀️  14-20°C
周三 🌧️  10-15°C (有雨)
...
安全使用建议
This skill appears to do what it says: it calls wttr.in to fetch weather and caches responses in /tmp. Before installing, be aware: (1) it makes outbound HTTP requests to wttr.in (so network access is required and queries include city names), (2) it creates cache files under /tmp (default permissions apply; this is not unusual but may collide with other users/processes), (3) there's a minor bug where the cache key sanitization can produce an empty key for non-ASCII city names (leading to cache collisions), and (4) the QWEATHER_KEY path is advertised but not actually implemented in the script's alert retrieval. If you want to use QWeather, inspect/modify the script to implement the API call. If you are comfortable with those points, the skill is coherent with its description and does not request excessive privileges or secrets.
功能分析
Type: OpenClaw Skill Name: china-weather Version: 1.0.1 The skill bundle is a legitimate weather query tool for Chinese cities. It uses the public 'wttr.in' service and provides an optional integration for the QWeather API. The shell script (scripts/weather.sh) includes basic caching logic in /tmp and standard input normalization, with no evidence of data exfiltration, command injection, or malicious intent.
能力评估
Purpose & Capability
Name/description match what the files do: the script queries wttr.in for current weather, tomorrow, week, indices, and provides optional instructions for a QWeather API key. No unrelated credentials, binaries, or installs are requested.
Instruction Scope
SKILL.md instructs running the included shell script and optionally setting QWEATHER_KEY. This stays within the weather domain. Minor mismatch: SKILL.md and doc mention using QWeather for more precise data, but the script's alert path does not actually call the QWeather API even if QWEATHER_KEY is set (it only prints placeholders).
Install Mechanism
No install spec; the skill is instruction-only plus an executable shell script. No downloading of external code or archive extraction is performed by the skill itself.
Credentials
No required environment variables or secrets. One optional variable (QWEATHER_KEY) is documented and only referenced for alert functionality; its optional use is proportional to the stated purpose.
Persistence & Privilege
Skill is not always-on and does not modify other skills or system-wide settings. It writes short-term cache files under /tmp only, which is in-scope for its functionality.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install china-weather
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /china-weather 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
修复脚本兼容性
v1.0.0
首个版本:支持中国城市天气查询、预报、生活指数
元数据
Slug china-weather
版本 1.0.1
许可证
累计安装 2
当前安装数 2
历史版本数 2
常见问题

中国天气 是什么?

获取中国城市天气信息,支持当前天气、未来预报、生活指数。当用户问中国城市的天气、温度、下雨、穿衣建议时使用。支持城市名或城市代码查询。Use when user asks about weather in Chinese cities like '北京天气'、'上海明天会下雨吗'、'广州这周天气怎么样'。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 425 次。

如何安装 中国天气?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install china-weather」即可一键安装,无需额外配置。

中国天气 是免费的吗?

是的,中国天气 完全免费(开源免费),可自由下载、安装和使用。

中国天气 支持哪些平台?

中国天气 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 中国天气?

由 libaoming(@libaoming)开发并维护,当前版本 v1.0.1。

💬 留言讨论