
Weather Query
Pull live weather and multi-day forecasts for Chinese cities and districts inside agent workflows without wiring your own weather API.
Overview
weather-query is an agent skill for the Build phase that fetches China real-time weather and forecasts via the documented 60s viki.moe HTTP API.
Install
npx skills add https://github.com/vikiboss/60s-skills --skill weather-queryWhat is this skill?
- GET realtime weather via `https://60s.viki.moe/v2/weather/realtime` with required `query` (Chinese city or district name
- GET forecast via `https://60s.viki.moe/v2/weather/forecast` with the same `query` parameter
- Returns temperature, humidity, wind, and air-quality style fields from JSON responses
- Includes copy-paste Python `requests` examples for realtime and forecast calls
- MIT-licensed skill metadata pointing at 60s API base `https://60s.viki.moe/v2`
- 2 documented GET endpoints: realtime and forecast
Adoption & trust: 712 installs on skills.sh; 37 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You want your agent to answer China weather questions with real data but have not documented which endpoints, parameters, and response fields to use.
Who is it for?
Agents, CLI helpers, or small apps that must answer China location weather in Mandarin-friendly place names during Build integrations.
Skip if: Global non-China weather stacks, production SLAs without your own API keys and monitoring, or teams that need an official national meteorological data contract instead of a public aggregator.
When should I use this skill?
Users ask about weather conditions, forecasts, or climate information for locations in China, including temperature, humidity, wind, or air quality.
What do I get? / Deliverables
The agent calls the realtime or forecast URLs with a Chinese `query`, parses JSON for temperature, humidity, wind, and related fields, and returns citeable conditions to the user.
- Parsed realtime or forecast JSON for the requested China location
- User-facing weather summary with temperature, wind, and humidity fields
Recommended Skills
Journey fit
External API wiring and request patterns belong in Build when you connect the product or agent to third-party data services. Integrations subphase is where solo builders add outbound HTTP calls, parameters, and response parsing for vendor or public APIs.
How it compares
Use this procedural API skill instead of asking the model to invent temperatures without a documented China weather HTTP integration.
Common Questions / FAQ
Who is weather-query for?
Solo and indie builders shipping agents or lightweight apps that need China weather and forecasts via a simple documented REST pattern.
When should I use weather-query?
During Build integrations when users ask for current conditions, forecasts, humidity, wind, or air-quality context for Chinese cities or districts named in `query`.
Is weather-query safe to install?
It instructs outbound calls to `60s.viki.moe` and needs network permission in your agent; review the Security Audits panel on this page before enabling in production.
SKILL.md
READMESKILL.md - Weather Query
# 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 ```python 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 ```python 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 ```bash # 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 ```json { "location": "北京", "weather": "晴", "temperature": "15", "humidity": "45%", "wind": "东北风3级", "air_quality": "良", "updated": "2024-01-15 14:00:00" } ``` ### Forecast Response ```json { "location": "上海", "forecast": [ { "date": "2024-01-15", "day_of_week": "星期一", "weather": "多云", "temp_low": "10", "temp_high": "18", "wind": "东风3-4级" }, ... ] } ``` ## Example Interactions ### User: "北京今天天气怎么样?" **Agent Response:** ```python weather = get_realtime_weather('北京') response = f""" ☁️ 北京今日天气 天气状况:{weather['weather']} 🌡️ 温度:{weather['temperature']}°C 💧 湿度:{weather['humidity']} 💨 风力:{weather['wind']} 🌫️ 空气质量:{weather['air_quality']} """ ``` ### User: "上海未来三天天气" ```python 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: "深圳会下雨吗?" ```python 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 4. **Caching**: Weather data is updated r