微算力 · API 导航与自营网关
API 接入 EN
未登录登录
🌤️

全球天气·免钥即查·双源备用

Weather Open‑Meteo · v0.1.5
效率 安全 A 级 作者 vdiogov 公开目录收录
1.2k 下载 0 安装 3.5k 收藏 14 浏览

简介

免API密钥获取全球实时天气与7日预报,Open-Meteo官方接口+wttr.in双源保障

原始描述

Get current weather and forecasts via open-meteo.com with optional fallback to wttr.in if available. No API key required.

通过你的 Agent 添加

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/weather-open-meteo/
Codex CLI~/.codex/skills/weather-open-meteo/
DeepSeek Harness~/.agents/skills/weather-open-meteo/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

技能正文


name: weather-open-meteo description: "Get current weather and forecasts via open-meteo.com with optional fallback to wttr.in if available. No API key required." homepage: https://open-meteo.com/ metadata: openclaw: emoji: 🌤️ requires: bins: - curl - jq

Weather Open‑Meteo Skill

This skill provides current weather and simple forecasts by querying the open‑meteo.com public API. If the geocoding lookup or weather request fails, the skill can fall back to wttr.in as a lightweight alternative.

📌 Scope & Caveats

  • The skill requires curl and jq.
  • Location parameters are encoded before being sent to the API.
  • Examples below demonstrate safe query construction using jq @uri.

✅ When to Use

✔ The user asks for weather, forecast, temperature, or rain probability for a location. ✖ Not for historical data, severe alerts, or detailed climatology.

📋 Commands

The skill accepts a single argument: a location name (city, region, or coordinates in lat,lon).

Open‑Meteo (primary, JSON)

Geocoding (co‑ordinates for a place):

curl -s "https://geocoding-api.open-meteo.com/v1/search?name=São+Paulo\u0026count=1" | jq '.results[0] | {name, latitude, longitude}'

Current weather (by co‑ordinates):

curl -s "https://api.open-meteo.com/v1/forecast?latitude=-23.55\u0026longitude=-46.63\u0026current_weather=true" | jq '.current_weather'

7‑day forecast (by co‑ordinates):

curl -s "https://api.open-meteo.com/v1/forecast?latitude=-23.55\u0026longitude=-46.63\u0026daily=temperature_2m_max,temperature_2m_min,precipitation_sum\u0026forecast_days=7" | jq '.daily'

Example JSON excerpt

{
  "latitude": -23.55,
  "longitude": -46.63,
  "current_weather": {
    "temperature": -5.3,
    "windspeed": 3.9,
    "winddirection": 200,
    "weathercode": 80,
    "time": "2024-02-18T14:00"
  }
}

📖 Open‑Meteo API docs

wttr.in (fallback)

One‑liner (HTML text):

curl -s "wttr.in/São+Paulo?format=3"

Compact plain‑text:

curl -s "wttr.in/São+Paulo?format=1"

PNG image (for terminals or embeds):

curl -s -o sp.png "http://wttr.in/São+Paulo?format=1"

📚 Example (User Query)

User: What's the weather in São Paulo? Agent: Current conditions in São Paulo: 🌤️ +10 °C, 20% chance of rain

Tips

  • URL‑encode city names:
    curl -s "https://geocoding-api.open-meteo.com/v1/search?name=$(echo São Paulo | jq -sRr @uri)"
    
  • Use jq to build the query dynamically:
    city="São Paulo"
    lat=$(curl -s "https://geocoding-api.open-meteo.com/v1/search?name=$(echo $city | jq -sRr @uri)" | jq -r '.results[0].latitude')
    lon=$(curl -s "https://geocoding-api.open-meteo.com/v1/search?name=$(echo $city | jq -sRr @uri)" | jq -r '.results[0].longitude')
    
  • You can pass latitude and longitude directly if you know them.
  • The API is rate‑limited (≈100 requests/min). Keep scripts cached or use short intervals.

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

weatherapiforecastcurlopen-meteowttrgeocodingcli

同类 Skill