AI Skill
Give your coding assistant the public METAR contract, Python examples and verification workflow in one portable Agent Skill. Download the bundle, install it in your project and ask your assistant to implement the integration.
What is included
HTTP raw/parsed queries, latest snapshots, latency statistics, WebSocket subscriptions, heartbeats and recovery; supported airports, troubleshooting and two bounded Python diagnostic scripts.
Keep the connection healthy
Send {"action":"ping"} every 20 seconds; the service replies {"type":"pong"}. Allow 15 seconds for a response; on timeout, close the old connection before reconnecting. After 60 seconds without an application heartbeat or valid subscription operation, the service closes with code 4000 and releases the slot. This is an inactivity timeout, not a 60-second sending interval. Protocol ping/pong (including ping_interval) does not replace the JSON heartbeat. No weather updates is normal while heartbeats remain healthy.
Keep one persistent connection and use subscribe/unsubscribe to change airports. To reconnect, cancel and await the old reader/heartbeat tasks and await ws.close() (the example uses close_timeout=5); do not run concurrent reconnect loops. Normal closure actively releases the slot, but a short release race or an abrupt network loss may leave a temporary lease and cause handshake 429. No fixed one-minute cooldown is required, and recovery within 60 seconds is not guaranteed. All clients sharing a key count toward the same 3 connections and 100 distinct airports; 429 is not necessarily an old connection. Retry serially with capped exponential backoff and jitter, then stop and show a quota error when the budget expires. This minimal example retries handshake 429 up to 8 attempts, with delays capped at 20 seconds plus up to 0.5 seconds jitter; it is not a complete long-running reconnect client. Do not retry 401/403 without correcting credentials. If the problem persists, check other clients and contact [email protected] with the UTC time and status code, never your key.
Install in your project
Unzip the download. From your project root, copy the extracted skyviewor-metar folder using the command for your tool below. SKILL.md must be directly inside that folder, not inside another nested copy. Review the files first; do not overwrite an existing installation without checking it.
Codex / Cursor
mkdir -p .agents/skills
cp -R skyviewor-metar .agents/skills/Claude Code
mkdir -p .claude/skills
cp -R skyviewor-metar .claude/skills/Check that your tool discovers SKILL.md; reopen the session if necessary. Codex supports /skills and $skyviewor-metar; Cursor can select the skill from its slash menu; Claude Code supports /skyviewor-metar.
Ask your assistant to integrate
Use the skyviewor-metar skill to integrate Skyviewor METAR into this project for ZBAA and ZSPD. Follow the existing stack, read SKYVIEWOR_API_KEY from the environment, implement bounded timeouts and WebSocket heartbeat/recovery, and test with synthetic fixtures first. Do not make live requests until I authorize them. Report HTTP, heartbeat and business-update verification separately.The prompt is editable: replace the airports and describe your application. Attaching the ZIP to a chat is not the same as installing a skill. If your tool cannot install it, extract and attach the entry file and relevant references instead; supporting scripts are still needed to run its diagnostics.
Verify the integration
Use Python 3.11+ and set SKYVIEWOR_API_KEY privately in your environment. Run from the installed skill folder. These commands contact the real API only with --live. The stream check requires a valid new_metar_arrived report; no update before the deadline is unverified, not a pass.
python -m pip install httpx "websockets>=15"
# Run from the installed skyviewor-metar folder
python scripts/http_query.py --live --airports ZBAA,ZSPD --endpoint metar
python scripts/http_query.py --live --airports ZBAA,ZSPD --endpoint latest
python scripts/http_query.py --live --airports ZBAA,ZSPD --endpoint latency
python scripts/verify_stream.py --live --airports ZBAA,ZSPD --seconds 300No credentials are included. Keep keys out of browser code, chat prompts and repositories. Read the scripts before running; avoid load testing. The download has been structurally checked and its diagnostics tested with simulated messages; that is not a claim of live verification in every AI tool.