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


相关推荐
七夜zippoe1 天前
OpenClaw Webhook 与 Hooks 机制详解
人工智能·架构·webhook·hooks·openclaw
一个扣子1 天前
OpenClaw 运维完全手册|日志分析、实时监控与故障排查指南
运维·监控·故障排查·健康检查·openclaw·clawmetry·openclawdoctor
翼龙云_cloud1 天前
腾讯云代理商:云上 OpenClaw5 分钟接入 Slack 指南 AI 助手一键部署实战
服务器·人工智能·云计算·腾讯云·openclaw
AC赳赳老秦1 天前
OpenClaw与系统环境冲突:Windows/Mac系统兼容问题解决指南
开发语言·python·产品经理·策略模式·pygame·deepseek·openclaw
一个扣子1 天前
OpenClaw 安全配置指南|沙箱隔离、执行审批与权限最小化最佳实践
安全配置·沙箱隔离·openclaw·执行审批·权限最小化·凭证安全·技能审计
007张三丰1 天前
给AI装上“万能工具箱”:OpenClaw Skills从入门到安全实战
供应链安全·skills·openclaw·clawhub·ai技能包·龙虾skill
张忠琳1 天前
【openclaw】OpenClaw Tasks 模块超深度架构分析
ai·架构·openclaw
小锋学长生活大爆炸1 天前
【教程】在Docker中部署Hermes Agent
docker·容器·agent·教程·工具·openclaw·hermes
CV工程师(Ctrl)2 天前
OpenClaw 安装与飞书接入(2026-04-19)
node.js·github·飞书·火山引擎·openclaw
默 语2 天前
“我跑不过我的代码“:今天北京半马,程序员追机器人追到开电瓶车
人工智能·机器人·openclaw