pollen-query
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "pollen-query" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-14f059bb3c78b69e7f60acd804cd50fb3ed7a47b36335d80fba3bec366aa53cd. Verify the upstream source and version against https://skillhub.cn/skills/user_a65425d9/pollen-query before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Real‑time national allergy index query and map visualization skill. Used to query allergy indices, view regional allergy risk data, display allergy index heatmaps on a map, and obtain allergy warnings. Typical trigger words: allergy index, pollen query, pollen concentration, pollen map, pollen monitoring, allergy warning, pollen real‑time data, etc.
Introduction source: third_party · user_a65425d9 · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Limits and differences
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: pollen-query
description: |
全国过敏指数实时查询与地图可视化技能。
当用户需要查询过敏指数、查看各地过敏风险数据、
在地图上展示过敏指数热力分布、获取过敏预警信息时触发。
触发词示例:过敏指数、花粉查询、花粉浓度、花粉地图、
花粉监测、过敏预警、花粉实时数据等。Pollen Query Skill - 全国过敏指数实时查询与可视化
概述
本技能提供中国主要城市过敏指数(UPI)的实时查询能力,接入华风爱科官方 API, 并生成基于 ECharts 的交互式热力地图,通过颜色深浅直观展示各地过敏风险等级。
核心优势:当日缓存 + 智能限速(≤4次/秒),首次拉取全量数据,后续秒级响应。
使用方式
1. 基础查询
当用户询问花粉/过敏相关问题时,运行以下命令获取数据:
python scripts/fetch_pollen.py --source weathercn --city <城市名>
示例:
python scripts/fetch_pollen.py --source weathercn --city 北京— 查询北京过敏指数python scripts/fetch_pollen.py --source weathercn --city 上海— 查询上海过敏指数python scripts/fetch_pollen.py --source weathercn— 生成全国过敏指数地图(默认行为)
2. 生成地图可视化
生成带颜色深浅标注的交互式热力地图:
python scripts/fetch_pollen.py --source weathercn -o <输出路径>.html
生成的 HTML 文件为独立文件,可直接在浏览器中打开,包含:
- ECharts 散点地图,渐变色圆形标记反映过敏指数等级
- 鼠标悬停弹窗显示详细信息
- 统计面板:监测城市数、最高指数、平均指数、预警城市数
- 图例面板:5级颜色图例说明(极低→极易发)
- 自适应视野自动适配到所有标记点
- 当日缓存:同一天内再次运行直接使用缓存,<1 秒出结果
3. JSON 数据导出
以结构化格式导出所有城市过敏指数数据:
python scripts/fetch_pollen.py --source weathercn --json
4. 列出支持的城市
python scripts/fetch_pollen.py --list-cities
过敏指数等级标准 (UPI)
| 等级 | 指数值 | 颜色 | 含义 | 建议 |
|---|---|---|---|---|
| 极低 | 1 | 🟢 绿色 | 几乎无影响 | 适宜户外活动 |
| 低 | 2 | 🟢 浅绿 | 影响较小 | 敏感人群注意防护 |
| 中等 | 3 | 🟡 黄色 | 有一定诱发风险 | 减少户外活动 |
| 易发 | 4 | 🟠 橙色 | 较易诱发过敏 | 避免外出 |
| 极易发 | 5 | 🔴 红色 | 极易诱发过敏 | 穿长衣+戴口罩+眼镜 |
输出规范
地图生成后
-
告知用户地图已生成,说明关键统计数据:
- 监测城市数量
- 最高指数城市及数值
- 平均指数
- 预警城市数量(易发/极易发等级)
- 缓存命中情况
-
使用 open_result_view 或 preview_url 展示 HTML 文件
-
提供健康建议根据当前季节和用户所在城市的指数等级给出建议
单城市查询结果格式
以清晰的结构化文本呈现:
📍 [城市名] 过敏指数监测报告
━━━━━━━━━━━━━━━━━━━━━━━━━━━
过敏指数: UPI X / 5
等级: [等级名称]
建议措施: [对应建议]
更新时间: [时间]
━━━━━━━━━━━━━━━━━━━━━━━━━━━
数据来源
- 主要数据源:华风爱科 API (openapi.weathercn.com) — 中国天气网官方 API,过敏指数 ID:127
- 备用数据源:敏舒科技 (allercast.cn) — UPI 花粉浓度数据
- 当网络请求失败时,脚本会自动切换到模拟演示数据
- 支持城市:66 个中国主要城市,含完整坐标数据
注意事项
- 依赖安装:首次使用需确保 Python 环境有
requests(pip install requests) - API Key 配置(华风爱科):
- 方式一:命令行参数
--weathercn-key YOUR_KEY - 方式二:环境变量
WEATHERCN_API_KEY=YOUR_KEY - 方式三:配置文件
.weathercn_key(与脚本同目录)
- 方式一:命令行参数
- 频率限制:脚本已内置智能限速(≤4次/秒),避免触发 API 429 错误
- 当日缓存:同一城市当天只请求一次 API,后续复用缓存数据
- 地图交互:生成的 HTML 为纯静态文件,无需后端服务即可正常工作
参考资源
- 详细 API 说明和扩展指南:见
references/api-guide.md - 城市坐标完整列表:已内置于脚本中 (
CITY_COORDS)
Current listing version
1.0.0
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供全国66个主要城市的过敏指数实时查询与地图可视化
- 内置智能限速和当日缓存机制,提升用户体验
- 结合健康建议形成完整防护闭环
Highlights
- 触发词覆盖全面,包含过敏指数、花粉查询、花粉地图等多种变体
- 边界清晰,能有效区分其他天气类技能
Areas to improve
-
缺少 Phase 划分和出口条件 Reported severity: Minor
文档未明确划分执行阶段和退出条件
Recommendation: 建议增加 Phase 1/2/3 等阶段划分,并说明各阶段的出口条件
-
文档过长 Reported severity: Minor
SKILL.md 文件约450行,超出推荐长度
Recommendation: 建议将部分详细说明移至 references 目录下的独立文档
Highlights
- 文档结构完整,包含概述、使用方式、等级标准、输出规范等必要章节
- 提供具体命令示例和输出格式说明
Areas to improve
-
未说明 open_result_view/preview_url 具体调用方式 Reported severity: Minor
文档提到使用 open_result_view 或 preview_url 展示 HTML 文件,但未提供具体调用示例
Recommendation: 建议补充 open_result_view 或 preview_url 的具体调用命令示例
Highlights
- 工具来源明确,接入华风爱科官方 API
- 内置智能限速(≤4次/秒)和当日缓存机制
- 覆盖网络失败时的模拟数据 fallback
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Install or fetch external dependencies
Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.
Mentioned in main document · lines 113 -
Accounts, secrets or authorization
Use a dedicated least-privilege account. Keep secrets out of public content and command logs; verify the receiving service and tenant.
Mentioned in main document · lines 114
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.