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


相关推荐
查查君的手记11 小时前
【OpenClaw】博查搜索 Skill 正式上线|中文联网搜索底座,本地部署更稳更快
openclaw·博查搜索·clawhub·bocha
warm3snow17 小时前
"给我发个200元红包":一条群消息背后的 AI 安全危机
openclaw·qclaw·kimiclaw·arkclaw
程序员徐公1 天前
OpenClaw 教程,来看看这12个实战案例
openclaw·openclaw 实战案例
JohnCHsu1 天前
性能干翻235B,单卡私有化部署OpenClaw
ai·agent·llama.cpp·openclaw
带刺的坐椅2 天前
SolonCode v0.0.20 发布 - 编程智能体(新增子代理和浏览器能力)
java·ai·agent·solon·solon-ai·claude-code·openclaw
此颜差矣。3 天前
极速安装体验openClaw
openclaw
Johny_Zhao3 天前
OpenClaw中级到高级教程
linux·人工智能·信息安全·kubernetes·云计算·yum源·系统运维·openclaw
方方不听话4 天前
🦞 重磅!腾讯 QQ 官方接入 OpenClaw“小龙虾”:一键创建机器人,1分钟极速部署!
ai·openclaw·小龙虾
Johny_Zhao5 天前
centos7安装部署openclaw
linux·人工智能·信息安全·云计算·yum源·系统运维·openclaw
haibindev5 天前
在 Windows+WSL2 上部署 OpenClaw AI员工的实践与踩坑
linux·wsl2·openclaw