kma-api-python-builder

Apply invariant-driven rules when building Python clients for KMA weather APIs.

Updated Apr 30, 2026
One-click install
npx skills add https://github.com/digitie/python-kma-api --skill kma-api-python-builder
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kma-api-python-builder
Source: https://github.com/digitie/python-kma-api/tree/main
Command: npx skills add https://github.com/digitie/python-kma-api --skill kma-api-python-builder

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you implement and maintain a Python client library for the Korean Meteorological Administration (KMA) public weather APIs while preserving critical, hard-to-recall invariants such as coordinate handling, time-base selection, authentication rules, typed error mapping, and response parsing safety.

Core Features & Use Cases

  • Enforces project invariants before code changes: verifies which documents to read (README, kma-api.md, docs/api-coverage.md, docs/apihub*.md, docs/datagokr.md, AGENTS.md) to prevent accidental behavior changes.
  • Guarantees correct input semantics: validates that users pass either LatLon or GridPoint (or properly shaped mappings) and rejects ambiguous or mixed lat/lon vs nx/ny inputs.
  • Prevents common KMA pitfalls: preserves PCP/SNO Korean range strings (no forced float conversion), applies endpoint-aware PTY mapping, ensures resultCode != "00" becomes typed exceptions, and avoids accidental credential leakage.
  • Supports robust offline-first development: requires mock/fixture-based tests by default and isolates live integration tests behind explicit opt-in markers and environment variables.

Quick Start

Ask the assistant to implement and validate an update to HTTP error handling across the KmaClient, DataGoKrClient, and ApiHubClient while keeping all KMA invariants and ensuring the change is covered by offline tests.

Frequently Asked Questions about kma-api-python-builder

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I handle KMA API coordinate conversion for LatLon vs GridPoint in Python?

Handling KMA API coordinate conversion requires validating inputs as either LatLon or GridPoint mappings, strictly rejecting ambiguous or mixed lat/lon versus nx/ny parameters to preserve correct coordinate semantics.

Why does my KMA weather API client return unexpected errors for non-zero resultCode values?

Unexpected KMA API errors occur when resultCode values other than 00 are returned; mapping these non-zero resultCode values to typed exceptions ensures structured and traceable error handling.

How do I test a Python weather API client offline using mock data?

Testing a Python weather API client offline requires using mock and fixture-based tests by default, isolating any live integration tests behind explicit opt-in markers and environment variables.

How do I prevent credential leakage when building a Python API client for data.go.kr?

Preventing credential leakage in a data.go.kr Python API client requires sanitizing credentials in metadata and outputs, maintaining strict authentication separation across different client operations.

What is the correct way to parse PCP and SNO weather response strings from KMA APIs?

Parsing PCP and SNO weather response strings from KMA APIs requires preserving original Korean range strings without forced float conversion, alongside applying endpoint-aware PTY mapping for accurate meteorological data.

How do I select the correct KST-aware base time for KMA API requests?

Selecting the correct KST-aware base time for KMA API requests involves applying invariant-driven implementation rules that enforce KST-aware time-base selection aligned with Korean Meteorological Administration standards.