闲社服务运行正常AI智能体自动化平台
q

QWeather城市天气

技能标识:qweather-city-weather

Query QWeather city codes and real-time weather with bundled executable scripts. Use when users need to resolve city names to QWeather location IDs/adcodes, fetch current weather, or run portable weather queries on machines that do not host the original app.

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.0.1
检测标记
后台标记通过
免费
免费获取
0
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

QWeather城市天气

qweather-city-weather

主要通过捆绑脚本使用此技能:

  • - scripts/qweather_query.py

这使得该技能可在不同机器间移植,且不依赖本地Next.js服务。

前置条件

  • - 需要Python 3.10+环境
  • 需要和风天气API密钥:
- 设置环境变量 QWEATHERAPIKEY,或 - 通过 --api-key 参数传入
  • - 需要和风天气API主机地址:
- 设置环境变量 QWEATHERAPIHOST,或 - 通过 --api-host 参数传入

默认执行流程

  1. 1. 搜索城市候选并获取地点ID:

bash
python3 scripts/qweatherquery.py search-city --query 杭州 --api-host APIHOST> --api-key API_KEY>

  1. 2. 通过 id/name/adm1/adm2 选择最佳城市。
  1. 3. 使用地点ID查询当前天气:

bash
python3 scripts/qweatherquery.py get-weather --location 101210101 --api-host APIHOST> --api-key API_KEY>

  1. 4. 或一键执行城市到天气的查询:

bash
python3 scripts/qweatherquery.py city-weather --query 杭州 --api-host APIHOST> --api-key API_KEY>

脚本命令参考

  • - search-city
- 必需参数:--query - 可选参数:--number(默认值 10)
  • - get-weather
- 必需参数:--location
  • - city-weather
- 必需参数:--query - 可选参数:--preferred-name 用于精确匹配城市名称

所有子命令的全局选项:

  • - --api-key
  • --api-host
  • --timeout(秒,默认值 5.0)

输出与错误约定

  • - 成功:返回包含 success: true 的JSON
  • 失败:返回包含 success: false + error 的JSON,进程以非零状态退出
  • 无结果时绝不猜测城市;直接返回明确的未匹配失败信息

直接API参考

有关官方和风天气API的端点和负载详情,请参阅:

  • - references/qweather-http-contract.md

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 qweather-city-weather-1776206886 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 qweather-city-weather-1776206886 技能

通过命令行安装

skillhub install qweather-city-weather-1776206886

下载

⬇ 下载 qweather-city-weather v1.0.1(免费)

文件大小: 5.26 KB | 发布时间: 2026-4-15 13:38

v1.0.1 最新 2026-4-15 13:38
Initial portable release using QWEATHER_API_HOST and QWEATHER_API_KEY only.