一键导入
weather-query
查询中国各地实时天气和天气预报,包括温度、湿度、风速、空气质量等信息。Use when users ask about weather conditions, forecasts, or climate information for locations in China.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
查询中国各地实时天气和天气预报,包括温度、湿度、风速、空气质量等信息。Use when users ask about weather conditions, forecasts, or climate information for locations in China.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
获取每天60秒读懂世界的每日新闻,包含15条精选国内外新闻和每日微语。Use when users need daily news summaries, current events, or want to stay informed about world news in Chinese.
查询各类数据信息,包括汇率、农历、历史事件、百科、油价、金价和化学元素。Use when users need exchange rates, lunar calendar, historical events, encyclopedia, commodity prices, or chemical element information.
获取娱乐内容,包括一言名句、英文笑话、中文段子、运势预测、KFC梗文案和摸鱼日历。Use when users want fun content, jokes, quotes, daily luck predictions, or entertainment.
获取微博、知乎、百度、抖音、今日头条、B站等主流中文平台的实时热搜榜单和热门话题。Use when users want to know trending topics, hot searches, or popular content on Chinese social media platforms.
获取音乐和影视相关信息,包括网易云音乐排行榜、歌词搜索、电影票房排行、电视剧收视率和网剧排行。Use when users need music charts, lyrics, movie box office, TV ratings, or entertainment rankings.
提供实用工具功能,包括IP地址查询、文本翻译、二维码生成、哈希计算、网页元数据提取、域名WHOIS查询和密码生成。Use when users need translation, IP lookup, QR codes, hashing, domain info, or password generation.
| name | weather-query |
| description | 查询中国各地实时天气和天气预报,包括温度、湿度、风速、空气质量等信息。Use when users ask about weather conditions, forecasts, or climate information for locations in China. |
| license | MIT |
| metadata | {"author":"vikiboss","version":"1.0","api_base":"https://60s.viki.moe/v2","tags":["weather","forecast","china","climate"]} |
This skill enables AI agents to fetch real-time weather information and forecasts for locations in China using the 60s API.
Use this skill when users:
URL: https://60s.viki.moe/v2/weather/realtime
Method: GET
URL: https://60s.viki.moe/v2/weather/forecast
Method: GET
query (required): Location name in Chinese
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']}")
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")
# Real-time weather
curl "https://60s.viki.moe/v2/weather/realtime?query=北京"
# Weather forecast
curl "https://60s.viki.moe/v2/weather/forecast?query=上海"
{
"location": "北京",
"weather": "晴",
"temperature": "15",
"humidity": "45%",
"wind": "东北风3级",
"air_quality": "良",
"updated": "2024-01-15 14:00:00"
}
{
"location": "上海",
"forecast": [
{
"date": "2024-01-15",
"day_of_week": "星期一",
"weather": "多云",
"temp_low": "10",
"temp_high": "18",
"wind": "东风3-4级"
},
...
]
}
Agent Response:
weather = get_realtime_weather('北京')
response = f"""
☁️ 北京今日天气
天气状况:{weather['weather']}
🌡️ 温度:{weather['temperature']}°C
💧 湿度:{weather['humidity']}
💨 风力:{weather['wind']}
🌫️ 空气质量:{weather['air_quality']}
"""
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"
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("近期没有降雨预报")
Location Names: Always use Chinese characters for location names
Error Handling: Check if the location is valid before displaying results
Context: Provide relevant context based on weather conditions
Caching: Weather data is updated regularly but can be cached for short periods
Fallbacks: If a specific district doesn't work, try the city name
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)
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"
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}天气不太适合出行"
updated timestamp in the responseThe weather API supports most cities and districts in China, including: