Generate a beautiful SVG weather card for any city, then convert to PNG. Use when the user asks about weather, e.g. "今天北京天气怎么样", "上海天气", "weather in Tokyo", "查天气". Triggers on any weather-related query mentioning a location.
Generate a polished weather card (PNG) for any location using real-time weather data.
Use web_search to fetch current weather for the requested location. Search queries like:
"北京 今天天气 实时温度""Shanghai weather today temperature""广州 天气 湿度 风速"Extract these fields from search results:
If some fields are missing, use reasonable defaults but try to fill the core ones (temp, condition, high, low).
Run the script — it outputs PNG directly (SVG is handled internally as a temp file):
python3 /home/z/my-project/skills/weather-card/scripts/weather_card.py \
--city "北京" \
--temp "24" \
--condition "多云" \
--high "27" \
--low "18" \
--humidity "62%" \
--wind "12km/h" \
--uv "中等" \
--output /home/z/my-project/download/weather-北京.png
Only one file is produced: the PNG card. No SVG clutter.
Tell the user the card is ready. Keep it brief — the card speaks for itself.
| Condition | Visual |
|---|---|
| 晴 | Sun with rays |
| 多云 | Sun + cloud |
| 阴 | Cloud only |
| 小雨/中雨/大雨/暴雨 | Cloud + rain (varying intensity) |
| 雷阵雨 | Dark cloud + heavy rain + lightning |
| 雪 | Cloud + snowflakes |
| 雾 | Horizontal fog lines |
Each condition has its own color theme.
/home/z/my-project/download/