---
name: China Weather
slug: china-weather
category: Data
description: China Weather queries real-time weather and forecasts for Chinese cities via the wttr.in API, supporting Chinese city names and offering lunar dates and lifestyle advice. Use it to get current conditions or a 3-day forecast when planning travel or deciding what to wear.
github: "https://github.com/dongsheng123132/u-claw/tree/main/portable/skills-cn/china-weather"
language: HTML
stars: 1725
forks: 414
install: "npx degit https://github.com/dongsheng123132/u-claw/tree/main/portable/skills-cn/china-weather ~/.claude/skills/china-weather"
installs_to: ~/.claude/skills/china-weather
source_path: portable/skills-cn/china-weather/SKILL.md
collection_size: 17
category_size: 668
collection_url: "https://dirskills.com/collections/dongsheng123132/u-claw"
added: 2026-08-19T07:25:52.931Z
last_synced: 2026-08-19T07:25:52.931Z
canonical_url: "https://dirskills.com/skills/china-weather"
---

# China Weather

China Weather queries real-time weather and forecasts for Chinese cities via the wttr.in API, supporting Chinese city names and offering lunar dates and lifestyle advice. Use it to get current conditions or a 3-day forecast when planning travel or deciding what to wear.

**Install:**

```bash
npx degit https://github.com/dongsheng123132/u-claw/tree/main/portable/skills-cn/china-weather ~/.claude/skills/china-weather
```

## README

# 中国城市天气查询

通过 wttr.in 查询中国各城市天气信息，支持中文城市名输入，附带农历日期和生活建议。

## 功能概述

- **实时天气**: 通过 curl 调用 wttr.in 获取天气数据
- **中文城市名**: 支持直接输入"深圳"、"北京"等中文名
- **多日预报**: 支持当天及未来 3 天天气预报
- **农历日期**: 自动附带当天农历日期信息
- **生活指数**: 穿衣建议、出行提示、紫外线指数

## 查询方式

使用 Bash 工具执行以下命令格式:

```bash
# 基础查询（中文输出）
curl -s "wttr.in/深圳?lang=zh"

# 精简单行格式
curl -s "wttr.in/深圳?format=3&lang=zh"

# 仅今天的天气
curl -s "wttr.in/深圳?0&lang=zh"

# JSON 格式（便于解析）
curl -s "wttr.in/深圳?format=j1"
```

## 使用示例

### 查天气
```
深圳今天天气怎么样？
```

### 出行建议
```
明天要去杭州出差，需要带伞吗？
```

### 多城市对比
```
北京和上海这周末天气哪个好？想出去玩
```

### 穿衣建议
```
广州现在多少度？穿什么衣服合适？
```

## 适用场景

- 快速查询国内任意城市天气
- 出差/旅行前了解目的地天气
- 需要穿衣或出行建议
- 查看未来几天天气趋势
- 终端环境下无法打开天气 App 时

## 不适用场景

- 需要精确到小时的天气预报（wttr.in 精度有限）
- 查询历史天气数据
- 需要灾害预警等官方气象信息（请使用中国气象局官网）
- 查询海外城市天气（本技能优化了中国城市名映射）

## 城市名映射

常见城市直接使用拼音或中文均可：
- 北京 → Beijing / 北京
- 上海 → Shanghai / 上海
- 深圳 → Shenzhen / 深圳
- 广州 → Guangzhou / 广州

如遇查询失败，尝试使用城市拼音替代中文名。

## 注意事项

- wttr.in 为免费服务，偶尔可能响应较慢
- 温度默认摄氏度，风速默认 km/h
- 数据来源为 WorldWeatherOnline，仅供参考
