OpenClaw01-Skill-天气

OpenClaw01-Skill-天气

尝试使用OpenClaw,进行过程记录


1-知识总结

核心要求:使用SKILL.md说明查询天气的技能说明,不进行复杂的说明,可以提供参考的文档说明


2-openClaw如何实现天气查询

使用SKILL.md进行技能说明

- 打印SKILL.md

~/.nvm/versions/node/v22.22.0/lib/node_modules/openclaw/skills/weather/SKILL.md


3-weather/SKILL.md


name: weather

description: Get current weather and forecasts (no API key required).
homepage: https://wttr.in/:help
metadata: { "openclaw": { "emoji": "🌤️", "requires": { "bins": ["curl"] } } }

Weather

Two free services, no API keys needed.

wttr.in (primary)

Quick one-liner:

bash 复制代码
curl -s "wttr.in/London?format=3"
# Output: London: ⛅️ +8°C

Compact format:

bash 复制代码
curl -s "wttr.in/London?format=%l:+%c+%t+%h+%w"
# Output: London: ⛅️ +8°C 71% ↙5km/h

Full forecast:

bash 复制代码
curl -s "wttr.in/London?T"

Format codes: %c condition · %t temp · %h humidity · %w wind · %l location · %m moon

Tips:

  • URL-encode spaces: wttr.in/New+York
  • Airport codes: wttr.in/JFK
  • Units: ?m (metric) ?u (USCS)
  • Today only: ?1 · Current only: ?0
  • PNG: curl -s "wttr.in/Berlin.png" -o /tmp/weather.png

Open-Meteo (fallback, JSON)

Free, no key, good for programmatic use:

bash 复制代码
curl -s "https://api.open-meteo.com/v1/forecast?latitude=51.5&longitude=-0.12&current_weather=true"

Find coordinates for a city, then query. Returns JSON with temp, windspeed, weathercode.

Docs: https://open-meteo.com/en/docs


相关推荐
李彦亮老师(本人)8 小时前
OpenClaw 随机封面摘要标签自动发布测试
openclaw·发布测试
维度攻城狮9 小时前
Docker优雅地运行OpenClaw
运维·docker·容器·openclaw·openclaw安装
YUNDUANNET13 小时前
AI驱动,不止于概念 | VeryCloud联合亚马逊云科技深度解读OpenClaw开发范式革命
人工智能·科技·openclaw
七夜zippoe15 小时前
OpenClaw 多渠道统一管理:构建全平台智能消息中枢
开发语言·microsoft·github·多渠道·openclaw
2501_9481142416 小时前
OpenClaw数据采集实战:用星链4SAPI给AI采集装上“稳定引擎”
服务器·人工智能·ai·openclaw
小白电脑技术16 小时前
如何给OpenClaw配置模型提供商API和大模型?
windows·电脑·openclaw
AC赳赳老秦17 小时前
自媒体博主:OpenClaw多Agent协同,实现选题-创作-审核全流程自动化
运维·服务器·开发语言·人工智能·自动化·媒体·openclaw
counsellor17 小时前
ubuntu环境下openclaw2026.3.28安装
openclaw
Zero.Ki17 小时前
MiniMax 权益码 Token Plan 套餐 9 折优惠
ai·ai agent·minimax·openclaw·token plan
烟沙九洲17 小时前
Windows 安装 OpenClaw 记录
openclaw