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


相关推荐
带娃的IT创业者10 小时前
解密OpenClaw系列10-OpenClaw系统要求
人工智能·macos·ios·objective-c·ai智能体·智能体开发·openclaw
带娃的IT创业者13 小时前
解密OpenClaw系列09-OpenClaw核心功能特性
macos·objective-c·ai agent·ai智能体·openclaw
铁甲前沿13 小时前
OpenClaw从零开始(篇一,初识OpenClaw)
microsoft·openclaw
love530love1 天前
【OpenClaw 本地实战 Ep.3】突破瓶颈:强制修改 openclaw.json 解锁 32k 上下文记忆
人工智能·windows·json·cuda·lm studio·openclaw·context length
vibecoding日记1 天前
OpenClaw怎么做到不串台、能并行、还总回对群 🤖✅(含源码解析)--OpenClaw系列第1期
ai助手·vibecoding·openclaw
小锋学长生活大爆炸1 天前
【教程】PicoClaw:在嵌入式设备上部署OpenClaw
docker·github·教程·工具·openclaw·picoclaw
CrazyStoneZw1 天前
openclaw配置ollama本地模型
本地化·ollama·openclaw
张小凡vip1 天前
OpenClaw简介--windows系统安装OpenClaw
人工智能·windows·openclaw
带娃的IT创业者1 天前
解密OpenClaw系列07-OpenClaw数据流分析
macos·软件工程·agent·ai智能体·智能体开发·openclaw