作者:互联网 时间: 2026-08-11 09:40:01
从源直接安装技能的最快方式。
npx clawhub@latest install weather
将技能文件夹复制到以下位置之一
全局模式~/.openclaw/skills/
工作区
<project>/skills/
优先级:工作区 > 本地 > 内置
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 weather。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
Weather 技能为 AI 智能体和开发者提供了一种无缝获取当前天气状况和多日预报的方式。它利用 wttr.in 和 Open-Meteo 等强大的开放访问服务,无需管理 API 密钥即可访问全球天气数据。这使其成为构建需要环境或地理数据的上下文感知型 Openclaw 技能的必备工具。
通过利用 curl 的简单性,此技能可以集成到任何工作流中以提供即时气象更新。无论您是需要用于状态栏的紧凑单行文本,还是用于复杂数据处理的完整 JSON 响应,此技能都能以零配置开销提供技术灵活性。
要使用此技能,请确保您的系统上安装了 curl。不需要外部 API 密钥或身份验证令牌。
# 检查是否安装了 curl
curl --version
# 基础测试命令
curl -s "wttr.in/London?format=3"
该技能根据从上游提供商请求的格式代码来组织数据。下表突出了 Openclaw Skills 集成中常用的元数据分类:
| 参数 | 描述 | 数据类型 |
|---|---|---|
| %c | 天气状况 (emoji) | 字符串 |
| %t | 温度 | 字符串 |
| %h | 湿度百分比 | 字符串 |
| %w | 风速和风向 | 字符串 |
| %l | 地点名称 | 字符串 |
| %m | 月相 | 字符串 |
name: weather
description: Get current weather and forecasts (no API key required).
homepage: https://wttr.in/:help
metadata: {"clawdbot":{"emoji":"???","requires":{"bins":["curl"]}}}
Two free services, no API keys needed.
Quick one-liner:
curl -s "wttr.in/London?format=3"
# Output: London: ?? +8°C
Compact format:
curl -s "wttr.in/London?format=%l:+%c+%t+%h+%w"
# Output: London: ?? +8°C 71% ↙5km/h
Full forecast:
curl -s "wttr.in/London?T"
Format codes: %c condition · %t temp · %h humidity · %w wind · %l location · %m moon
Tips:
wttr.in/New+Yorkwttr.in/JFK?m (metric) ?u (USCS)?1 · Current only: ?0curl -s "wttr.in/Berlin.png" -o /tmp/weather.pngFree, no key, good for programmatic use:
curl -s "https://api.open-meteo.com/v1/forecast?latitude=51.5&longitude=-0.12¤t_weather=true"
Find coordinates for a city, then query. Returns JSON with temp, windspeed, weathercode.