davepartner

Countries States Cities — AI skill for Claude Code

AI community

AI agent skill: add a country/state/city dataset to any app, sliced to scope (countries, +states, cities in selected states/countries, continents) — natural keys, 12 formats, single Python tool.

How to install Countries States Cities

This entry records only its repository, not the path inside it, so there is no exact command to give. Open davepartner/countries-states-cities and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Countries States Cities does

AI agent skill: add a country/state/city dataset to any app, sliced to scope (countries, +states, cities in selected states/countries, continents) — natural keys, 12 formats, single Python tool. ODbL.

Alternatives in AI

  • Pretty Mermaid Skills — To provide AI with Mermaid chart rendering capability, supporting both SVG and ASCII output formats 552 ★
  • Update Branch Name — by giselles-ai - Updates branch names with proper prefixes and formats, enforcing naming conventions, supporti 502 ★
  • Prompt Tower — Context management for long-context LLMs, agents, and vibe coding 382 ★

README

Countries · States · Cities

A clean, natural-key dataset of the world's administrative geography — **countries, states, counties, cities, and postcodes** — shipped as an **AI-agent skill** that slices it to exactly what an app needs, in a dozen formats, with a single-file Python tool and no database or third-party runtime.

It is a derivative of the [Countries States Cities Database](https://github.com/dr5hn/countries-states-cities-database) (dr5hn), reworked with a natural-key data model. See [Attribution](#attribution).

As an AI-agent skill

`SKILL.md` teaches an agent to implement country/state/city data into any app, with granular selection:

  • only countries — --scope countries
  • countries + states — --scope countries,states
  • cities in selected states or countries — --state US:CA,US:NY / --country NG
  • countries in a continent — --region Africa
  • everything — --scope all
python3 tools/subset.py data OUT --scope countries,states,cities --country NG --format sql --sql-dialect postgresql

The slice is always internally consistent (parents and cross-referenced counties are pulled in automatically). Full reference: [`references/subsetting.md`](references/subsetting.md), integration recipes: [`references/integration.md`](references/integration.md).

Data at a glance

Dataset Records
Regions 6
Subregions 22
Countries 250
States / regions / municipalities 5,327
Counties 14,058
Cities / towns / districts 171,338
Postcodes 728,545 (117 countries)

Country names in **19 languages**, IANA timezones, ISO 3166-1 and ISO 3166-2 codes, native-script names, and Wikidata QIDs.

What's different from upstream

  1. Natural keys instead of surrogate IDs — records are keyed by (country_code, code): ISO codes and Wikidata QIDs / stable slugs, not auto-increment integers.
  2. type is no longer a grab-bag — split into orthogonal kind (settlement / di