AgentSkillsCN

hk-open-data

整合香港政府API中的天气、交通、停车与地理数据,打造全面的香港开放数据技能。当用户提出涉及多种数据来源的香港通用问题时使用此功能,或在需要将天气+交通+停车+位置数据整合,以给出完整解答时使用此功能。作为统一接口,连接香港所有开放数据。

SKILL.md
--- frontmatter
name: hk-open-data
description: Comprehensive Hong Kong open data skill combining weather, transport, parking, and geographic data from HK government APIs. Use when the user asks general questions about Hong Kong that may involve multiple data sources, or when you need to combine weather + transport + parking + location data for a complete answer. Acts as a unified interface to all HK open data.

HK Open Data Skill

Unified access to Hong Kong government open data. Combines weather, transport, parking, and geographic data. No API keys needed.

Available Data Sources

DataAPIFormat
Weather & ForecastsHK ObservatoryJSON
KMB Bus (1,621 routes)data.etabus.gov.hkJSON
Citybus (416 routes)rt.data.gov.hkJSON
GMB Minibus (569 routes)data.etagmb.gov.hkJSON
NLB Lantau Bus (64 routes)rt.data.gov.hkJSON
MTR Train Schedulesrt.data.gov.hkJSON
Light Rail (LRT)rt.data.gov.hkJSON
Location Searchgeodata.gov.hkJSON
Parking Vacancy (541+)api.data.gov.hkJSON
A&E Wait Times (18 hospitals)ha.org.hkJSON
RTHK Newsrthk.hkRSS/XML
HKMA Financial Dataapi.hkma.gov.hkJSON
LCSD Facilities (116+)lcsd.gov.hkJSON
Historical Archivesapi.data.gov.hkJSON

Quick API Reference

Weather

bash
# Current conditions
curl -s "https://data.weather.gov.hk/weatherAPI/opendata/weather.php?dataType=rhrread&lang=en"
# 9-day forecast
curl -s "https://data.weather.gov.hk/weatherAPI/opendata/weather.php?dataType=fnd&lang=en"
# Warnings
curl -s "https://data.weather.gov.hk/weatherAPI/opendata/weather.php?dataType=warnsum&lang=en"

Transport

bash
# KMB routes & ETA
curl -s "https://data.etabus.gov.hk/v1/transport/kmb/route/"
curl -s "https://data.etabus.gov.hk/v1/transport/kmb/stop-eta/{STOP_ID}"
# Citybus
curl -s "https://rt.data.gov.hk/v2/transport/citybus/route/ctb"
# MTR
curl -s "https://rt.data.gov.hk/v1/transport/mtr/getSchedule.php?line={LINE}&sta={STATION}"

Location

bash
curl -s "https://geodata.gov.hk/gs/api/v1.0.0/locationSearch?q={QUERY}"

Parking

bash
curl -s "https://api.data.gov.hk/v1/carpark-info-vacancy?data=info,vacancy&vehicleTypes=privateCar"

Hospital A&E

bash
curl -s "https://www.ha.org.hk/opendata/aed/aedwtdata2-en.json"

News (RTHK)

bash
curl -sL "http://rthk9.rthk.hk/rthk/news/rss/e_expressnews_elocal.xml"

Finance (HKMA)

bash
curl -s "https://api.hkma.gov.hk/public/market-data-and-statistics/daily-monetary-statistics/daily-figures-interbank-liquidity"

Facilities (LCSD)

bash
curl -s "https://www.lcsd.gov.hk/datagovhk/facility/facility-en.json"

Historical Data

bash
curl -s "https://api.data.gov.hk/v1/historical-archive/list-file-versions?url={RESOURCE_URL}&start={YYYYMMDD}&end={YYYYMMDD}"

Multi-Source Queries

For questions that span multiple data types, query relevant APIs in parallel and combine:

Example: "我想去中環,天氣點?有冇車位?"

  1. Weather: dataType=rhrread → current conditions
  2. GeoData: locationSearch?q=central → get coordinates
  3. Parking: vacancy_all.xml → filter by Central district
  4. Present combined answer

Detailed Documentation

For complete API specs, response schemas, and usage patterns for each data source, install the individual skills:

  • hk-weather — Full HKO API documentation
  • hk-transport — KMB/Citybus/GMB/NLB/MTR/LRT endpoints and station codes
  • hk-parking — Parking vacancy API and parsing
  • hk-geodata — Location search and coordinate conversion
  • hk-hospital — A&E wait times and triage categories
  • hk-news — RTHK news RSS feeds
  • hk-finance — HKMA monetary statistics
  • hk-facilities — LCSD sports and leisure venues