mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
feat(skills): Add 'Use when / Don't use when' routing blocks (#14521)
* feat(skills): add 'Use when / Don't use when' blocks to skill descriptions Based on OpenAI's Shell + Skills + Compaction best practices article. Key changes: - Added clear routing logic to skill descriptions - Added negative examples to prevent misfires - Added templates/examples to github skill - Included Blake's specific setup notes for openhue Skills updated: - apple-reminders: Clarify vs Clawdbot cron - github: Clarify vs local git operations - imsg: Clarify vs other messaging channels - openhue: Add device inventory, room layout - tmux: Clarify vs exec tool - weather: Add location defaults, format codes Reference: https://developers.openai.com/blog/skills-shell-tips * fix(skills): restore metadata and generic CLI examples --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
This commit is contained in:
@@ -5,50 +5,108 @@ homepage: https://wttr.in/:help
|
||||
metadata: { "openclaw": { "emoji": "🌤️", "requires": { "bins": ["curl"] } } }
|
||||
---
|
||||
|
||||
# Weather
|
||||
# Weather Skill
|
||||
|
||||
Two free services, no API keys needed.
|
||||
Get current weather conditions and forecasts.
|
||||
|
||||
## wttr.in (primary)
|
||||
## When to Use
|
||||
|
||||
Quick one-liner:
|
||||
✅ **USE this skill when:**
|
||||
|
||||
- "What's the weather?"
|
||||
- "Will it rain today/tomorrow?"
|
||||
- "Temperature in [city]"
|
||||
- "Weather forecast for the week"
|
||||
- Travel planning weather checks
|
||||
|
||||
## When NOT to Use
|
||||
|
||||
❌ **DON'T use this skill when:**
|
||||
|
||||
- Historical weather data → use weather archives/APIs
|
||||
- Climate analysis or trends → use specialized data sources
|
||||
- Hyper-local microclimate data → use local sensors
|
||||
- Severe weather alerts → check official NWS sources
|
||||
- Aviation/marine weather → use specialized services (METAR, etc.)
|
||||
|
||||
## Location
|
||||
|
||||
Always include a city, region, or airport code in weather queries.
|
||||
|
||||
## Commands
|
||||
|
||||
### Current Weather
|
||||
|
||||
```bash
|
||||
curl -s "wttr.in/London?format=3"
|
||||
# Output: London: ⛅️ +8°C
|
||||
# One-line summary
|
||||
curl "wttr.in/London?format=3"
|
||||
|
||||
# Detailed current conditions
|
||||
curl "wttr.in/London?0"
|
||||
|
||||
# Specific city
|
||||
curl "wttr.in/New+York?format=3"
|
||||
```
|
||||
|
||||
Compact format:
|
||||
### Forecasts
|
||||
|
||||
```bash
|
||||
curl -s "wttr.in/London?format=%l:+%c+%t+%h+%w"
|
||||
# Output: London: ⛅️ +8°C 71% ↙5km/h
|
||||
# 3-day forecast
|
||||
curl "wttr.in/London"
|
||||
|
||||
# Week forecast
|
||||
curl "wttr.in/London?format=v2"
|
||||
|
||||
# Specific day (0=today, 1=tomorrow, 2=day after)
|
||||
curl "wttr.in/London?1"
|
||||
```
|
||||
|
||||
Full forecast:
|
||||
### Format Options
|
||||
|
||||
```bash
|
||||
curl -s "wttr.in/London?T"
|
||||
# One-liner
|
||||
curl "wttr.in/London?format=%l:+%c+%t+%w"
|
||||
|
||||
# JSON output
|
||||
curl "wttr.in/London?format=j1"
|
||||
|
||||
# PNG image
|
||||
curl "wttr.in/London.png"
|
||||
```
|
||||
|
||||
Format codes: `%c` condition · `%t` temp · `%h` humidity · `%w` wind · `%l` location · `%m` moon
|
||||
### Format Codes
|
||||
|
||||
Tips:
|
||||
- `%c` — Weather condition emoji
|
||||
- `%t` — Temperature
|
||||
- `%f` — "Feels like"
|
||||
- `%w` — Wind
|
||||
- `%h` — Humidity
|
||||
- `%p` — Precipitation
|
||||
- `%l` — Location
|
||||
|
||||
- URL-encode spaces: `wttr.in/New+York`
|
||||
- Airport codes: `wttr.in/JFK`
|
||||
- Units: `?m` (metric) `?u` (USCS)
|
||||
- Today only: `?1` · Current only: `?0`
|
||||
- PNG: `curl -s "wttr.in/Berlin.png" -o /tmp/weather.png`
|
||||
## Quick Responses
|
||||
|
||||
## Open-Meteo (fallback, JSON)
|
||||
|
||||
Free, no key, good for programmatic use:
|
||||
**"What's the weather?"**
|
||||
|
||||
```bash
|
||||
curl -s "https://api.open-meteo.com/v1/forecast?latitude=51.5&longitude=-0.12¤t_weather=true"
|
||||
curl -s "wttr.in/London?format=%l:+%c+%t+(feels+like+%f),+%w+wind,+%h+humidity"
|
||||
```
|
||||
|
||||
Find coordinates for a city, then query. Returns JSON with temp, windspeed, weathercode.
|
||||
**"Will it rain?"**
|
||||
|
||||
Docs: https://open-meteo.com/en/docs
|
||||
```bash
|
||||
curl -s "wttr.in/London?format=%l:+%c+%p"
|
||||
```
|
||||
|
||||
**"Weekend forecast"**
|
||||
|
||||
```bash
|
||||
curl "wttr.in/London?format=v2"
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
- No API key needed (uses wttr.in)
|
||||
- Rate limited; don't spam requests
|
||||
- Works for most global cities
|
||||
- Supports airport codes: `curl wttr.in/ORD`
|
||||
|
||||
Reference in New Issue
Block a user