openclaw 网盘下载
OpenClaw

技能详情(站内镜像,无评论)

首页 > 技能库 > 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...

开发与 DevOps

作者:Antons Tesluks @atesluks

许可证:MIT-0

MIT-0 ·免费使用、修改和重新分发。无需归因。

版本:v1.0.2

统计:⭐ 2 · 495 · 0 current installs · 0 all-time installs

2

安装量(当前) 0

🛡 VirusTotal :良性 · OpenClaw :良性

Package:atesluks/iqair

安全扫描(ClawHub)

  • VirusTotal :良性
  • OpenClaw :良性

OpenClaw 评估

The skill's requirements, instructions, and included code match its stated purpose (fetching IQAir/AirVisual AQI data) and nothing requested appears disproportionate.

目的

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.

说明范围

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.

安装机制

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.

证书

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.

持久

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.

综合结论

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.…

安装(复制给龙虾 AI)

将下方整段复制到龙虾中文库对话中,由龙虾按 SKILL.md 完成安装。

请把本段交给龙虾中文库(龙虾 AI)执行:为本机安装 OpenClaw 技能「IQAir Air Quality」。简介:Get real-time air quality data from IQAir API for any location worldwide. Retur…。
请 fetch 以下地址读取 SKILL.md 并按文档完成安装:https://raw.githubusercontent.com/openclaw/skills/refs/heads/main/skills/atesluks/iqair/SKILL.md
(来源:yingzhi8.cn 技能库)

SKILL.md

打开原始 SKILL.md(GitHub raw)

---
name: iqair
description: 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 asked about air quality, pollution levels, or AQI in specific cities/locations (e.g., "How is the air in Riga?", "Is it safe to go outside in Beijing?", "What's the air quality like?"). Also use when asked about general weather to supplement weather data with air quality information (e.g., "What's the weather in Budapest?", "How's the weather today?").
metadata:
  openclaw:
    homepage: https://github.com/atesluks/openclaw-skill-iqair
    requires:
      env: ["IQAIR_API_KEY"]
---

# 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:**
```bash
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):**
```bash
python scripts/get_aqi.py --lat 56.9496 --lon 24.1052
```

**Nearest city (based on IP):**
```bash
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 - GoodnRiga, 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.