2.5k
GitHub Stars
5
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill openclaw/skills --skill weather-cn- _meta.json296 B
- README.md1.1 KB
- SKILL.md4.7 KB
- weather_codes.txt1.2 KB
- weather-cn.sh6.1 KB
Overview
This skill provides a lightweight Chinese weather query tool that scrapes China Weather Network (weather.com.cn) and returns formatted weather and life-index information in Chinese. It uses a pure shell-script approach (bash + curl + grep/sed) with no large-model dependency and zero per-query token cost. The tool is fast, reliable, and suitable for automation or interactive use.
How this skill works
The main script looks up a city code from a local mapping file, fetches the city weather page with curl, and extracts relevant HTML fragments using grep/sed. Parsed data is formatted into a readable, colored text block showing current conditions, temperatures, and life indexes. Adding new cities is done by appending entries to the city-code file with the code found in the China Weather Network URL.
When to use it
- Quick one-off weather checks for Chinese cities without using APIs
- Automated scripts, cron jobs, or CI tasks that need weather info with minimal overhead
- Terminal-first workflows where JSON or API keys are undesirable
- Low-cost or offline-friendly environments where token usage must be zero
- Situations that require raw source data from weather.com.cn rather than third-party aggregators
Best practices
- Keep weather_codes.txt updated; obtain codes from the city page URL on weather.com.cn
- Use standard city names (e.g., "Chengdu", "Beijing") as mapped in the codes file
- Wrap the script call in aliases or small wrapper functions for easier daily use
- Handle network failures gracefully in calling code (retry/backoff) since the scraper depends on site availability
- Validate and sanitize any new city code entries to avoid parsing errors
Example use cases
- Interactive terminal query: ./weather-cn.sh 成都 to get current conditions and life indexes
- Scheduled job that logs daily city weather summaries for dashboards or reports
- Lightweight home automation: trigger actions (e.g., close windows) when precipitation is detected
- CI/test environments needing deterministic, low-cost weather lookups without external APIs
- Local tools for Chinese-language displays or status boards that prefer native formatting
FAQ
No. The script scrapes weather.com.cn directly and requires no API key or model credentials.
How do I add a city not in the mapping file?
Find the city code from the weather.com.cn city page URL and add a line "CityName,Code" to weather_codes.txt, then run the script with the city name.