← 返回 Skills 市场
lxy914

和风天气 API 查询服务,支持实时天气、天气预报和小时预报。使用城市名称进行查询。

作者 太原彭于晏 · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ⚠ suspicious
98
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install lxy914-weather
功能描述
和风天气 API 查询服务,支持实时天气、天气预报和小时预报。使用城市名称进行查询。
使用说明 (SKILL.md)

和风天气 (QWeather)

和风天气提供详细的天气数据查询服务。

前置条件

需要和风天气 API Key:

  1. 注册账号:https://dev.qweather.com/
  2. 创建应用获取 API Key和API HOST

配置信息

设置环境变量:

  • QWEATHER_API_KEY: 和风天气 API Key
  • QWEATHER_BASE_URL: API Host(如 https://xxxxxxxx.re.qweatherapi.com

使用方法

使用 Python 脚本查询

# 查询实时天气
python scripts/qweather_cli.py now 北京

# 查询天气预报(默认 7 天,支持 3/7/10/15/30 天)
python scripts/qweather_cli.py daily 上海
python scripts/qweather_cli.py daily 太原 3

# 查询小时预报(默认 24 小时)
python scripts/qweather_cli.py hourly 广州
python scripts/qweather_cli.py hourly 深圳 12

选项

  • --json: 输出 JSON 格式
  • --plain: 纯文本模式(不使用 emoji)

使用示例

查询当前天气

"今天天气怎么样?"
"查询上海的实时天气"
"北京现在多少度?"

查询天气预报

"未来 3 天天气如何?"
"太原明天下雨吗?"
"下周天气预报"

查询小时预报

"今天下午天气怎么样?"
"明天每小时天气"

注意事项

  1. 实况数据有 5-20 分钟延迟
  2. 免费额度:2000 次/天
安全使用建议
This package is a normal QWeather API client, but double-check these before installing: 1) The registry metadata omitted required env vars; you must provide QWEATHER_API_KEY and QWEATHER_BASE_URL for it to work. 2) Make sure QWEATHER_BASE_URL points to the official QWeather API host (https://dev.qweather.com or the official re-route host they provide) — do not set it to an unknown server because the script will send your API key in the X-QW-Api-Key header. 3) Review or run the included scripts locally in a safe environment to confirm behavior. 4) Avoid storing the API key in world-readable files or public CI logs. If you need higher assurance, ask the publisher to fix the metadata and to document the exact official base URL expected.
能力评估
Purpose & Capability
The name/description match the code and instructions: this is a QWeather API client that needs an API key and base URL. However, registry metadata claims 'Required env vars: none' while SKILL.md and scripts clearly require QWEATHER_API_KEY and QWEATHER_BASE_URL—this mismatch is unexpected and should be corrected/verified.
Instruction Scope
SKILL.md only instructs setting the QWeather env vars and running the included Python CLI. The script performs only API lookups (geo lookup, now/daily/hourly) and formats results—no access to unrelated files, no unexpected endpoints, and no data collection beyond the API calls.
Install Mechanism
There is no install spec; this is instruction+script-only. The script is included in the bundle and runs locally with standard Python libraries—no external installers or downloads are performed.
Credentials
The script legitimately requires QWEATHER_API_KEY and QWEATHER_BASE_URL to contact the weather API. That is proportionate to the purpose, but the registry metadata failing to declare these required env vars is an inconsistency. Also note: QWEATHER_BASE_URL is user-controlled and could point to an arbitrary host—ensure you set it to the official QWeather host (HTTPS) to avoid redirecting secrets to an attacker-controlled endpoint.
Persistence & Privilege
always is false and the skill does not request persistent system changes, nor does it modify other skills or system-wide settings. It runs only when invoked.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install lxy914-weather
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /lxy914-weather 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- Updated documentation to use `python` commands instead of `uv run` for script queries. - No functional or code changes in this version.
v1.0.0
Initial release of a simplified QWeather (和风天气) skill: - Simplified implementation: replaced 12 separate JS tools/scripts with a single Python CLI script (scripts/qweather_cli.py). - Now supports real-time weather, daily forecast, and hourly forecast using city names via command-line. - Skill documentation rewritten for clarity, including setup instructions and usage examples. - Requires only QWEATHER_API_KEY and QWEATHER_BASE_URL for configuration. - Old functionality (location lookup, advanced input handling) removed for a cleaner, more focused user experience.
元数据
Slug lxy914-weather
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

和风天气 API 查询服务,支持实时天气、天气预报和小时预报。使用城市名称进行查询。 是什么?

和风天气 API 查询服务,支持实时天气、天气预报和小时预报。使用城市名称进行查询。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 98 次。

如何安装 和风天气 API 查询服务,支持实时天气、天气预报和小时预报。使用城市名称进行查询。?

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

和风天气 API 查询服务,支持实时天气、天气预报和小时预报。使用城市名称进行查询。 是免费的吗?

是的,和风天气 API 查询服务,支持实时天气、天气预报和小时预报。使用城市名称进行查询。 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

和风天气 API 查询服务,支持实时天气、天气预报和小时预报。使用城市名称进行查询。 支持哪些平台?

和风天气 API 查询服务,支持实时天气、天气预报和小时预报。使用城市名称进行查询。 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 和风天气 API 查询服务,支持实时天气、天气预报和小时预报。使用城市名称进行查询。?

由 太原彭于晏(@lxy914)开发并维护,当前版本 v1.0.1。

💬 留言讨论