← 返回 Skills 市场
stevenho1394

Hong Kong Weather Information

作者 Steven Ho · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
33
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install hk-weather-info
功能描述
Hong Kong weather information — current conditions, forecasts from HKO (Hong Kong Observatory). Use when user asks about HK weather, temperature, rainfall, o...
使用说明 (SKILL.md)

HK Weather Info

Overview

Hong Kong weather skill using HKO (Hong Kong Observatory) OpenData API. Provides current weather reports and local weather forecasts. Supports regional filtering and multilingual output (English, Traditional Chinese, Simplified Chinese).

Data Source

HKO OpenData API — free, no API key required.

  • Current weather: https://data.weather.gov.hk/weatherAPI/opendata/weather.php?dataType=rhrread&lang=\x3Clang>
  • Forecast: https://data.weather.gov.hk/weatherAPI/opendata/weather.php?dataType=flw&lang=\x3Clang>

Variables

Variable Description Values
HK_WEATHER_INFO_REGION Target region/district. If None, returns general HK weather. e.g. "Tsuen Wan", "Central", None
HK_WEATHER_INFO_LANG Language preference en (English), tc (Traditional Chinese), sc (Simplified Chinese)

Step 1: Get User Input

(a) Target region

Ask user for target region/district. If user refuses or says "general/whole HK", set HK_WEATHER_INFO_REGION = None.

(b) Language preference

Ask user for language preference. One of:

  • en — English
  • tc — Traditional Chinese (繁體中文)
  • sc — Simplified Chinese (简体中文)

Store as HK_WEATHER_INFO_LANG.

Step 2: Workflow

(a) Current weather report

Call:

GET https://data.weather.gov.hk/weatherAPI/opendata/weather.php?dataType=rhrread&lang=\x3CHK_WEATHER_INFO_LANG>

The API returns JSON with:

  • temperature — array of {place, value, unit}
  • humidity{value, unit}
  • rainfall — array of {place, value, unit}
  • icon — weather icon code
  • uvindex — UV index (if available)
  • updateTime — timestamp
  • warningMessage — active warnings (string)
  • rainstormReminder — rainstorm reminder (string)

Regional filtering: If HK_WEATHER_INFO_REGION is set (not None):

  1. Search temperature array for entry where place matches the region (case-insensitive partial match)
  2. Search rainfall array for entry where place matches the region
  3. Display matched regional data

If no match found or HK_WEATHER_INFO_REGION is None:

  • Display general HK weather (all temperature stations, all rainfall stations)

(b) Local weather forecast

Call:

GET https://data.weather.gov.hk/weatherAPI/opendata/weather.php?dataType=flw&lang=\x3CHK_WEATHER_INFO_LANG>

The API returns JSON with:

  • generalSituation — general weather situation
  • forecastDesc — forecast description
  • outlook — outlook
  • forecastPeriod — array of forecast periods with forecast, weather, tempRange, rhRange, wind
  • updateTime — timestamp

Regional filtering: If HK_WEATHER_INFO_REGION is set:

  • The forecast is territory-wide. Note the regional context when presenting.

Display today's and tomorrow's forecast by default.

Output Format

Current Weather

🌤️ Hong Kong Weather [Region if set]

Temperature: XX°C (Station Name)
Humidity: XX%
Rainfall: XXmm (Station Name)
[Weather Icon: XX]
UV Index: XX (if available)

Active Warnings: [warningMessage or "None"]
Rainstorm Reminder: [rainstormReminder or "None"]

Last Updated: \x3CupdateTime>

Forecast

📅 Local Weather Forecast

General Situation: \x3CgeneralSituation>

Today: \x3Cforecast> | \x3Cweather> | Temp: \x3CtempRange>°C | Humidity: \x3CrhRange>% | Wind: \x3Cwind>
Tomorrow: \x3Cforecast> | \x3Cweather> | Temp: \x3CtempRange>°C | Humidity: \x3CrhRange>% | Wind: \x3Cwind>

Outlook: \x3Coutlook>

Last Updated: \x3CupdateTime>

Common Pitfalls

  1. No API key needed — HKO OpenData is free and open
  2. Rate limiting — respectful polling, cache results for 10-15 minutes
  3. Regional name matching — use partial case-insensitive match. Some station names differ from district names
  4. UV index — may be null at night or on cloudy days
  5. Warning message — may be empty string if no warnings active
  6. Forecast language — the lang parameter affects all text fields

Verification Checklist

  • HKO OpenData API used (no API key)
  • Regional filtering implemented
  • Language preference supported (en/tc/sc)
  • Current weather and forecast both fetched
  • Output format defined
  • No external dependencies (Python stdlib only)
安全使用建议
Before installing, expect the skill to contact the Hong Kong Observatory public API and cache public weather responses locally for short-term reuse. No credentials, private data access, or high-impact actions were found in the artifacts.
能力标签
requires-sensitive-credentials
能力评估
Purpose & Capability
The stated purpose is Hong Kong weather information, and the artifacts implement current weather and forecast retrieval from HKO OpenData with region and language options.
Instruction Scope
Runtime instructions are limited to asking for region/language preferences, calling documented HKO endpoints, filtering results, and formatting weather output.
Install Mechanism
The package contains a manifest, markdown instructions, metadata, and one Python helper script; there are no install hooks, dependency installers, or automatic execution paths.
Credentials
The script uses outbound network access to data.weather.gov.hk and a small local cache, which is proportionate for a weather skill. The metadata tag 'requires-sensitive-credentials' appears inconsistent with the artifacts, which state no API key is required and contain no credential handling.
Persistence & Privilege
The helper script creates ~/.hk_weather_cache and stores fetched public weather JSON for about 10 minutes; it does not request elevated privileges, run in the background, or modify unrelated files.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install hk-weather-info
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /hk-weather-info 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of HK Weather Info skill. - Provides current weather and local forecasts for Hong Kong using HKO OpenData API. - Supports regional filtering; users can request weather for specific districts. - Multilingual output: English, Traditional Chinese, and Simplified Chinese. - No API key required; free and open data. - Outputs temperature, humidity, rainfall, weather warnings, UV index, and rainstorm reminders. - Presents both current conditions and forecasts in a clear, structured format.
元数据
Slug hk-weather-info
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Hong Kong Weather Information 是什么?

Hong Kong weather information — current conditions, forecasts from HKO (Hong Kong Observatory). Use when user asks about HK weather, temperature, rainfall, o... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 33 次。

如何安装 Hong Kong Weather Information?

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

Hong Kong Weather Information 是免费的吗?

是的,Hong Kong Weather Information 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Hong Kong Weather Information 支持哪些平台?

Hong Kong Weather Information 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Hong Kong Weather Information?

由 Steven Ho(@stevenho1394)开发并维护,当前版本 v1.0.0。

💬 留言讨论