Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

weather-query天气查询

Agent Skill

weather-query 用于记录任务执行中的错误、用户纠正、经验和能力缺口,适合在 Codex、Claude、Cursor、Gemini CLI 中希望让 Agent 持续沉淀问题、修正和最佳实践时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

14,714

周安装

607

GitHub Stars

32

下载量

4,807
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:weather-query(天气查询)
来源仓库:https://github.com/vikiboss/60s-skills
仓库路径:skills/weather-query
安装命令:
npx skills add https://github.com/vikiboss/60s-skills --skill weather-query
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/vikiboss/60s-skills --skill weather-query

简介

中国各地的实时天气和预报数据。

  • 提供两个核心端点:实时天气(温度、湿度、风力、空气质量)和包含每日最高点和最低点的多日预报
  • 接受中文位置名称(城市或地区)作为查询参数;支持全国主要城市和大部分地区
  • 包括基于天气的建议、多城市比较和旅行适宜性检查的实用帮助模式
  • 返回带有时间戳的结构化 JSON 响应;最佳实践是在查询之前缓存短期并验证位置名称

SKILL.md

Weather Query Skill

This skill enables AI agents to fetch real-time weather information and forecasts for locations in China using the 60s API.

When to Use This Skill

Use this skill when users:

  • Ask about current weather conditions
  • Want weather forecasts
  • Need temperature, humidity, wind information
  • Request air quality data
  • Plan outdoor activities and need weather info

API Endpoints

1. Real-time Weather

URL: https://60s.viki.moe/v2/weather/realtime Method: GET

2. Weather Forecast

URL: https://60s.viki.moe/v2/weather/forecast Method: GET

Parameters

  • query (required): Location name in Chinese

- Can be city name: "北京", "上海", "广州" - Can be district name: "海淀区", "浦东新区"

How to Use

Get Real-time Weather

import requests

def get_realtime_weather(query):
    url = 'https://60s.viki.moe/v2/weather/realtime'
    response = requests.get(url, params={'query': query})
    return response.json()

# Example
weather = get_realtime_weather('北京')
print(f"☁️ {weather['location']}天气")
print(f"🌡️ 温度:{weather['temperature']}°C")
print(f"💨 风速:{weather['wind']}")
print(f"💧 湿度:{weather['humidity']}")

Get Weather Forecast

def get_weather_forecast(query):
    url = 'https://60s.viki.moe/v2/weather/forecast'
    response = requests.get(url, params={'query': query})
    return response.json()

# Example
forecast = get_weather_forecast('上海')
for day in forecast['forecast']:
    print(f"{day['date']}: {day['weather']} {day['temp_low']}°C ~ {day['temp_high']}°C")

Simple bash example

# Real-time weather
curl "https://60s.viki.moe/v2/weather/realtime?query=北京"

# Weather forecast
curl "https://60s.viki.moe/v2/weather/forecast?query=上海"

Response Format

Real-time Weather Response

{
  "location": "北京",
  "weather": "晴",
  "temperature": "15",
  "humidity": "45%",
  "wind": "东北风3级",
  "air_quality": "良",
  "updated": "2024-01-15 14:00:00"
}

Forecast Response

{
  "location": "上海",
  "forecast": [
    {
      "date": "2024-01-15",
      "day_of_week": "星期一",
      "weather": "多云",
      "temp_low": "10",
      "temp_high": "18",
      "wind": "东风3-4级"
    },
    ...
  ]
}

Example Interactions

User: "北京今天天气怎么样?"

Agent Response:

weather = get_realtime_weather('北京')
response = f"""
☁️ 北京今日天气

天气状况:{weather['weather']}
🌡️ 温度:{weather['temperature']}°C
💧 湿度:{weather['humidity']}
💨 风力:{weather['wind']}
🌫️ 空气质量:{weather['air_quality']}
"""

User: "上海未来三天天气"

