← 返回 Skills 市场
142
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install china-weather-query
功能描述
查询中国任意城市的实时天气、多日预报和生活指数。数据来源中国天气网(weather.com.cn)。当用户询问中国城市天气、气温、降雨、空气质量、穿衣建议、出行建议等天气相关问题时使用。支持全国 350 个城市。
使用说明 (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/
安全使用建议
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.
功能分析
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.
能力评估
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.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install china-weather-query - 安装完成后,直接呼叫该 Skill 的名称或使用
/china-weather-query触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.0
fix: 修复城市数据加载路径硬编码问题;修复生活指数解析(dataZS)未正确提取 .zs 子对象的 bug
v1.0.0
首发版本:支持全国350个城市实时天气查询、多日预报、生活指数、气象预警
元数据
常见问题
China Weather Query 是什么?
查询中国任意城市的实时天气、多日预报和生活指数。数据来源中国天气网(weather.com.cn)。当用户询问中国城市天气、气温、降雨、空气质量、穿衣建议、出行建议等天气相关问题时使用。支持全国 350 个城市。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 142 次。
如何安装 China Weather Query?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install china-weather-query」即可一键安装,无需额外配置。
China Weather Query 是免费的吗?
是的,China Weather Query 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
China Weather Query 支持哪些平台?
China Weather Query 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 China Weather Query?
由 Bruce Lau(@brucelau1987cn)开发并维护,当前版本 v1.1.0。
推荐 Skills