Skip to content
Back to skills

Nz Emergency Alerts

ASecurity

Query official New Zealand CAP emergency alerts by location, region, agency and severity, aggregating NEMA Emergency Mobile Alerts and MetService severe weather watches/warnings. Use for current official alert retrieval; absence is not proof of safety.

  • 31 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 10, 2026
businesspythongobashgitapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 8 files and shows the line behind each finding

Scanned September 10, 2026

npx -y skills add thecolab-ai/.skills --skill nz-emergency-alerts --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Nz Emergency Alerts?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Nz Emergency Alerts
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/thecolab-ai-nz-emergency-alerts/badge)](https://www.skillsdirectory.com/skills/thecolab-ai-nz-emergency-alerts)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: nz-emergency-alerts
description: "Query official New Zealand CAP emergency alerts by location, region, agency and severity, aggregating NEMA Emergency Mobile Alerts and MetService severe weather watches/warnings. Use for current official alert retrieval; absence is not proof of safety."
license: MIT
compatibility: "Requires Python 3.10+ and network access for live data"
metadata:
  thecolab.category: "emergency"
  thecolab.source_owner: "National Emergency Management Agency and MetService"
  thecolab.source_type: "official"
  thecolab.auth: "none"
  thecolab.access_mode: "public-api"
  thecolab.data_class: "public"
  thecolab.writes: "false"
  thecolab.browser: "false"
  thecolab.risk: "low"
  thecolab.cache_ttl: "5m"
  thecolab.schema_version: "1"
  thecolab.skill_type: "public-api"
  thecolab.pack: "nz-public-data"
  thecolab.source_url: "https://www.civildefence.govt.nz/about/news-and-events/news-and-events/cap-feed-for-emergency-mobile-alert-is-now-live"
  thecolab.allowed_domains: "www.civildefence.govt.nz, alerthub.civildefence.govt.nz, alerts.metservice.com"
  thecolab.last_verified: "2026-07-22"
  thecolab.health: "healthy"
  thecolab.maintainer: "@adam91holt"
---

# NZ Emergency Alerts

Use the read-only Python CLI to retrieve and filter records exposed by the official first-party source.
Every command supports `--json`, bounded requests, stable exit codes, source URLs and retrieval timestamps.

## Commands

```bash
# list active official alert resources
python3 scripts/cli.py active --json
# match alerts near a point using published CAP geometry
python3 scripts/cli.py near --lat VALUE --lon VALUE --json
# filter alerts by region
python3 scripts/cli.py region NAME --json
# filter alerts by issuing agency
python3 scripts/cli.py agency NAME --json
# filter alerts by CAP severity
python3 scripts/cli.py severity LEVEL --json
# find an alert by CAP identifier
python3 scripts/cli.py alert ID --json
# show official feed health and freshness resources
python3 scripts/cli.py feed-status --json
```

Add `--limit N` (1–100) to bound any command. Human output is the default.

## Coverage and interpretation

- Aggregates two official CAP publishers: NEMA's Emergency Mobile Alert feed (NEMA,
  CDEM Groups, Health, Police, MPI, FENZ) and MetService's severe weather
  watches/warnings/advisories. Each alert row carries a `feed` field.
- Only issuing-agency feeds are treated as alerts.
- No alert in this result does not prove absence of danger.
- Preserve the issuing agency's instructions and timestamps.

The CLI reads both official public CAP index feeds (NEMA Atom, MetService RSS), follows the
complete bounded set of allowlisted linked CAP entries per feed before applying the result
`--limit`, and parses identifiers, update/cancel relationships, agency, status, event,
effective/expiry times, instructions and geometry. `near` validates latitude/longitude ranges
before network access, then uses published polygons and circles. Feed health reports age and
staleness per feed; if one feed is unavailable the other still answers with an explicit warning.
An empty current feed is not presented as proof of safety.

## Resources

- `scripts/cli.py` — canonical command entrypoint
- `scripts/test_contract.py` — deterministic repository contract audit
- `scripts/smoke_test.py` — parser fixture and bounded live probe
- `tests/fixtures/cap-atom.xml` — CAP namespaces, lifecycle and geometry fixture
- `references/source-notes.md` — feasibility, provenance and source limits

Files in this skill

  • SKILL.md3.5 KB
  • references/source-notes.md3 KB
  • scripts/cli.py18.9 KB
  • scripts/smoke_test.py5.9 KB
  • scripts/test_contract.py376 B
  • tests/fixtures/cap-atom.xml3.4 KB
  • tests/fixtures/cap-rss.xml603 B
  • tests/fixtures/contract.json179 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.