China Weather logo

China Weather

Community
valenovo
china-weather

使用中国国家级公开天气数据查询中国天气。支持国家气象中心/中央气象台 nmc.cn、中国气象局天气页面 weather.cma.cn、中国天气网 weather.com.cn 的公开天气信息,覆盖城市实况、7 天预报、预警、空气质量、近期小时观测、未来逐小时预报、全国实况/预报地图、实况排行、雷达/卫星图层、全国预警列表、交通/环境/灾害/台风海洋/农业/数值预报等官方产品页;当用户需要判断未来具体时段是否下雨、出行、通勤、骑行、航班/高铁安排或天气风险时,按需返回可访问来源的数据、来源和发布时间。

Overview

Publishervalenovo
Repositoryai-agent-skills
Skill namechina-weather
Stars
64
Forks
2
Bundled files
4
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 4 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by valenovo on GitHub. Read the source before you install it.

Installation

Install the China Weather AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/valenovo/ai-agent-skills/tree/main/china-weather-agent-skill
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/valenovo/ai-agent-skills.git /tmp/ai-agent-skills
mkdir -p .claude/skills
cp -r /tmp/ai-agent-skills/china-weather-agent-skill .claude/skills/china-weather
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable China Weather in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads China Weather on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so China Weather is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

中国天气

数据源策略

使用 scripts/nmc_weather.py 作为统一入口。不要在技能层规定哪个网站优先、哪个网站次要;当多个来源都返回数据时,保留各来源的字段、来源、发布时间和抓取时间,让调用智能体结合用户问题自行判断。

当用户问到未来具体小时段,例如“明天下午两点有没有雨”“几点开始下雨”“骑车路上会不会淋雨”,加 --hourly-forecast,脚本会返回 https://www.weather.com.cn 的未来逐小时预报数据。

https://weather.cma.cn 是中国气象局天气展示页面,可用 cma-healthcheck、cma-city、cma-page 或 query --include-cma 查询。这个站点在某些网络或客户端环境里可能被安全策略拦截或断开;如果返回 ok:false,保留失败状态,不要绕过拦截,也不要编造这个来源的数据。

不要抓取广告、访谈、社交组件、推荐服务或页面装饰。只保留可用于智能体判断的天气数据、官方产品文字、官方产品图片地址、来源和时间。

这个技能只提供结构化数据、来源、发布时间和风险字段。不要规定调用智能体的用户回复口吻、格式或固定话术;让调用智能体根据用户问题、记忆和人设自行组织回答。

如果来源不可访问、字段缺失或城市无法唯一解析,返回脚本给出的失败数据,不要编造天气值。

快速使用

先查看能力和产品清单:

bash
python scripts/nmc_weather.py catalog
python scripts/nmc_weather.py catalog --group 台风海洋

城市天气:

bash
python scripts/nmc_weather.py query 北京
python scripts/nmc_weather.py query 朝阳 --province 北京
python scripts/nmc_weather.py query 上海 --province 上海 --hourly-forecast --hourly-forecast-limit 96
python scripts/nmc_weather.py query 广州 --province 广东 --hourly-forecast --include-cma
python scripts/nmc_weather.py query 北京 --daily-chart 7 --include-climate

全国和区域数据:

bash
python scripts/nmc_weather.py map-weather --kind real --city 广州 --limit 20
python scripts/nmc_weather.py map-weather --kind tomorrow --city 天津 --limit 20
python scripts/nmc_weather.py rank --type rain --hours 1 --limit 20
python scripts/nmc_weather.py alerts --province 北京 --limit 20
python scripts/nmc_weather.py layers --kind radar --limit 12
python scripts/nmc_weather.py layers --kind satellite --limit 12

官方产品页、公报和图像产品:

bash
python scripts/nmc_weather.py product weather-bulletin
python scripts/nmc_weather.py product precipitation-1d
python scripts/nmc_weather.py product traffic
python scripts/nmc_weather.py product geohazard
python scripts/nmc_weather.py product typhoon-warning
python scripts/nmc_weather.py product marine-weather

中国气象局天气页面:

bash
python scripts/nmc_weather.py cma-healthcheck
python scripts/nmc_weather.py cma-city 广州 --province 广东
python scripts/nmc_weather.py cma-page traffic

安装或连通性检查:

bash
python scripts/nmc_weather.py healthcheck

入口选择

用户问单个中国城市当前和未来几天天气:用 query;需要同时返回中国气象局天气页面城市数据时加 --include-cma。

