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


相关推荐
小七-七牛开发者7 天前
Agent 支线知识:Personal Agent 的前世今生
dots·aiagent·openclaw·muse·personalagent
会思想的苇草i7 天前
OpenClaw 添加技能(Skills) & 常用命令
ai·大模型·skills·openclaw
ShiMetaPi8 天前
182X 端云协同方案详解:部署你的本地 AI Agent 主机
边缘计算·rk3588·aiagent·openclaw·rk1828
七夜zippoe11 天前
把 OpenClaw Agent 搬进 K8s:容器化部署全记录
ai·云原生·容器·kubernetes·openclaw
鬼手点金14 天前
nanoGPT/nanochat 能做出 DeepSeek/Qwen 这样的大模型吗?
服务器·前端·javascript·bug·openclaw
Pniubi16 天前
基于openclaw实现自定义mcp/skill(第三章)
自研·skill·openclaw
Pniubi17 天前
基于openclaw开发skill与自研agent中的skill开发区别
服务器·agent·skill·openclaw·龙虾
进击的雷神20 天前
把 Claude/GPT 接进飞书、Telegram、Discord:一条命令跑起来的 OpenClaw 部署工具
gpt·飞书·openclaw
鬼手点金21 天前
opencode-隐私优先配置
服务器·前端·javascript·bug·openclaw
AC赳赳老秦24 天前
OpenClaw 与 FineBI 联动方案:公开数据自动采集与实时业务分析看板实践
大数据·开发语言·python·php·finebi·deepseek·openclaw