← Back to Skills Marketplace
425
Downloads
0
Stars
2
Active Installs
2
Versions
Install in OpenClaw
/install china-weather
Description
获取中国城市天气信息,支持当前天气、未来预报、生活指数。当用户问中国城市的天气、温度、下雨、穿衣建议时使用。支持城市名或城市代码查询。Use when user asks about weather in Chinese cities like '北京天气'、'上海明天会下雨吗'、'广州这周天气怎么样'。
README (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 获取更精准数据:
- 注册和风天气开发者账号:https://dev.qweather.com
- 获取免费 API key
- 配置环境变量:
export QWEATHER_KEY="your-api-key"
示例输出
当前天气:
上海 🌤️ 18°C
体感 16°C | 湿度 65% | 东北风 3级
空气质量:良 (AQI 58)
一周预报:
上海 未来7天天气:
周一 🌤️ 12-18°C
周二 ☀️ 14-20°C
周三 🌧️ 10-15°C (有雨)
...
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install china-weather - After installation, invoke the skill by name or use
/china-weather - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.1
修复脚本兼容性
v1.0.0
首个版本:支持中国城市天气查询、预报、生活指数
Metadata
Frequently Asked Questions
What is 中国天气?
获取中国城市天气信息,支持当前天气、未来预报、生活指数。当用户问中国城市的天气、温度、下雨、穿衣建议时使用。支持城市名或城市代码查询。Use when user asks about weather in Chinese cities like '北京天气'、'上海明天会下雨吗'、'广州这周天气怎么样'。 It is an AI Agent Skill for Claude Code / OpenClaw, with 425 downloads so far.
How do I install 中国天气?
Run "/install china-weather" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is 中国天气 free?
Yes, 中国天气 is completely free (open-source). You can download, install and use it at no cost.
Which platforms does 中国天气 support?
中国天气 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created 中国天气?
It is built and maintained by libaoming (@libaoming); the current version is v1.0.1.
More Skills