AgentSkillsCN

weather

利用 Open-Meteo API 获取各地天气信息。适用于用户询问天气、气温或天气预报时使用。

SKILL.md
--- frontmatter
name: weather
description: Get weather information for locations using Open-Meteo API. Use when user asks about weather, temperature, or forecasts.
version: 1.0.0
author: Workshop Team

Weather Skill

Provides weather information for locations around the world using the free Open-Meteo API.

When to Use

  • User asks about current weather
  • User asks about temperature
  • User asks about weather forecasts
  • User mentions weather-related queries

Available Operations

  1. Get Current Weather: Retrieve current conditions for a location
  2. Format Weather Data: Present weather in a user-friendly format

Instructions

When a user asks about weather:

  1. Identify the location from the user's query
  2. Look up the latitude and longitude for that location (common cities below)
  3. Use the Open-Meteo API to get weather data
  4. Present the weather information in a friendly format

Common City Coordinates

CityLatitudeLongitude
New York40.71-74.01
Los Angeles34.05-118.24
London51.51-0.13
Paris48.852.35
Tokyo35.69139.69
Sydney-33.87151.21
Miami25.76-80.19
Chicago41.88-87.63
San Francisco37.77-122.42
Berlin52.5213.41

Weather Code Meanings

CodeDescription
0Clear sky
1, 2, 3Mainly clear, partly cloudy, overcast
45, 48Fog
51, 53, 55Drizzle (light, moderate, dense)
61, 63, 65Rain (slight, moderate, heavy)
71, 73, 75Snow fall (slight, moderate, heavy)
80, 81, 82Rain showers (slight, moderate, violent)
95Thunderstorm
96, 99Thunderstorm with hail

Resources

ALWAYS read this documentation before making an API request so you have the right parameters:

  • references/api_reference.md - Complete Open-Meteo API documentation

Examples

Example 1: Simple Query

User asks: "What's the weather in New York?" Response: Use coordinates (40.71, -74.01), call Open-Meteo API, format response with temperature and conditions.

Example 2: Temperature Query

User asks: "How hot is it in Miami?" Response: Use coordinates (25.76, -80.19), get temperature_2m, convert to Fahrenheit if needed.

Notes

  • Open-Meteo is free and requires NO API key
  • Temperature is in Celsius by default (add temperature_unit=fahrenheit for F)
  • All times are in the specified timezone