open-meteo-flood-fetch
Installation
SKILL.md
Open-Meteo Flood Fetch
Core Goal
- Fetch Open-Meteo flood data for one or more coordinates in one invocation.
- Support inclusive
start_dateandend_datewindows. - Return machine-readable JSON with request metadata, transport info, validation summary, and normalized records.
- Keep runtime observable with structured logs and optional log file output.
Required Environment
- Configure runtime by environment variables (see
references/env.md). - Start from
assets/config.example.env. - Load env values before running commands:
set -a
source assets/config.example.env
set +a
Workflow
- Validate effective configuration.
python3 scripts/open_meteo_flood_fetch.py check-config --pretty
- Dry-run the request plan first.
python3 scripts/open_meteo_flood_fetch.py fetch \
--location 52.52,13.41 \
--start-date 2026-03-01 \
--end-date 2026-03-05 \
--daily-var river_discharge \
--timezone GMT \
--dry-run \
--pretty
- Run the fetch with validation and operational logs.
python3 scripts/open_meteo_flood_fetch.py fetch \
--location 52.52,13.41 \
--location 48.85,2.35 \
--start-date 2026-03-01 \
--end-date 2026-03-05 \
--daily-var river_discharge \
--daily-var river_discharge_p75 \
--ensemble \
--cell-selection nearest \
--timezone GMT \
--output ./data/open-meteo/open-meteo-flood-fetch.json \
--log-level INFO \
--log-file ./logs/open-meteo-flood-fetch.log \
--pretty
Built-in Robustness
- Retry transient HTTP and network failures with exponential backoff.
- Respect
Retry-Afterwhen present and fail fast when it exceeds configured cap. - Throttle request rate with minimum request interval.
- Enforce safety caps before remote calls:
- maximum locations
- maximum day range
- maximum daily variables
- Validate transport:
- HTTP status handling
- JSON content-type
- UTF-8 strict decode
- JSON parse
- Validate structure:
- response object/list shape
dailyanddaily_unitspresence- time axis parseability and range checks
- requested variable presence and aligned array lengths
- optional ensemble member field alignment when
--ensembleis enabled
Scope Decision
- Keep one atomic fetch implementation for the Open-Meteo flood endpoint only.
- Do not embed alert thresholds, geocoding, polling loops, or flood interpretation logic.
- If recurring execution is needed, let OpenClaw orchestrate repeated calls externally.
References
references/env.mdreferences/open-meteo-flood-api-notes.mdreferences/open-meteo-flood-limitations.mdreferences/openclaw-chaining-templates.md
Script
scripts/open_meteo_flood_fetch.py
OpenClaw Invocation Compatibility
- Keep trigger metadata in
name,description, andagents/openai.yaml. - Invoke with
$open-meteo-flood-fetch. - Keep calls atomic and parameterized by:
--location--start-date--end-date--daily-var--ensemble--cell-selection
- Use OpenClaw orchestration, not this script, for recurring jobs.
OpenClaw Prompt Templates
Use these templates directly in OpenClaw and only replace bracketed placeholders.
- Recon (dry-run)
Use $open-meteo-flood-fetch.
Run:
python3 scripts/open_meteo_flood_fetch.py fetch \
--location [LATITUDE,LONGITUDE] \
--start-date [YYYY-MM-DD] \
--end-date [YYYY-MM-DD] \
--daily-var river_discharge \
--timezone GMT \
--dry-run \
--pretty
Return only the JSON result.
- Fetch (flood verification window)
Use $open-meteo-flood-fetch.
Run:
python3 scripts/open_meteo_flood_fetch.py fetch \
--location [LATITUDE,LONGITUDE] \
--start-date [YYYY-MM-DD] \
--end-date [YYYY-MM-DD] \
--daily-var river_discharge \
--daily-var river_discharge_p75 \
--ensemble \
--cell-selection nearest \
--timezone GMT \
--pretty
Return only the JSON result.
- Validate (quality gate)
Use $open-meteo-flood-fetch.
Run:
python3 scripts/open_meteo_flood_fetch.py fetch \
--location [LATITUDE,LONGITUDE] \
--start-date [YYYY-MM-DD] \
--end-date [YYYY-MM-DD] \
--daily-var river_discharge \
--timezone GMT \
--pretty
Check validation_summary.total_issue_count and validation_summary.ok.
Return JSON plus one-line pass/fail verdict.