← 返回 Skills 市场
guchigangz

js-hanoi-air

作者 buihieu · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
102
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install js-hanoi-air
功能描述
High-performance Node.js implementation for monitoring Vietnamese Air Quality Indexes. Features advanced error resilience, localized city mapping, and multi-...
使用说明 (SKILL.md)

🇻🇳 Vietnam Professional AQI Engine (Node.js)

📘 Introduction & Purpose

Dự án này là một bước tiến hóa từ các script Shell/Binary truyền thống sang một hệ thống Node.js Managed Skill. Mục tiêu cốt lõi là cung cấp dữ liệu môi trường có độ trễ thấp, độ chính xác cao cho các AI Agent hoạt động tại khu vực Đông Nam Á, đặc biệt là Việt Nam.

Trong bối cảnh các đô thị lớn như Hà Nội thường xuyên đối mặt với bụi mịn PM2.5 vượt ngưỡng, công cụ này không chỉ trả về số liệu mà còn cung cấp một lớp Logic Interpretation (Giải mã logic) để người dùng cuối có thể hiểu rõ mức độ nguy hiểm đối với sức khỏe.

🏗️ Technical Architecture & Workflow

1. Data Processing Sequence

Hệ thống vận hành dựa trên luồng xử lý khép kín:

  1. Request Sanitization: Kiểm tra tính hợp lệ của tham số city.
  2. Mapping Layer: Sử dụng Dictionary nội bộ để chuyển đổi "Sài Gòn", "HCMC" thành định dạng tương thích với trạm đo toàn cầu.
  3. Upstream Connectivity: Khởi tạo kết nối TLS 1.3 đến server WAQI.
  4. JSON Schema Validation: Đảm bảo dữ liệu trả về từ trạm đo không bị lỗi hoặc thiếu trường thông tin IAQI.

2. Logic Flow Diagram (Text-based)

User Query -> Skill Controller -> City Resolver -> WAQI API -> JSON Parser -> Health Advisory -> Final Output

🛠️ Implementation Guide

Prerequisites

  • Node.js Runtime: Version 18.x or 20.x (LTS recommended).
  • Network: Outbound access to https://api.waqi.info.

Invocation Syntax

# Thực thi trực tiếp qua môi trường ClawHub
node {baseDir}/aqi-hanoi.js "Hà Nội"
安全使用建议
This skill's behavior (query WAQI and print results) matches its description, but it includes a hard-coded WAQI API token in the code while declaring no credentials — that mismatch is suspicious. Before installing: (1) Treat the embedded token as potentially sensitive: verify its origin (is it a public demo token?) and rotate or remove it if it belongs to your organization. (2) Prefer a version that accepts the token via a documented environment variable (e.g., WAQI_TOKEN) rather than hard-coding. (3) Confirm the GitHub homepage and repository integrity (commit history, owner) and check WAQI API terms and rate limits. (4) If you cannot verify the token's provenance or the repo owner, avoid installing or run the code in an isolated environment with restricted network access. (5) If you proceed, consider replacing the hard-coded token with a user-controlled credential and monitor outbound requests to api.waqi.info.
功能分析
Type: OpenClaw Skill Name: js-hanoi-air Version: 1.0.0 The skill is a straightforward Node.js implementation for fetching real-time air quality data from the World Air Quality Index (WAQI) API. The code in `aqi-hanoi.js` uses the built-in `https` module to perform requests and properly sanitizes user-provided city names using `encodeURIComponent`. While it contains a hardcoded API token, this is a common practice for simple utility skills and does not pose a risk to the user's environment or data. No malicious patterns, such as data exfiltration or unauthorized command execution, were detected.
能力评估
Purpose & Capability
Name/description match the code and instructions: a Node.js script that queries the WAQI API for Vietnamese cities and returns AQI and simple health interpretation. No unrelated binaries, services, or capabilities are requested.
Instruction Scope
SKILL.md limits runtime behavior to running the included Node script and outbound access to api.waqi.info. The instructions do not ask the agent to read unrelated files or send data to other endpoints. Note: the package explicitly embeds full source, so runtime behavior is visible and limited to network calls to WAQI.
Install Mechanism
There is no install spec; this is instruction-plus-source only. Nothing is downloaded or written by an installer, which lowers install-time risk.
Credentials
The code contains a hard-coded WAQI_TOKEN string (506d32... ) but the skill metadata declares no required environment variables or primary credential. Embedding a credential in source and failing to declare it is disproportionate and a secret-management red flag: it could be a leaked/stale personal token or a deliberate attempt to hide a credential. The script has network egress to api.waqi.info (expected) and does not contact other endpoints.
Persistence & Privilege
Skill is user-invocable, not always-enabled, and does not request elevated or persistent system privileges or modify other skills. It only executes a single one-off Node.js process.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install js-hanoi-air
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /js-hanoi-air 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of js-hanoi-air skill version 1.0.0. - Provides real-time monitoring and advanced error resilience for Vietnamese Air Quality Indexes. - Supports localized city name mapping and multi-parameter environmental data retrieval. - Includes logic for health risk interpretation based on PM2.5 and other environmental parameters. - Node.js Managed Skill design for low-latency, high-accuracy data tailored to Vietnam’s urban areas.
元数据
Slug js-hanoi-air
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

js-hanoi-air 是什么?

High-performance Node.js implementation for monitoring Vietnamese Air Quality Indexes. Features advanced error resilience, localized city mapping, and multi-... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 102 次。

如何安装 js-hanoi-air?

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

js-hanoi-air 是免费的吗?

是的,js-hanoi-air 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

js-hanoi-air 支持哪些平台?

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

谁开发了 js-hanoi-air?

由 buihieu(@guchigangz)开发并维护,当前版本 v1.0.0。

💬 留言讨论