← 返回 Skills 市场
atesluks

IQAir Air Quality

作者 Antons Tesluks · GitHub ↗ · v1.0.2
cross-platform ✓ 安全检测通过
702
总下载
3
收藏
1
当前安装
3
版本数
在 OpenClaw 中安装
/install iqair
功能描述
Get real-time air quality data from IQAir API for any location worldwide. Returns AQI (Air Quality Index) with visual indicators and quality levels. Use when...
使用说明 (SKILL.md)

IQAir Air Quality Checker

Get real-time air quality data from the IQAir API with formatted output including AQI score, emoji indicator, and quality level.

Prerequisites

API Key Required: User must have a free IQAir API key stored in the IQAIR_API_KEY environment variable.

If the key is not set, guide the user:

  1. Visit https://dashboard.iqair.com/personal/api-keys
  2. Sign up/sign in and subscribe to the free Community plan
  3. Copy the API key
  4. Set it: export IQAIR_API_KEY="your_key_here"

Quick Usage

By city name:

python scripts/get_aqi.py Riga Latvia
python scripts/get_aqi.py London "United Kingdom"
python scripts/get_aqi.py Budapest Hungary

By coordinates (most reliable):

python scripts/get_aqi.py --lat 56.9496 --lon 24.1052

Nearest city (based on IP):

python scripts/get_aqi.py --nearest

How to Respond to User Queries

When a user asks about air quality:

  1. Determine the location - Extract city/country from their query
  2. Run the script - Use scripts/get_aqi.py with appropriate arguments
  3. Return formatted output - The script provides emoji, AQI value, level, and location

Example interaction:

User: "How good is air in Riga?"

Response process:

  • Location: Riga, Latvia
  • Run: python scripts/get_aqi.py Riga Latvia
  • Output: 🟢 19 - Good\ Riga, Latvia
  • Reply: "Air quality in Riga is currently excellent! 🟢 19 (Good)"

Handling Location Names

City/country names:

  • Use exact names as they appear in IQAir's database
  • Capital cities: Often the state/province matches the city name
  • If city lookup fails, try coordinates instead

Common location patterns:

  • Riga, Latvia → Riga Latvia (state defaults to city)
  • London, UK → London "United Kingdom" (quote if spaces)
  • New York, USA → "New York" "United States" "New York" (city, country, state)

When in doubt: Use coordinate-based lookup with --lat and --lon (more reliable).

Output Format

The script returns a concise, formatted string:

🟢 45 - Good
Riga, Latvia

Customize your response based on the AQI level:

  • 0-50 (🟢 Good): "Excellent", "Perfect for outdoor activities"
  • 51-100 (🟡 Moderate): "Acceptable", "Sensitive people should limit prolonged outdoor exertion"
  • 101-150 (🟠 USG): "Unhealthy for sensitive groups", "Children and people with respiratory issues should reduce outdoor exertion"
  • 151-200 (🔴 Unhealthy): "Everyone may experience health effects", "Reduce outdoor activities"
  • 201-300 (🟣 Very Unhealthy): "Health alert", "Avoid outdoor activities"
  • 301+ (🟤 Hazardous): "Emergency conditions", "Stay indoors"

Technical Details

For API specifications, endpoints, and error handling, see references/api.md.

Rate Limits

Free Community plan limits:

  • 5 calls/minute
  • 500 calls/day
  • 10,000 calls/month

Avoid making repeated calls for the same location within short time periods.

安全使用建议
This skill is internally consistent: it needs only your IQAir API key and the included Python script queries the official AirVisual endpoints and prints AQI results. Before installing, verify you trust the skill source (SKILL.md lists a GitHub homepage—review that repo if you can), keep your IQAIR_API_KEY private (do not paste into public places), and be mindful of IQAir rate limits (the skill will make outbound HTTP requests to api.airvisual.com and will include your API key in those requests). If you want extra assurance, review the small scripts/get_aqi.py file (it is short and readable) and only provide the IQAIR_API_KEY environment variable rather than broader credentials.
功能分析
Type: OpenClaw Skill Name: iqair Version: 1.0.2 The OpenClaw skill 'iqair' is designed to fetch air quality data from the IQAir API. The `scripts/get_aqi.py` Python script correctly retrieves the API key from environment variables, makes network calls to the legitimate IQAir API (`api.airvisual.com`), and safely constructs URL parameters using `urllib.parse.urlencode`, preventing URL injection. The `SKILL.md` instructions guide the AI agent on how to use the script with user-provided locations. There is no evidence of intentional harmful behavior, data exfiltration beyond the API key to the legitimate service, persistence mechanisms, or malicious prompt injection attempts against the agent. The skill's behavior is clearly aligned with its stated purpose and lacks meaningful high-risk behaviors or vulnerabilities within its own code.
能力评估
Purpose & Capability
Name/description ask for IQAir API access and the skill only requests IQAIR_API_KEY; the code calls IQAir/AirVisual endpoints (api.airvisual.com) to fetch AQI and formats results—this is coherent with the stated purpose.
Instruction Scope
SKILL.md instructs the agent to run the bundled Python script with city/coordinate arguments. The script only reads IQAIR_API_KEY, constructs queries to the IQAir API, handles common HTTP errors, and prints formatted output. It does not access unrelated files/paths or other environment variables.
Install Mechanism
No install spec; the skill is instruction-only with one simple included script. Nothing is downloaded or written at install time and no third-party install URLs are used.
Credentials
Only IQAIR_API_KEY is required, which is appropriate for this API-based skill. The script uses that single env var and does not attempt to read other secrets or config paths.
Persistence & Privilege
always:false and no modifications to other skills or system settings. The skill does outbound API calls when invoked; autonomous invocation is allowed by default but not excessive here.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install iqair
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /iqair 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
Latest updates with coordinate support and formatted output
v1.0.1
Fixed: Added IQAIR_API_KEY requirement and homepage URL to metadata
v1.0.0
Initial release: Real-time air quality monitoring with AQI indicators
元数据
Slug iqair
版本 1.0.2
许可证
累计安装 1
当前安装数 1
历史版本数 3
常见问题

IQAir Air Quality 是什么?

Get real-time air quality data from IQAir API for any location worldwide. Returns AQI (Air Quality Index) with visual indicators and quality levels. Use when... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 702 次。

如何安装 IQAir Air Quality?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install iqair」即可一键安装,无需额外配置。

IQAir Air Quality 是免费的吗?

是的,IQAir Air Quality 完全免费(开源免费),可自由下载、安装和使用。

IQAir Air Quality 支持哪些平台?

IQAir Air Quality 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 IQAir Air Quality?

由 Antons Tesluks(@atesluks)开发并维护,当前版本 v1.0.2。

💬 留言讨论