---
name: weather
description: 'Live current conditions and three-day forecasts for any place. Tools: current, forecast, frog. Use when a request needs any of these; each tool''s own trigger is in SKILL.md.'
compatibility: Requires fragletc and Docker. Network access required.
metadata:
  tags: world
  tools: current.py, forecast.py, frog.py
---

# Weather

Live current conditions and three-day forecasts for any place.

Every tool below is one executable file beside this `SKILL.md`, in the directory the commands below call `<skill-dir>`. Run it directly. Two host requirements: [`fragletc`](https://github.com/ofthemachine/fraglet) (`curl -fsSL https://raw.githubusercontent.com/ofthemachine/fraglet/main/install.sh | sh && fragletc version`) and Docker; the image, parameters, outputs and network reach are declared in the file itself. Before running a tool, print its contract:

```sh
<skill-dir>/current.py --fraglet-help
```

Parameters are passed as `-p name=value` (a `file` parameter takes a host path); declared outputs are copied out with `--output <name>[=<host path>]`. A missing required parameter fails host-side with exit 2 before any container starts; otherwise the tool's own exit code is the run's. A declared output not named with `--output` is produced and discarded (a stderr note says what you could have copied). Add `--receipt run.json` (or set `FRAGLETC_RECEIPT_DIR`) to record the run: the receipt carries the tool's `procedure_hash`, image digest, parameters, and every input and output by content hash, and `receipt/attest.py` can verify it later without re-running anything.

## Tools

### `current.py`

Real current conditions for any city, via wttr.in's compact one-line format (%l: +%t %C) -- genuinely current, not a canned response. Outputs a single short phrase ready for captions or notifications, avoiding unrenderable emoji glyphs.

Use when the user asks what the weather is like right now somewhere, or a caption or notification needs a live conditions phrase.

```sh
<skill-dir>/current.py -p location="<location>"
```

Parameters:
- `location` (string, required) — City, region, or landmark, e.g. Vancouver or Mount Fuji

Outputs:
- stdout

Runs in `ofthemachine/python3@sha256:a015b4f9f0e7c1648f8fcd4164f6a296dd3c9189404f88f333a9764d08d13522`; network required — output depends on live external state; do not cache indefinitely.

### `forecast.py`

Three-day weather forecast for a city, region, or landmark (Open-Meteo geocoding + forecast, no API key). Companion to weather/current.py, which only covers right now and takes the same location parameter. Pass day=0/1/2 to print just today, tomorrow, or day after; omitted prints all three days.

Use when the user asks about tomorrow's or the next few days' weather somewhere, or wants a planning-grade forecast rather than current conditions.

```sh
<skill-dir>/forecast.py -p location="<location>" [-p day="<day>"]
```

Parameters:
- `location` (string, required) — City, region, or landmark, e.g. Vancouver or Mount Fuji
- `day` (string, optional) — 0 today, 1 tomorrow, 2 day after; omit for all three

Outputs:
- stdout

Runs in `ofthemachine/python3@sha256:a015b4f9f0e7c1648f8fcd4164f6a296dd3c9189404f88f333a9764d08d13522`; network required — output depends on live external state; do not cache indefinitely.

### `frog.py`

A weather frog (Wetterfrosch): how nice one day will be somewhere, as a rung on its ladder from 0 (stay in) to 1 (glorious), plus a one-line croak saying why and whether to take an umbrella, and the chance of rain (rain.txt, 0 to 1) a body can drink from. Open-Meteo, no API key. The rung is a number a body can climb by; the croak is what it says.

Use when an agent's body or a morning card wants the forecast as one number and one line rather than a table.

```sh
<skill-dir>/frog.py -p location="<location>" [-p day=1] --output rung.txt
```

Parameters:
- `location` (string, required) — City, region, or landmark, e.g. Toronto
- `day` (string, optional, default `1`) — 0 today, 1 tomorrow, 2 the day after

Outputs:
- `rung.txt` — copy out with `--output rung.txt[=<host path>]`
- `croak.txt` — copy out with `--output croak.txt[=<host path>]`
- `rain.txt` — copy out with `--output rain.txt[=<host path>]`

Runs in `ofthemachine/python3@sha256:a015b4f9f0e7c1648f8fcd4164f6a296dd3c9189404f88f333a9764d08d13522`; network required — output depends on live external state; do not cache indefinitely.
