Nz data catalogue

From thecolab-ai/.skills · View interactive version

Nz data catalogue is an AI agent skill from the GitHub repository thecolab-ai/.skills. Search the assessed NZ and Auckland public-data source catalogue by topic, hackathon problem, owner, access or grade, then route to a fetching skill. Use to discover suitable datasets and inspect endpoint availability.

How to use this skill

Skill file

NZ data catalogue

Look up data sources here first, then fetch with a mapped skill. This is the

assessed Auckland CivicTech Hackathon catalogue, seeded from the v4 JSON export

for 16 October 2026. It includes NZ sources, global resources and overseas

examples; inspect scope, access, agent_check, not_data and caveat before

recommending a source. The bundled snapshot is not a live completeness claim.

Workflow

  1. Search a topic or filter by a problem tag. Use get to inspect a candidate's

licence, caveats, endpoint and stated latest data.

  1. Inspect fetch_skills: existing means present in the seed repo; planned

names an engine being built in parallel. Check availability before invoking.

exact maps the source surface, related provides a supported equivalent or

narrower dataset, and catalogue offers metadata discovery. Read any note.

  1. Fetch with the mapped skill's documented commands. Some existing skills,

including at-transport, require a user-supplied key; this index is keyless

and reads no credentials. Empty fetch_skills means no known mapping.

  1. Use check if a live availability probe helps. A reachable page or download

is not proof of usable data, a reusable licence, or a current dataset.

Commands

Run from the repo root; Python 3.10+, standard library only.

python3 skills/nz-data-catalogue/scripts/cli.py search "flood paths" --limit 10 --json
python3 skills/nz-data-catalogue/scripts/cli.py filter --problem F1 --grade A --auckland --json
python3 skills/nz-data-catalogue/scripts/cli.py filter --category "Traffic" --scope Auckland --access Open --type GIS --owner "Auckland Transport" --json
python3 skills/nz-data-catalogue/scripts/cli.py get C0001 --json
python3 skills/nz-data-catalogue/scripts/cli.py stats --json
python3 skills/nz-data-catalogue/scripts/cli.py top --problem F1 --n 10 --json
python3 skills/nz-data-catalogue/scripts/cli.py check C0064 --json

Every command supports human output and --json. search requires all query

words across name, why useful, owner and category. Ranking uses weighted term

frequency and inverse document frequency, with a name-phrase bonus; name has

weight 5, why useful and owner 2, category 1. It does not stem or expand synonyms.

relevance is separate from the catalogue's assessment score.

filter combines flags with AND. Text flags are case-insensitive substrings;

repeat --grade to accept several grades. --auckland means yes; supply

yes, partial, no or unknown explicitly to select that coverage status.

--problem accepts F1, T1, T2, T3, W1, W2 or W3 (case-insensitive).

Search and filter default to 20 results; --limit accepts 1–500. Filter and

top order by assessment score, then ID. top excludes Not data rows and

returns 10 by default; --n accepts 1–500. It can include overseas examples.

No geometry is stored, so bbox and GeoJSON belong to the fetching skills.

check GETs the direct endpoint, falling back to the landing URL. Each HTTP

call has a 10-second timeout; at most 64 KiB is read. It reports HTTP status,

content type, final URL, elapsed time, truncation and common challenge/API-error

states. It accepts only a bundled ID, public HTTP(S) URLs and hosts in the

bundled allowlist; redirects must stay on that allowlist. Templates and URLs

containing several links are unsupported. Checks never supply keys or perform

browser challenge retries. Errors use exit 2 (input), 4 (blocked), 5 (upstream),

6 (catalogue/schema/API error), or 7 (unsupported URL).

Assessments

The score is `0.30 fit + 0.20 usability + 0.15 access + 0.15 authority +

0.10 freshness + 0.10 granularity`, using each supplied 1–5 component.

The build preserves the export's score and grade rather than reassessing them.

A ≥ 4.2 is strongest for hackathon use; B ≥ 3.6 is strong; C ≥ 3.0 is usable with

trade-offs; D ≥ 2.4 is limited; E < 2.4 is low priority. Grades describe fit and

practical usability, not a guarantee of accuracy or a licence grant.

F1: flooding/flow paths; T1: congestion; T2: near-miss safety;

T3: incidents/roadworks; W1: construction and demolition materials;

W2: reuse/repair/recycling; W3: illegal dumping.

Confirmed, Corrected, Moved (new URL) and Could not verify preserve the

source review outcomes. Not data is retained with not_data: true; broken

sources and rows marked Duplicate of are excluded. Null checks stay unknown.

Provenance and refresh

JSON envelopes and catalogue records carry source_url, publisher, licence,

retrieved_at (UTC), and latest_data. For local commands, retrieved_at is

when this client reads the snapshot; retrieval_kind: bundled_catalogue makes

that distinction explicit. Source-stated latest_data strings are preserved,

including live and year-only values. Counts in records_size and caveats are

snapshot claims, not refreshed by check. The export's overall reuse licence

is not stated (null); MIT frontmatter applies to code/documentation.

The common envelope exposes source, query, data, warnings and blocked;

rows are in data.records, statistics in data.stats, and probes in

data.check. Failed results include error.code and error.message.

python3 skills/nz-data-catalogue/scripts/build_catalogue.py /path/to/akl-catalogue-v4.json --sync-domains --json

scripts/build_catalogue.py also accepts --output PATH. It validates required

columns, stable unique IDs and finite scores; excludes marked duplicates and

broken rows; drops Evidence and agent notes; and writes deterministic gzip

with the input SHA-256 and exact source host allowlist. Credential-like URL

query values become {credential} with credential_redacted: true; OSM

Taginfo's non-authentication key filter is preserved. --sync-domains updates

the frontmatter and source-note host declarations. After a refresh, review

the mapping rules and run the checks below.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.