weather-observation-fetching
Skill này làm gì
Công cụ này lấy và truy xuất dữ liệu thời tiết thực tế, như báo cáo bay (METAR) và dữ liệu lịch sử, từ các nguồn chính thức. Nó đảm bảo các thông tin quan trọng như định danh trạm, thời gian, đơn vị và chỉ báo chất lượng được giữ nguyên.
Khi nào nên dùng
- ✓Khi bạn cần báo cáo thời tiết gần đây cho các sân bay cụ thể.
- ✓Để lấy dữ liệu bề mặt lịch sử từ một khu vực hoặc quốc gia.
- ✓Khi bạn cần thông tin về vị trí, thiết bị hoặc lịch sử của các trạm thời tiết.
Liên kết skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/weather-observation-fetching/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Cung cấp cho tôi các báo cáo METAR trong 2 giờ qua cho sân bay São Paulo (CG24) và Rio de Janeiro (SBGL).”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Công cụ kết nối với các nguồn dữ liệu thời tiết đáng tin cậy, như các API chính phủ. Nó tìm dữ liệu được yêu cầu, giữ nguyên mọi chi tiết gốc và trình bày theo cách có tổ chức.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Weather Observation Fetching
Overview
Retrieve measured surface and upper-air weather reports without losing station identity, observation time, units, raw values, or provider quality flags. Pick the source by observation type and retention need, then validate the returned records before normalization.
This skill covers METARs, historical surface observations, radiosondes, and station metadata. It excludes model output, radar volumes, and satellite imagery.
When to Use This Skill
- A task needs recent METAR observations for named stations or a small region.
- Historical hourly or synoptic surface data is needed from NOAA NCEI.
- A sounding workflow needs observed radiosonde profiles rather than model profiles.
- Station identifiers, relocations, instruments, or metadata must be resolved.
- A fetch returned duplicate, stale, unit-ambiguous, or quality-flagged values.
Do not use forecast products as observations, and do not substitute a nearby model grid point for a missing station report without explicit approval.
Choose the Source
| Need | Preferred source | Notes |
|---|---|---|
| Recent aviation surface reports | NOAA Aviation Weather Center Data API | Query a small station/time set; use published cache files for bulk current data. |
| Historical global surface reports | NOAA NCEI Integrated Surface Database (ISD) | Preserve USAF/WBAN identity, units, and QC fields. |
| Historical or recent radiosondes | NOAA NCEI IGRA | Use the station inventory and retain level and QC metadata. |
| Station history and identifier changes | NOAA NCEI station history/HOMR | Resolve moves, renames, and observing-platform changes. |
Prefer an existing project adapter when it already handles the provider's schema, retries, and cache. Record the exact endpoint or archive object used.
Define the Observation Request
Resolve these values before fetching:
- observation type and variables;
- station identifier system, not just the identifier string;
- start and end instants in UTC, including interval inclusivity;
- maximum acceptable observation age;
- raw, decoded, or both output forms;
- required quality flags and policy for rejected values;
- output units and missing-value representation;
- cache location and retention.
For spatial queries, also define the search geometry, distance limit, and how a station is selected. Return the selected station and distance rather than silently using the nearest report.
Fetch Recent METARs
The Aviation Weather Center exposes machine-readable METAR data under
/api/data/metar. Send a descriptive user agent, keep the query narrow, and
handle a valid 204 No Content separately from an error.
import json
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import Request, urlopen
def fetch_metars(stations, hours=2):
station_ids = sorted({station.strip().upper() for station in stations})
if not station_ids or any(len(station) != 4 for station in station_ids):
raise ValueError("use one or more four-character ICAO station IDs")
if not 1 <= hours <= 24:
raise ValueError("hours must be between 1 and 24 for this narrow query")
query = urlencode({
"ids": ",".join(station_ids),
"format": "json",
"hours": hours,
})
request = Request(
f"https://aviationweather.gov/api/data/metar?{query}",
headers={"User-Agent": "weather-observation-fetching/1.0 contact@example.org"},
)
try:
with urlopen(request, timeout=30) as response:
if response.status == 204:
return []
records = json.load(response)
except HTTPError as exc:
if exc.code == 429:
raise RuntimeError("AWC rate limit reached; honor Retry-After") from exc
raise
if not isinstance(records, list):
raise RuntimeError("unexpected METAR response shape")
return records
Replace the example contact address with an appropriate project contact. For a large current snapshot, download the provider's compressed cache file once instead of issuing many station queries.
Fetch Historical Surface Data
For ISD:
- Resolve the station using the current station inventory and its USAF/WBAN identifiers.
- Confirm that the station's coverage overlaps the requested time range.
- Use bulk HTTPS files for a large historical request; avoid one network call per observation.
…
Câu hỏi thường gặp
METAR là gì?
METAR là báo cáo chuẩn hóa về quan trắc thời tiết tại sân bay, chủ yếu dùng cho hàng không.
Công cụ lấy những loại dữ liệu thời tiết nào?
Nó lấy quan trắc bề mặt (như METAR) và dữ liệu tầng cao (radiosonde), cũng như siêu dữ liệu của trạm. Nó không lấy dự báo hay ảnh vệ tinh.
Vì sao cần giữ ‘định danh trạm’ và ‘cờ chất lượng’?
Giữ định danh giúp bạn biết chính xác dữ liệu đến từ đâu. Cờ chất lượng cho biết dữ liệu có đáng tin cậy hay có thể có vấn đề.
Chi tiết
Mô tả gốc của tác giả
Retrieve surface and upper-air weather observations from authoritative APIs and archives with station identity, time, units, and quality flags preserved.
Độ phổ biến
- Sao GitHub
- 48k
- Vị trí xếp hạng
- #6148
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
00-andruia-consultant
48kGiúp agent của bạn bắt đầu hoặc cải thiện các dự án AI. Phân tích mã, gợi ý công cụ và lập kế hoạch hành động bằng tiếng Tây Ban Nha.
007
48kCho phép agent của bạn thực hiện kiểm toán bảo mật và mô hình hóa mối đe dọa. Hữu ích để bảo vệ dự án khỏi các cuộc tấn công và lỗ hổng.
10-andruia-skill-smith
48kGiúp agent của bạn tạo hoặc cải thiện các công cụ AI. Xác định cách công cụ hoạt động, viết tài liệu và kiểm tra cấu trúc.
20-andruia-niche-intelligence
48kGiúp agent của bạn tạo bản tóm tắt về một ngành cụ thể. Hữu ích để hiểu bối cảnh, quy tắc, cách người dùng tương tác và rủi ro của dự án.
Skill tương tự
tavily
394kGiúp agent của bạn tìm kiếm web bằng Tavily và lấy văn bản từ các trang cụ thể, với tùy chọn về độ sâu, tên miền và ngày tháng.
blogwatcher
394kCho phép agent của bạn theo dõi blog và nguồn cấp RSS hoặc Atom, kiểm tra bài viết mới và đánh dấu những bài bạn đã đọc.
data-scraper-agent
280kGiúp agent tự động thu thập dữ liệu từ mọi nguồn công khai. Có thể lên lịch, bổ sung thông tin và lưu kết quả. Hữu ích để theo dõi dữ liệu trực tuyến.