forecast = get_weather_forecast('上海')
response = "📅 上海未来天气预报\n\n"
for day in forecast['forecast'][:3]:
    response += f"{day['date']} {day['day_of_week']}\n"
    response += f"  {day['weather']} {day['temp_low']}°C ~ {day['temp_high']}°C\n"
    response += f"  {day['wind']}\n\n"

User: "深圳会下雨吗?"

weather = get_realtime_weather('深圳')
if '雨' in weather['weather']:
    print("☔ 是的,深圳现在正在下雨")
    print("建议带伞出门!")
else:
    forecast = get_weather_forecast('深圳')
    rain_days = [d for d in forecast['forecast'] if '雨' in d['weather']]
    if rain_days:
        print(f"未来{rain_days[0]['date']}可能会下雨")
    else:
        print("近期没有降雨预报")

Best Practices

  1. Location Names: Always use Chinese characters for location names
  2. Error Handling: Check if the location is valid before displaying results
  3. Context: Provide relevant context based on weather conditions

- Rain: Suggest bringing umbrella - Hot: Recommend staying hydrated - Cold: Advise wearing warm clothes - Poor AQI: Suggest wearing mask

  1. Caching: Weather data is updated regularly but can be cached for short periods
  2. Fallbacks: If a specific district doesn't work, try the city name

Common Use Cases

1. Weather-based Recommendations

def give_weather_advice(location):
    weather = get_realtime_weather(location)
    advice = []

    temp = int(weather['temperature'])
    if temp > 30:
        advice.append("🔥 天气炎热,注意防暑降温,多喝水")
    elif temp < 5:
        advice.append("🥶 天气寒冷,注意保暖")

    if '雨' in weather['weather']:
        advice.append("☔ 记得带伞")

    if weather['air_quality'] in ['差', '重度污染']:
        advice.append("😷 空气质量不佳,建议戴口罩")

    return '\n'.join(advice)

2. Multi-city Weather Comparison

def compare_weather(cities):
    results = []
    for city in cities:
        weather = get_realtime_weather(city)
        results.append({
            'city': city,
            'temperature': int(weather['temperature']),
            'weather': weather['weather']
        })

    # Find hottest and coldest
    hottest = max(results, key=lambda x: x['temperature'])
    coldest = min(results, key=lambda x: x['temperature'])

    return f"🌡️ 最热: {hottest['city']} {hottest['temperature']}°C\n" \
           f"❄️ 最冷: {coldest['city']} {coldest['temperature']}°C"

3. Travel Weather Check

def check_travel_weather(destination, days=3):
    forecast = get_weather_forecast(destination)
    suitable_days = []

    for day in forecast['forecast'][:days]:
        if '雨' not in day['weather'] and '雪' not in day['weather']:
            suitable_days.append(day['date'])

    if suitable_days:
        return f"✅ {destination}适合出行的日期:{', '.join(suitable_days)}"
    else:
        return f"⚠️ 未来{days}天{destination}天气不太适合出行"

Troubleshooting

Issue: Location not found

  • Solution: Try using the main city name instead of district
  • Example: Use "北京" instead of "朝阳区"

Issue: No forecast data

  • Solution: Verify the location name is correct
  • Try standard city names: 北京, 上海, 广州, 深圳, etc.

Issue: Data seems outdated

  • Solution: The API updates regularly, but weather can change quickly
  • Check the updated timestamp in the response

Supported Locations

The weather API supports most cities and districts in China, including:

  • Provincial capitals: 北京, 上海, 广州, 深圳, 成都, 杭州, 南京, 武汉, etc.
  • Major cities: 苏州, 青岛, 大连, 厦门, etc.
  • Districts: 海淀区, 朝阳区, 浦东新区, etc.

Related Resources

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.38%
按下载量换算1,701

Claude

29.72%
按下载量换算1,429

Cursor

19.8%
按下载量换算952

Gemini CLI

8.1%
按下载量换算389

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills