home / skills / openclaw / openclaw / weather

weather skill

/skills/weather

This skill provides current weather and forecasts using free services, delivering concise, actionable insights without requiring an API key.

This is most likely a fork of the mh-weather skill from openclaw
npx playbooks add skill openclaw/openclaw --skill weather

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
2.2 KB
---
name: weather
description: "Get current weather and forecasts via wttr.in or Open-Meteo. Use when: user asks about weather, temperature, or forecasts for any location. NOT for: historical weather data, severe weather alerts, or detailed meteorological analysis. No API key needed."
homepage: https://wttr.in/:help
metadata: { "openclaw": { "emoji": "šŸŒ¤ļø", "requires": { "bins": ["curl"] } } }
---

# Weather Skill

Get current weather conditions and forecasts.

## When to Use

āœ… **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
# 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"
```

### Forecasts

```bash
# 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"
```

### Format Options

```bash
# 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` — Weather condition emoji
- `%t` — Temperature
- `%f` — "Feels like"
- `%w` — Wind
- `%h` — Humidity
- `%p` — Precipitation
- `%l` — Location

## Quick Responses

**"What's the weather?"**

```bash
curl -s "wttr.in/London?format=%l:+%c+%t+(feels+like+%f),+%w+wind,+%h+humidity"
```

**"Will it rain?"**

```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`

Overview

This skill provides current weather and forecasts without requiring any API key. It uses wttr.in for quick human-friendly results and falls back to Open-Meteo for programmatic JSON data. It is lightweight, easy to integrate, and works anywhere with HTTP access.

How this skill works

For human-readable and compact summaries the skill queries wttr.in using simple URL formats and optional format codes. For structured programmatic responses it calls Open-Meteo with latitude/longitude to return JSON containing current weather, wind, and weather codes. It supports unit selection, location encoding, and image (PNG) output.

When to use it

  • Quick one-line weather for a city, airport code, or coordinates
  • Embed a small weather widget or generate a forecast image
  • Programmatic ingestion of current weather into scripts or automations
  • Fallback JSON data when you need numeric values for processing
  • Local or offline-friendly setups that avoid API keys or account limits

Best practices

  • URL-encode multiword locations (e.g., New+York) to avoid errors
  • Prefer wttr.in for readable outputs and Open-Meteo for strict JSON parsing
  • Use format codes on wttr.in to tailor short summaries (%l %c %t %h %w)
  • Cache responses briefly to avoid repeated identical requests and reduce latency
  • Convert city names to coordinates when calling Open-Meteo for consistent results

Example use cases

  • CLI: show a quick one-liner with curl: wttr.in/London?format=3
  • Automation: fetch JSON from Open-Meteo for a home automation dashboard
  • Email/report: generate a small PNG forecast image via wttr.in/Berlin.png and attach it
  • Monitoring: poll current_weather from Open-Meteo for trend detection
  • Chat assistant: return friendly text summaries or compact formatted weather snippets

FAQ

Do I need an API key?

No. Both wttr.in and Open-Meteo are free and do not require API keys.

Which service should I pick for my use case?

Use wttr.in for human-friendly text or images and quick CLI lookups. Use Open-Meteo when you need reliable, structured JSON for programmatic processing.