π¦ ClawHub
QWeather City Weather
by @richliao1112
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,...
TERMINAL
clawhub install qweather-city-weatherπ About This Skill
name: qweather-city-weather description: 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.
qweather-city-weather
Use this skill primarily via the bundled script:
scripts/qweather_query.pyThis makes the skill portable across machines and independent from a local Next.js service.
Prerequisites
QWEATHER_API_KEY, or
- pass --api-key
QWEATHER_API_HOST, or
- pass --api-hostDefault execution flow
1. Search city candidates and get location IDs:
python3 scripts/qweather_query.py search-city --query "Hangzhou" --api-host "" --api-key ""
2. Pick best city by id/name/adm1/adm2.
3. Query current weather with location ID:
python3 scripts/qweather_query.py get-weather --location "101210101" --api-host "" --api-key ""
4. Or run one-shot city -> weather:
python3 scripts/qweather_query.py city-weather --query "Hangzhou" --api-host "" --api-key ""
Script command reference
search-city--query
- optional: --number (default 10)
get-weather--location
city-weather--query
- optional: --preferred-name for exact city-name matchGlobal options for all subcommands:
--api-key--api-host--timeout (seconds, default 5.0)Output and error contract
success: truesuccess: false + error, process exits non-zeroDirect API reference
For endpoint and payload details of the official QWeather API, read:
references/qweather-http-contract.mdβοΈ Configuration
QWEATHER_API_KEY, or
- pass --api-key
QWEATHER_API_HOST, or
- pass --api-host