← Back to Skills Marketplace
brucelau1987cn

China Weather Query

by Bruce Lau · GitHub ↗ · v1.1.0 · MIT-0
cross-platform ✓ Security Clean
142
Downloads
0
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install china-weather-query
Description
查询中国任意城市的实时天气、多日预报和生活指数。数据来源中国天气网(weather.com.cn)。当用户询问中国城市天气、气温、降雨、空气质量、穿衣建议、出行建议等天气相关问题时使用。支持全国 350 个城市。
README (SKILL.md)

中国天气查询

使用方法

运行查询脚本:

python3 \x3Cskill_dir>/scripts/weather_query.py \x3C城市名> [--days N] [--detail] [--json]

参数

  • 城市名 — 城市名称,支持模糊匹配(如"杭"、"杭州"都能匹配)
  • --days N — 预报天数,默认 1 天,最大 5 天
  • --detail — 显示生活指数(穿衣、紫外线、雨伞、洗车等)
  • --json — 输出原始 JSON 数据

示例

# 上海实时天气
python3 scripts/weather_query.py 上海

# 北京 3 天预报
python3 scripts/weather_query.py 北京 --days 3

# 成都详细天气(含生活指数)
python3 scripts/weather_query.py 成都 --days 2 --detail

# 输出 JSON
python3 scripts/weather_query.py 广州 --json

数据内容

  • 实况:气温、天气、风力、湿度、AQI、PM2.5、能见度、气压
  • 预报:5 天内天气趋势(白天/夜间天气、最高/最低温、风向风力)
  • 生活指数:穿衣、紫外线、雨伞、洗车、感冒、旅游、运动、空调、舒适度、晾晒
  • 预警:气象预警信号(蓝色/黄色/橙色/红色)

覆盖范围

全国 34 个省级区划,350 个城市。编码表见 references/cities.json

数据来源

中国天气网(weather.com.cn)→ 中央气象台,每日 06/08/12/16/20 时更新。

注意

  • 需要网络访问 d1.weather.com.cn
  • HTTP 接口需设置 Referer: http://www.weather.com.cn/
Usage Guidance
This skill appears to do what it says (fetch weather from weather.com.cn) and doesn't request credentials. Before installing, consider: 1) Review the included references/cities.json to ensure it contains only benign lookup data. 2) Note the script will attempt to read fallback files under /root/.openclaw/... and accepts an injected CITIES_FILE — if your environment contains sensitive files at those locations, the skill might read them; remove or restrict those files or modify the script to only load the bundled references/cities.json. 3) Because the script makes outbound HTTP requests to d1.weather.com.cn, ensure your network policies are acceptable. 4) If you have low tolerance for any file access outside the skill directory, run or review the script in a sandboxed environment or edit the search_paths in the script to remove host-specific locations.
Capability Analysis
Type: OpenClaw Skill Name: china-weather-query Version: 1.1.0 The skill bundle is a legitimate tool for querying weather data from the China Weather Network (weather.com.cn). The Python script `scripts/weather_query.py` uses standard libraries to fetch and parse weather information based on city codes provided in `references/cities.json`, with no evidence of data exfiltration, malicious execution, or prompt injection.
Capability Assessment
Purpose & Capability
The name/description (China weather queries) match the included script and the cities.json reference. The script fetches data from d1.weather.com.cn with the expected Referer header and parses weather variables — nothing in code suggests unrelated capabilities.
Instruction Scope
SKILL.md instructs running the provided Python script and explicitly notes network access to d1.weather.com.cn (expected). The script, however, will try to load a cities JSON from multiple fallback locations (including paths under /root/.openclaw/workspace and an injectable CITIES_FILE variable). Those fallback reads could cause the skill to open files outside the skill directory if such files exist on the host.
Install Mechanism
No install spec is present (instruction-only with an included script). Nothing is downloaded or written to disk by an installer; the runtime simply runs the provided Python script.
Credentials
The skill requires no environment variables or credentials. Network access is limited to weather.com.cn as documented. There are no requests for unrelated service tokens or secrets.
Persistence & Privilege
always is false and the skill does not request persistent/autostart privileges or modify other skills or system-wide configs.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install china-weather-query
  3. After installation, invoke the skill by name or use /china-weather-query
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.1.0
fix: 修复城市数据加载路径硬编码问题;修复生活指数解析(dataZS)未正确提取 .zs 子对象的 bug
v1.0.0
首发版本:支持全国350个城市实时天气查询、多日预报、生活指数、气象预警
Metadata
Slug china-weather-query
Version 1.1.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is China Weather Query?

查询中国任意城市的实时天气、多日预报和生活指数。数据来源中国天气网(weather.com.cn)。当用户询问中国城市天气、气温、降雨、空气质量、穿衣建议、出行建议等天气相关问题时使用。支持全国 350 个城市。 It is an AI Agent Skill for Claude Code / OpenClaw, with 142 downloads so far.

How do I install China Weather Query?

Run "/install china-weather-query" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is China Weather Query free?

Yes, China Weather Query is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does China Weather Query support?

China Weather Query is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created China Weather Query?

It is built and maintained by Bruce Lau (@brucelau1987cn); the current version is v1.1.0.

💬 Comments