Imported from lovellfelix/skills (
portable/weather-forecast/SKILL.md). Install upstream withnpx skills add lovellfelix/skills --skill weather-forecast. Copyright stays with the author.
Weather Forecast Skill
What This Skill Covers
- Current conditions and today's summary
- Short multi-day forecasts
- ZIP-first weather lookup without API keys
- Lat/lon fallback when coordinates are already known
Preferred Helper Paths
Use the shared helper when possible:
bash scripts/weather.sh
If a runtime restricts execution to OpenCode-managed paths, use the wrapper instead:
bash ~/.config/opencode/scripts/weather.sh
Personal Machine Activation
This skill is personal-machine only.
- Linked automatically when
~/.overlay/local/.enabledis absent (no allowlist to maintain).
Default No-Key Workflow
- Prefer a stored ZIP/postal preference when available.
- Otherwise accept an explicit
--zipor--lat/--loninput. - Call the helper.
- Return concise weather results, not raw API dumps unless JSON was requested.
Supported commands:
bash scripts/weather.sh today --zip 75077 --json
bash scripts/weather.sh forecast --zip 75077 --days 5 --json
bash scripts/weather.sh today --lat 32.9919 --lon -97.0700 --json
Session Memory
If the user often asks for local weather, reuse a saved ZIP value.
session_memory action=track_user_preference category=workflow key=zip_code value=75077 confidence=1.0
Provider Rules
| Use case | Default provider | API key required |
|---|---|---|
| ZIP geocoding | OSM Nominatim | No |
| Weather forecast | Open-Meteo | No |
| Paid weather provider | Optional future path | Yes |
Default behavior stays keyless.
Practical Workflows
Today's weather from ZIP
bash scripts/weather.sh today --zip 75077 --json
Five-day forecast from ZIP
bash scripts/weather.sh forecast --zip 75077 --days 5 --json
Forecast from known coordinates
bash scripts/weather.sh forecast --lat 32.9919 --lon -97.0700 --days 3 --json
Troubleshooting
Invalid ZIP code: use a 5-digit US ZIP.Location not specified: pass--zipor--lat/--lon.Weather API request failed: retry once and keep the request volume low.- If a runtime blocks the shared helper path, retry with the OpenCode wrapper path.
Validation
bash scripts/weather.sh today --zip 75077 --json
bash scripts/weather.sh forecast --zip 75077 --days 3 --json
bash ~/.config/opencode/scripts/weather.sh today --zip 75077 --json