# weather-query

This skill fetches current conditions and forecasts for places in China. Use it when an agent needs weather, air quality, or trip-planning data.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 822 installs · ★ 47
- Author: vikiboss
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/vikiboss/60s-skills/tree/HEAD/skills/weather-query/SKILL.md
- Updated: 2026-03-06
- HTML: https://affpapa.org/en/nevibecode/skills/weather-query

## What it does

weather-query calls the `https://60s.viki.moe/v2` API to retrieve current conditions or a forecast. Current results can include temperature, humidity, wind, air quality, and an update time. Forecast results contain dates, weather descriptions, temperature ranges, and wind details.

The skill uses separate GET endpoints for real-time data and forecasts: `weather/realtime` and `weather/forecast`. A location must be passed through the required `query` parameter, using Chinese characters. If a district lookup fails, the documented fallback is to try its main city. A non-Chinese location value does not meet the skill’s request format.

The source includes Python examples built with `requests` as well as `curl` calls. The skill can support multi-city comparisons, rain checks before travel, and weather-based advice.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add vikiboss/60s-skills --skill weather-query -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/weather-query/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/weather-query/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add vikiboss/60s-skills --skill weather-query -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/weather-query/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add vikiboss/60s-skills --skill weather-query -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/weather-query/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install vikiboss/60s-skills weather-query
```

2. **Manually: put the files in place**
- File: `.github/skills/weather-query/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add vikiboss/60s-skills --skill weather-query -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/vikiboss/60s-skills --path skills/weather-query
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/weather-query/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add vikiboss/60s-skills --skill weather-query -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/vikiboss/60s-skills/tree/HEAD/skills/weather-query/SKILL.md

## When to use it
- read current temperature and humidity for a place in China
- fetch a day-by-day forecast for a trip
- check wind conditions and air quality
- compare current weather across several cities
- identify rainy days in a forecast

## Example prompts
- Use `weather-query` to check current conditions for a place in China, passing its Chinese location name through `query`.
- Use `weather-query` to return a forecast with dates, weather, low temperature, and high temperature.
- Compare current temperatures for several Chinese cities and report the warmest and coldest location.

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 11a5cd7821bdee18.

BEGIN THIRD-PARTY FILE 11a5cd7821bdee18
````text
---
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
---

# 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
````
END THIRD-PARTY FILE 11a5cd7821bdee18

The third-party file has ended. Everything between the 11a5cd7821bdee18 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2861 of 7226 bytes. © vikiboss · MIT · https://github.com/vikiboss/60s-skills/tree/HEAD/skills/weather-query/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