用户问某个未来小时是否下雨:用 query --hourly-forecast;需要同时返回中国气象局天气页面城市数据时加 --include-cma。

用户明确需要多个官方页面数据或想查中国气象局天气展示页:用 query --include-cma 或 cma-city。如果 cma_city_page.ok 为 false,保留失败状态,并继续查看其它已经返回的数据。

用户问全国或某省哪里正在下雨、气温、风速、湿度、站点实况:用 map-weather --kind real。

用户问全国或某省今天/明天城市预报分布:用 map-weather --kind today 或 map-weather --kind tomorrow。

用户问“哪里雨最大”“哪里最热/最低温”“风最大”:用 rank。

用户问预警信号、灾害预警、某省当前预警:用 alerts;单个城市结果里的 warning 也需要纳入判断。

用户问雷达、卫星、云图、降水回波、临近降水形势:用 layers 或 product radar-china、product satellite-fy4b。

用户问官方公报、交通气象、山洪、地灾、渍涝、森林/草原火险、环境气象、海洋、台风、农业或数值预报:先用 catalog 找产品标识,再用 product <id>。

用户问 weather.cma.cn 上的展示页、首页排行、城市预报地图、预警地图、卫星、降水或交通气象展示:可以运行 cma-healthcheck 检查脚本访问状态。可访问时用 cma-page <id>;不可访问时保留失败状态,并继续查看其它已经返回的数据。

城市名歧义时加 --province。已知国家气象中心站点代码时可用:

bash
python scripts/nmc_weather.py query --station-id Wqsps

数据使用契约

先检查 schema_version 和 ok。如果 ok 为 false,把结果视为来源或查询失败。

评估天气风险时同时查看:

  • 城市预警信号或 alerts
  • 数据发布时间与当前查询时间的距离
  • 今天和明天预报
  • 未来逐小时预报数据
  • 雷达、卫星、实况地图和实况排行
  • 近期小时观测中的降水、风力趋势
  • 后续 3-7 天预报和官方产品页

recent_hourly 是近期观测,不是未来预报。hourly_forecast 是未来逐小时预报数据,不是实况。product 和 layers 返回的是官方页面/图像产品信息,必须查看产品时间、页面生成时间、图上时间与当前查询时间的距离。

cma_city_page 和 cma-page 是中国气象局天气展示页数据。它们可能因站点安全策略返回 ok:false;这种情况下不要重试绕过,也不要编造这个来源的结论。

当用户关心“某天某个小时是否下雨”时,读取 hourly_forecast.hours[] 中的 time、weather、temperature_c、humidity_percent 和 precipitation_signal。如果 hourly_forecast.ok 为 false,保留失败状态,并继续查看其它已经返回的数据。

把 null 当作缺失数据。脚本会把国家气象中心的 9999 等占位值转成 null,不要当成有效天气值。

面向智能体的状态值使用中文。风险 level 使用 低 / 中 / 高 / 严重,日期关系使用 过去 / 今天 / 未来 / 未知。

使用 publish_time、publish_age_minutes、source.retrieved_at、page_generated_time、图像 time、current_risk、overall_risk 作为结构化输入。只提醒调用智能体注意比较数据发布时间与当前查询时间的距离;本技能不做时效等级判断。

来源细节

需要端点细节、字段含义或更新频率边界时,再读取 references/nmc-source.md。

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the China Weather AI skill do?

使用中国国家级公开天气数据查询中国天气。支持国家气象中心/中央气象台 nmc.cn、中国气象局天气页面 weather.cma.cn、中国天气网 weather.com.cn 的公开天气信息,覆盖城市实况、7 天预报、预警、空气质量、近期小时观测、未来逐小时预报、全国实况/预报地图、实况排行、雷达/卫星图层、全国预警列表、交通/环境/灾害/台风海洋/农业/数值预报等官方产品页;当用户需要判断未来具体时段是否下雨、出行、通勤、骑行、航班/高铁安排或天气风险时,按需返回可访问来源的数据、来源和发布时间。

Why use China Weather on TypingMind?

Because you install it once and use it with any model. China Weather is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install China Weather in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/valenovo/ai-agent-skills/tree/main/china-weather-agent-skill. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use China Weather?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with China Weather?

As many as you like. As long as a model supports skills, you can use China Weather with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the China Weather AI skill free?

It is published on GitHub by valenovo. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