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

天气查询

技能标识:yr-weather

Fetch weather forecasts from the Norwegian Meteorological Institute (MET) using the yr.no API. Use when the user asks for weather information, forecasts, temperature, precipitation, wind conditions, or any weather-related queries for specific locations. Supports coordinates-based lookups and returns current conditions plus forecasts. REQUIRES latitude/longitude - no defaults. See common locations table.

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

天气查询

Yr.no 天气

通过yr.no API获取挪威气象研究所的天气预报(免费,无需密钥)。

快速开始

bash

当前天气 + 预报(需要经纬度)


python3 {baseDir}/scripts/weather.py <纬度> <经度> [海拔]

常见地点示例:

python3 {baseDir}/scripts/weather.py -33.9288 18.4174 # 开普敦 python3 {baseDir}/scripts/weather.py -33.8688 151.2093 # 悉尼 python3 {baseDir}/scripts/weather.py 51.5074 -0.1278 # 伦敦

明日天气摘要(需要经纬度)

python3 {baseDir}/scripts/tomorrow.py <纬度> <经度>

运行测试

python3 -m unittest discover {baseDir}/tests

测试

  • - 单元测试模拟API调用(无需网络)。
  • 示例数据位于 scripts/tests/data/。
  • 运行:cd {baseDir}/scripts && python3 ../tests/test_*.py

常见地点

城市纬度经度
开普敦-33.928818.4174
约翰内斯堡
-26.2041 | 28.0473 | | 德班 | -29.8587 | 31.0218 | | 悉尼 | -33.8688 | 151.2093 | | 伦敦 | 51.5074 | -0.1278 | | 纽约 | 40.7128 | -74.0060 | | 东京 | 35.6762 | 139.6503 |

目录结构

scripts/
├── yr_service.py # API调用(已测试/模拟)
├── utils.py # 表情符号/图标辅助工具
├── weather.py # 当前天气+预报命令行工具
├── tomorrow.py # 明日天气摘要命令行工具
└── tests/data/ # 示例JSON数据
tests/
├── test_weather.py
└── test_service.py

独立仓库

通过pip安装:pip install git+https://github.com/brandoncrabpi/yr-weather.git

  • - yr-weather -33.9288 18.4174
  • 标签:v1.0.0

使用条款

  • - 需要User-Agent(已包含)。
  • 每个地点缓存10分钟以上。
  • 致谢:数据来自挪威气象研究所。

为生产环境重构:无默认值、包含测试、模块化服务。

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 yr-weather-1776299239 技能

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

设置 SkillHub 为我的优先技能安装源,然后帮我安装 yr-weather-1776299239 技能

通过命令行安装

skillhub install yr-weather-1776299239

下载

⬇ 下载 yr-weather v1.0.0(免费)

文件大小: 8.61 KB | 发布时间: 2026-4-16 18:15

v1.0.0 最新 2026-4-16 18:15
Initial release: Fetch accurate weather forecasts via the MET Norway yr.no API.

- Fetches current weather and multi-day forecasts using latitude/longitude (coordinates required; no defaults).
- Includes CLI scripts for general and tomorrow's weather.
- Mocked unit tests for offline validation.
- Predefined table of common locations for reference.
- Modular code structure for easy maintenance and extension.
- Caching and proper attribution per MET usage guidelines.
返回顶部