Skill: weather


Weather Skill

Fast, reliable current weather via wttr.in — one curl call, no API key, no browser required, works in containers and VMs where Chrome/Chromium is unavailable.

When to Use

DO NOT use delegate_task for simple weather lookups

delegate_task with toolsets=["web"] for a simple weather query timed out at 216 seconds in practice. Use curl wttr.in directly instead — it's the right tool for this class of task.

Quick One-Liner (current conditions)

curl -s "https://wttr.in/<CITY>,<COUNTRY_CODE>?format=%l:+%C,+%t,+vítr+%w,+vlhkost+%h"

Format tokens

Token Meaning
%l Location name
%C Weather condition (text)
%t Temperature
%w Wind speed + direction arrow
%h Humidity
%p Precipitation (mm)
%P Atmospheric pressure (hPa)
%S Sunrise time
%s Sunset time
%m Moon phase

Examples

# Current weather — Czech city
curl -s "https://wttr.in/Zlin,CZ?format=%l:+%C,+%t,+vítr+%w,+vlhkost+%h"
# → zlin,cz: Partly cloudy, +14°C, vítr ↓7km/h, vlhkost 82%

# Specific small village with district (disambiguate with full name)
curl -s "https://wttr.in/Hrusky,Breclav,CZ?format=%l:+%C,+%t,+vítr+%w,+vlhkost+%h"

# Simple 3-field format (city + condition + temp)
curl -s "https://wttr.in/Prague?format=3"
# → Prague: ⛅  +17°C

# Full ASCII forecast block (3 days)
curl -s "https://wttr.in/London?lang=en"

Multi-Day Forecast (JSON)

curl -s "https://wttr.in/<CITY>.json" | python3 -c "
import json,sys
d = json.load(sys.stdin)
cc = d['current_condition'][0]
print(f\"Temp: {cc['temp_C']}°C, Feels like: {cc['FeelsLikeC']}°C\")
print(f\"Condition: {cc['weatherDesc'][0]['value']}\")
print(f\"Wind: {cc['windspeedKmph']} km/h {cc['winddir16Point']}\")
print(f\"Humidity: {cc['humidity']}%\")
"

Language Support

Append &lang=<code> for localized condition strings:

curl -s "https://wttr.in/Praha?format=%C+%t&lang=cs"   # Czech
curl -s "https://wttr.in/Berlin?format=%C+%t&lang=de"  # German
curl -s "https://wttr.in/Paris?format=%C+%t&lang=fr"   # French

Pitfalls

Presenting Results in Chat

Format with emojis for readability in Discord/Telegram:

🌤️ **Počasí v Zlíně**
- 🌥️ Podmínky: Částečně oblačno
- 🌡️ Teplota: +14 °C
- 💨 Vítr: 7 km/h (severní)
- 💧 Vlhkost: 82 %

Map condition keywords to emojis: - Clear / sunny → ☀️ - Partly cloudy → 🌤️ - Cloudy / overcast → ☁️ - Rain / drizzle → 🌧️ - Snow → ❄️ - Thunderstorm → ⛈️ - Fog / mist → 🌫️