# Send 中国城市天气Weather In China to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "weather-zh",
    "name": "中国城市天气Weather In China",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/kenera/weather-zh",
    "canonicalUrl": "https://clawhub.ai/kenera/weather-zh",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/weather-zh",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=weather-zh",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "README.md",
      "SKILL.md",
      "weather-cn.py",
      "weather_codes.txt"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/weather-zh"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/weather-zh",
    "downloadUrl": "https://openagent3.xyz/downloads/weather-zh",
    "agentUrl": "https://openagent3.xyz/skills/weather-zh/agent",
    "manifestUrl": "https://openagent3.xyz/skills/weather-zh/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/weather-zh/agent.md"
  }
}
```
## Documentation

### 中文天气查询 (Weather in Chinese)

使用纯脚本方案查询中国天气网，完全不依赖大模型，稳定可靠。

### 使用方法

python weather-cn.py 城市名

### 示例

# 查询成都天气
python weather-cn.py 成都

# 查询北京天气
python weather-cn.py 北京

# 查询上海天气
python weather-cn.py 上海

### 输出格式

═════════════════════════════════════════════════
  成都天气
═════════════════════════════════════════════════

📍 今日天气（2026-02-25）
  ☀️ 晴  |  温度：15/3℃

📊 生活指数
  🤧 感冒：较适宜
  🏃 运动：较适宜
  👔 穿衣：较冷
  🚗 洗车：适宜
  ☀️ 紫外线：强

═════════════════════════════════════════════════

### 1. weather-cn.py

主脚本文件，负责：

查找城市代码
获取天气数据
解析HTML内容
格式化输出

### 2. weather_codes.txt

城市代码映射表，格式：

城市名,代码
成都,101270101
北京,101010100
...

### 预置城市（50+）

地区城市直辖市北京、上海、天津、重庆华东杭州、南京、苏州、宁波、温州、厦门、福州、济南、青岛华南广州、深圳、东莞、佛山、珠海、南宁、海口、三亚华中武汉、长沙、南昌西南成都、贵阳、昆明、拉萨西北西安、兰州、银川、西宁、乌鲁木齐东北哈尔滨、长春、沈阳、大连华北太原、呼和浩特、石家庄

### 添加新城市

编辑 weather_codes.txt，添加城市代码：

城市名,101xxxxxx

获取城市代码：访问 https://www.weather.com.cn/ 搜索城市，查看URL中的代码。

### 流程图

用户输入 "成都"
     ↓
查找城市代码 101270101
     ↓
requests 获取HTML
     ↓
正则表达式解析
     ↓
格式化输出

### 核心优势

✅ 零大模型依赖 - 完全使用Python正则表达式
✅ 极速响应 - <1秒完成查询
✅ 稳定可靠 - 不依赖外部API
✅ 原生中文 - 直接解析中国天气网
✅ Token节省 - 除了初始设置，每次查询零Token消耗
✅ 准确解析 - 使用精确的HTML结构匹配

### 📊 Token消耗对比

方案每次查询Token稳定性准确性weather-cn.py0 🎉100% ✅100% ✅web_fetch + 大模型~4000100%~80%wttr.in + 大模型~4500~50%~60%

### 1. 使用脚本（推荐）

# 查询天气
~/.openclaw/workspace/skills/weather-zh/weather-cn.py 成都

### 2. 创建快捷命令（可选）

# 添加到 ~/.zshrc 或 ~/.bash_profile
alias weather='~/.openclaw/workspace/skills/weather-zh/weather-cn.py'

# 使用
weather 成都

### 🛠️ 备用方案

如果中国天气网不可用，可使用以下备用方案：

### 方案1：web_fetch（需要大模型解析）

web_fetch "https://www.weather.com.cn/weather/101010100.shtml"

### 方案2：Open-Meteo API

curl -s "https://api.open-meteo.com/v1/forecast?latitude=39.9042&longitude=116.4074&current_weather=true&daily=temperature_2m_max,temperature_2m_min,weathercode&timezone=Asia%2FShanghai"

### 方案3：wttr.in

curl -s "wttr.in/Beijing?T"

### 📝 使用场景

当用户询问以下问题时使用本skill：

"今天天气怎么样"
"明天天气如何"
"[城市名]天气"
"会不会下雨"
"气温多少"
"天气查询"

### ⚠️ 注意事项

天气数据延迟：中国天气网数据可能略有延迟
城市名称：使用标准城市名，如"成都"、"上海"而非"川"
网络依赖：需要能够访问 www.weather.com.cn
生活指数：指数为通用建议，仅供参考

### 🎉 总结

weather-cn.py 是一个轻量、快速、零依赖的天气查询工具：

✅ 完全不依赖大模型
✅ <1秒响应时间
✅ 50+ 预置城市
✅ 彩色格式化输出
✅ Token消耗：0（每次查询）
✅ 准确的HTML结构解析

适合高频调用、自动化任务等场景。
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: kenera
- Version: 0.1.3
## Source health
- Status: healthy
- Source download looks usable.
- Yavira can redirect you to the upstream package for this source.
- Health scope: source
- Reason: direct_download_ok
- Checked at: 2026-05-07T17:22:31.273Z
- Expires at: 2026-05-14T17:22:31.273Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/weather-zh)
- [Send to Agent page](https://openagent3.xyz/skills/weather-zh/agent)
- [JSON manifest](https://openagent3.xyz/skills/weather-zh/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/weather-zh/agent.md)
- [Download page](https://openagent3.xyz/downloads/weather-zh)