China Weather Query

v1.1.0

查询中国任意城市的实时天气、多日预报和生活指数。数据来源中国天气网(weather.com.cn)。当用户询问中国城市天气、气温、降雨、空气质量、穿衣建议、出行建议等天气相关问题时使用。支持全国 350 个城市。

0· 132·0 current·0 all-time
byBruce Lau@brucelau1987cn

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for brucelau1987cn/china-weather-query.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "China Weather Query" (brucelau1987cn/china-weather-query) from ClawHub.
Skill page: https://clawhub.ai/brucelau1987cn/china-weather-query
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install china-weather-query

ClawHub CLI

Package manager switcher

npx clawhub@latest install china-weather-query
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
medium confidence
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.
Assessment
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.

Like a lobster shell, security has layers — review code before you run it.

latestvk971c8dn5d5ks3y8vrmj3m4hsn85kq55
132downloads
0stars
2versions
Updated 1d ago
v1.1.0
MIT-0

中国天气查询

使用方法

运行查询脚本:

python3 <skill_dir>/scripts/weather_query.py <城市名> [--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/

Comments

Loading comments...