From f3165944d29df0810a1134ac08dabd53fa7bd370 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E6=BD=AE?= Date: Sat, 4 Apr 2026 08:00:47 +0800 Subject: [PATCH] docs: enhance weather-forecasts SKILL.md with time-range queries Add tomorrow, day after tomorrow, and 7-day weekly forecast examples. Expand Open-Meteo section with daily and hourly forecast endpoints. Co-Authored-By: Claude Opus 4.6 (1M context) --- skills/weather-forecasts/SKILL.md | 93 +++++++++++++++++++++++++++++ skills/weather-forecasts/_meta.json | 6 ++ 2 files changed, 99 insertions(+) create mode 100644 skills/weather-forecasts/SKILL.md create mode 100644 skills/weather-forecasts/_meta.json diff --git a/skills/weather-forecasts/SKILL.md b/skills/weather-forecasts/SKILL.md new file mode 100644 index 0000000..eca7dd6 --- /dev/null +++ b/skills/weather-forecasts/SKILL.md @@ -0,0 +1,93 @@ +--- +name: weather-forecasts +description: Get current weather and forecasts (no API key required). +homepage: https://wttr.in/:help +metadata: {"clawdbot":{"emoji":"🌤️","requires":{"bins":["curl"]}}} +--- + +# Weather + +Two free services, no API keys needed. + +## wttr.in (primary) + +Quick one-liner: +```bash +curl -s "wttr.in/London?format=3" +# Output: London: ⛅️ +8°C +``` + +Compact format: +```bash +curl -s "wttr.in/London?format=%l:+%c+%t+%h+%w" +# Output: London: ⛅️ +8°C 71% ↙5km/h +``` + +Full forecast (3 days): +```bash +curl -s "wttr.in/London?T" +``` + +### Querying by time range + +Current weather only: +```bash +curl -s "wttr.in/London?0&format=3" +``` + +Today's forecast: +```bash +curl -s "wttr.in/London?1&T" +``` + +Tomorrow's forecast: +```bash +curl -s "wttr.in/London?2&T" +# Shows today + tomorrow; extract the second day +``` + +Day after tomorrow: +```bash +curl -s "wttr.in/London?T" +# Default output shows 3 days (today, tomorrow, day after tomorrow) +``` + +Next 7 days (weekly forecast) — use Open-Meteo: +```bash +curl -s "https://api.open-meteo.com/v1/forecast?latitude=51.5&longitude=-0.12&daily=temperature_2m_max,temperature_2m_min,weathercode&timezone=auto&forecast_days=7" +``` + +### Format codes + +`%c` condition · `%t` temp · `%h` humidity · `%w` wind · `%l` location · `%m` moon + +### Tips + +- URL-encode spaces: `wttr.in/New+York` +- Airport codes: `wttr.in/JFK` +- Units: `?m` (metric) `?u` (USCS) +- Language: `?lang=ja` (Japanese), `?lang=zh` (Chinese), etc. +- PNG: `curl -s "wttr.in/Berlin.png" -o /tmp/weather.png` + +## Open-Meteo (fallback / extended forecasts, JSON) + +Free, no key, good for programmatic use and longer-range forecasts. + +Current weather: +```bash +curl -s "https://api.open-meteo.com/v1/forecast?latitude=51.5&longitude=-0.12¤t_weather=true" +``` + +7-day daily forecast (min/max temp, weather code): +```bash +curl -s "https://api.open-meteo.com/v1/forecast?latitude=51.5&longitude=-0.12&daily=temperature_2m_max,temperature_2m_min,weathercode,precipitation_sum&timezone=auto&forecast_days=7" +``` + +Hourly forecast for the next 2 days: +```bash +curl -s "https://api.open-meteo.com/v1/forecast?latitude=51.5&longitude=-0.12&hourly=temperature_2m,weathercode,precipitation&timezone=auto&forecast_days=2" +``` + +Find coordinates for a city, then query. Returns JSON with temp, windspeed, weathercode. + +Docs: https://open-meteo.com/en/docs diff --git a/skills/weather-forecasts/_meta.json b/skills/weather-forecasts/_meta.json new file mode 100644 index 0000000..4556002 --- /dev/null +++ b/skills/weather-forecasts/_meta.json @@ -0,0 +1,6 @@ +{ + "ownerId": "kn70pywhg0fyz996kpa8xj89s57yhv26", + "slug": "weather", + "version": "1.0.0", + "publishedAt": 1767545394459 +} \ No newline at end of file