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


相关推荐
雅菲奥朗17 小时前
企业级 AI 自动化|OpenClaw 龙虾实战与认证
运维·人工智能·自动化·openclaw
无心水1 天前
【Harness:落地实战】19、从67%到92%:Hermes学习循环与GEPA算法如何实现AI自进化?——自进化核心引擎深度解析
人工智能·性能优化·openclaw·harness·hermes·honcho
AC赳赳老秦1 天前
OpenClaw批量任务队列优化:解决任务堆积、执行缓慢、优先级混乱问题
java·大数据·数据库·c++·自动化·php·openclaw
七夜zippoe1 天前
OpenClaw Canvas 执行:JavaScript 注入实战
开发语言·javascript·udp·canvas·openclaw
x-cmd1 天前
[260531] OpenClaw 五月月报:模型接入大爆发、安全重构、手机端终于能当主控台用了 [特殊字符]
安全·ai·智能手机·重构·x-cmd·openclaw
小脑斧1232 天前
AI技能化落地:从对话式大模型到可生产、可复用的AI工程体系
人工智能·skills·openclaw·hermes·marvis
无心水2 天前
【Harness:落地实战】18、从“龙虾”到“爱马仕”:Hermes 进化,全自动自进化 Harness 的架构革命
人工智能·架构·openclaw·养龙虾·harness·hermes·honcho
Rubin智造社2 天前
OpenClaw实操指南42|安全边界2:提示词注入与沙箱防护
纵深防御·ai安全·提示词注入·agent安全·openclaw·安全边界·沙箱防护
追光者♂2 天前
【测评系列6】CSDN AI数字营销实测体验官——OpenClaw 数据采集工具新手入门指南
人工智能·深度学习·机器学习·ai·大模型·openclaw·前沿科学
Smartdaili China3 天前
OpenClaw赋能AI智能体:实时联网与网页抓取
人工智能·爬虫·ai·爬取·openclaw·open claw