Google Weather: 全球实时天气数据与预报 - Openclaw Skills
作者:互联网
2026-03-25
什么是 Google Weather?
此技能通过利用 Google Weather 和 Geocoding API 的强大功能,使您的 AI 代理能够访问实时、超本地的天气数据。它提供全面的气象细节,包括当前状况、温度、湿度和风速,每 15 分钟更新一次以确保最高准确度。通过将其集成到 Openclaw Skills 中,开发人员可以创建上下文感知代理,以响应环境变化或协助用户进行日常规划。
除了基础的温度查询,该技能还支持全球地点查找,范围从主要城市到特定的地标或坐标。它能够返回易于阅读的格式化文本和原始 JSON 数据,这使其成为简单报告和复杂数据驱动自动化的通用工具。
下载入口:https://github.com/openclaw/skills/tree/main/skills/shaharsha/google-weather
安装与下载
1. ClawHub CLI
从源直接安装技能的最快方式。
npx clawhub@latest install google-weather
2. 手动安装
将技能文件夹复制到以下位置之一
全局模式~/.openclaw/skills/
工作区
/skills/
优先级:工作区 > 本地 > 内置
3. 提示词安装
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 google-weather。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
Google Weather 应用场景
- 为全球旅行或物流实时监控当前天气状况。
- 生成自动化的 24 小时天气预报,用于安排户外活动。
- 将超本地气候数据集成到生产力仪表板或智能家居例程中。
- 为 Openclaw Skills 内部的归档或分析目的获取结构化 JSON 天气数据。
- 用户提供位置输入,例如城市名称、地址或地标。
- 技能使用 Google Geocoding API 将位置字符串转换为地理坐标。
- 向 Google Weather API 发送请求以检索当前状况或每小时预报数据。
weather_helper.py脚本处理 API 响应,处理单位转换和表情符号格式化。- 最终输出以请求的格式(文本、预报或原始 JSON)交付给代理。
Google Weather 配置指南
- 在 Google Cloud Console 中创建一个新项目。
- 在 API 库中启用 Weather API 和 Geocoding API。
- 在凭据部分创建一个 API 密钥。
- 设置环境变量以验证技能:
export GOOGLE_API_KEY='your_google_api_key_here'
- 通过运行当前天气检查来验证安装:
python3 skills/google-weather/lib/weather_helper.py current "London"
Google Weather 数据架构与分类体系
该技能根据以下分类组织并返回天气数据:
| 属性 | 详情 |
|---|---|
| 温度 | 当前摄氏度和“体感”数值。 |
| 状况 | 视觉描述(例如晴朗、雨天)及对应的表情符号。 |
| 预报 | 包含温度、风力和天空状况的 24 小时每小时板块。 |
| 大气 | 湿度百分比、紫外线指数和云量。 |
| 风力 | 风速 (km/h)、方向和阵风信息。 |
| 降水 | 降雨或降雪的概率和类型。 |
name: google-weather
description: Google Weather API - accurate, real-time weather data. Get current conditions, temperature, humidity, wind, and forecasts. Powered by Google's Weather API for reliable, hyperlocal data updated every 15 minutes. Supports any location worldwide.
version: 1.2.0
author: Leo ??
tags: [weather, google, forecast, temperature, real-time, current-conditions, climate, wind, humidity]
metadata: {"clawdbot":{"emoji":"???","requires":{"env":["GOOGLE_API_KEY"]},"primaryEnv":"GOOGLE_API_KEY","secondaryEnv":["GOOGLE_WEATHER_API_KEY","GOOGLE_MAPS_API_KEY"]}}
allowed-tools: [exec]
Google Weather - Real-time Weather Data
Get accurate weather conditions using Google's Weather API. Requires a Google Cloud API key with Weather API enabled.
Quick Usage
# Current weather (formatted output)
python3 skills/google-weather/lib/weather_helper.py current "New York"
python3 skills/google-weather/lib/weather_helper.py current "London"
python3 skills/google-weather/lib/weather_helper.py current "Sydney"
# 24h Forecast
python3 skills/google-weather/lib/weather_helper.py forecast "Tel Aviv"
# Raw JSON data
python3 skills/google-weather/lib/weather_helper.py json "Paris"
Example Output
*New York*
Partly Cloudy ?
??? 12°C (feels like 10°C)
?? Wind: 18 km/h NORTHWEST
?? Humidity: 55%
*24h Forecast for Tel Aviv*
18:00: 17.8°C, ?? 5 km/h NORTH
22:00: 14.3°C, ?? 6 km/h EAST_NORTHEAST
02:00: 12.8°C, ? 8 km/h NORTHEAST
06:00: 10.8°C, ?? 6 km/h EAST_NORTHEAST
10:00: 16.1°C, ?? 5 km/h SOUTH
14:00: 20.4°C, ??? 8 km/h WEST_NORTHWEST
Supported Locations
Any location worldwide - just type the city name:
New York,London,Paris,Berlin,SydneySan Francisco,Berlin,Singapore,Dubai- Or any address, landmark, or coordinates
The skill automatically geocodes locations using Google Maps API.
Data Available
- Temperature: Current + feels like
- Conditions: Clear, cloudy, rain, snow, etc. with emoji icons
- Forecast: Hourly data for temperature, wind, and conditions
- Humidity: Percentage
- Wind: Speed, direction, gusts
- UV Index: Sun exposure level
- Precipitation: Probability and type
- Cloud Cover: Percentage
- Visibility: Distance
Setup
- Create a project in Google Cloud Console
- Enable the Weather API
- Enable the Geocoding API (for location name lookup)
- Create an API key and set it as
GOOGLE_API_KEYenvironment variable
Also supports
GOOGLE_WEATHER_API_KEYorGOOGLE_MAPS_API_KEYif you already have one configured.
Multi-language Support
Output adapts to location - supports English, Hebrew, and other languages based on the language parameter.
# Hebrew output
python3 skills/google-weather/lib/weather_helper.py current "Tel Aviv"
# Output: ???? ?? 19°C...
相关推荐
专题
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
最新数据
相关文章
百度搜索:AI 驱动的网络研究工具 - Openclaw Skills
Wrike:由 AI 驱动的任务与项目管理 - Openclaw Skills
Wrike:自动化项目管理和任务工作流 - Openclaw Skills
歌词搜索:检索并格式化歌曲歌词 - Openclaw Skills
API Credits Lite:可视化 API 余额追踪 - Openclaw Skills
Polymarket CLI:实时预测市场赔率 - Openclaw Skills
快速笔记:快速本地创意捕获与管理 - Openclaw Skills
情报摄取:战略内容自动化 - Openclaw Skills
Kiro X Hot Publisher:自动化 X 趋势发现与发布 - Openclaw Skills
Veille:AI 驱动的 RSS 聚合器与新闻评分工具 - Openclaw Skills
AI精选
