Introduction
# Weather Skill v1.1.0
Fast, reliable weather lookups with caching and automatic fallback between multiple sources.
## Features
- ā” **Fast**: Caches results for 30 minutes (instant response for repeated queries) - š **Reliable**: Automatic fallback from wttr.in ā Open-Meteo - š **Smart defaults**: Raleigh, NC as default; common cities pre-configured - š ļø **Tool-ready**: Exposes `weather_fetch` tool for direct integration - š¬ **Slash command**: Can be registered as native Discord/Telegram command
## Usage
### As a Tool
```python # Fetch weather for default location (Raleigh) weather_fetch()
# Fetch weather for specific city weather_fetch(location="San Francisco") ```
### Command Line
```bash # Default (Raleigh) python3 weather_fetch.py
# Specific city python3 weather_fetch.py "New York"
# JSON output python3 weather_fetch.py "Boston" --json ```
### Discord Slash Command
After installing, the skill can be invoked via: ``` /weather [city] ```
Examples: - `/weather` ā Weather for Raleigh - `/weather Atlanta` ā Weather for Atlanta - `/weather San Francisco` ā Weather for SF
## How It Works
1. **Check cache** ā If cached result is < 30 min old, return it instantly 2. **Try wttr.in** ā Fast, pretty formatting with emoji 3. **Fallback to Open-Meteo** ā Reliable JSON API, no rate limits 4. **Cache result** ā Save for next time
## Supported Cities
Pre-configured with coordinates for 50+ major US cities including: - Raleigh, Durham, Chapel Hill, Charlotte (NC) - Atlanta, NYC, LA, Chicago, Houston, Phoenix - Boston, Seattle, Denver, Miami, Austin
**Not in the list?** The skill defaults to Raleigh coordinates. Add more cities to `weather_fetch.py` in the `COORDS` dict.
## Data Sources
| Source | Type | Fallback Order | |--------|------|----------------| | wttr.in | Text/Emoji | Primary | | Open-Meteo | JSON API | Fallback |
## Files
- `skill.yaml` ā Skill manifest - `weather_fetch.py` ā Main fetcher with caching - `weather_fetch.tool.json` ā Tool schema - `SKILL.md` ā This documentation
## Cache Location
``` ~/.openclaw/.cache/weather/ āāā raleigh.json āāā atlanta.json āāā ... ```
## Version History
- **1.1.0** ā Added caching, fallback logic, tool definition, 50+ city coords - **1.0.0** ā Initial documentation-only skill
## License
MIT