chgis-tgaz/SKILL.md
Query the China Historical GIS (CHGIS) Temporal Gazetteer (TGAZ) API to search for historical Chinese placenames from 222 BCE to 1911 CE. Use this skill when searching for information about historical Chinese places, administrative units, or geographic locations during the dynastic period. Applicable for queries about historical place names, administrative hierarchies, or when users mention specific Chinese locations with historical context.
npx skillsauth add kltng/humanities-skills chgis-tgazInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Query the China Historical GIS Temporal Gazetteer for historical placenames and administrative units (222 BCE–1911 CE).
The correct domain is chgis.hudci.org — the old maps.cga.harvard.edu is defunct. Do not use it.
ID lookups use a URL path format, NOT query params:
✅ https://chgis.hudci.org/tgaz/placename/json/hvd_32180
❌ https://chgis.hudci.org/tgaz/placename?id=hvd_32180&fmt=json
The ?fmt=json parameter only works for the faceted search endpoint.
TGAZ IDs use the hvd_ prefix: CHGIS ID 32180 → TGAZ ID hvd_32180.
The ipar (parent) search parameter is unreliable. For hierarchical queries (e.g., "find all counties in Zhejiang"), use the canonical record drill-down approach instead: look up the parent record by ID and read its subordinate units.
Romanization quirks: Some names use older romanizations, not modern pinyin. For example, Ningbo is stored as "Ningpo". If a search returns no results, try alternative romanizations.
Search uses prefix matching: n=beijing matches 北京路, 北京行省, 北井县, etc. Short terms return more results.
Use scripts/tgaz_api.py for programmatic access (zero dependencies):
from scripts.tgaz_api import TGAZAPI
api = TGAZAPI()
# Faceted search
results = api.search("suzhou", year=1820)
results = api.search("北京", feature_type="fu")
# ID lookup (correct URL format handled automatically)
record = api.get_by_id("hvd_32180")
# Extract structured data
name = api.get_name(record) # Chinese name
transcription = api.get_transcription(record) # Romanized
begin, end = api.get_temporal_span(record) # Year range
modern = api.get_modern_location(record) # Present-day equivalent
ftype = api.get_feature_type(record) # Administrative type
subs = api.get_subordinates(record) # Child units (reliable!)
# Formatted summary
print(api.summarize(record))
Faceted search:
https://chgis.hudci.org/tgaz/placename?n=suzhou&yr=1820&fmt=json
Parameters:
n — placename (Chinese or Romanized, required)yr — historical year (-222 to 1911)ftyp — administrative type: xian (县), fu (府), zhou (州), sheng (省), dao (道), lu (路), jun (郡)ipar — parent unit (⚠️ unreliable — prefer canonical record drill-down)fmt — output format (json recommended; default is XML)ID lookup (format in URL path):
/placename/json/{id} — JSON/placename/xml/{id} — XML/placename/rdf/{id} — RDFSince ipar is unreliable, use this pattern for "find all X in Y" queries:
/placename/json/{id}historical_context.has parts field for subordinate unitsapi = TGAZAPI()
# Find Zhejiang
results = api.search("zhejiang", year=1850, feature_type="sheng")
zhejiang_id = results[0]["sys_id"] # e.g., hvd_30015
# Get canonical record with subordinates
record = api.get_by_id(zhejiang_id)
subordinates = api.get_subordinates(record)
# Filter to active units in 1850
for sub in subordinates:
# Check temporal range overlaps with 1850
...
"n": "北京" ✅references/api_reference.md — Complete endpoint specs, all parameters, response field detailsscripts/tgaz_api.py — Python client with correct URL handling and hierarchical query supportdevelopment
Query the China Biographical Database (CBDB) locally via SQLite for biographical data on 656K+ historical Chinese figures from the 7th century BCE through the 19th century CE. Use when searching for Chinese historical figures, scholars, officials, or literary figures — their biographical details, family/kinship networks, official postings, social associations, examination records, or addresses. Runs entirely locally after initial database download (~556 MB). Faster and more flexible than the API version.
development
Interact with a local Zotero 8 desktop application through its HTTP API at localhost:23119. Use this skill whenever the user wants to search, fetch, add, edit, or organize bibliographic items in their Zotero library, import citations (BibTeX, RIS, etc.), attach files, manage collections and tags, or retrieve full-text content from Zotero. Triggers on mentions of Zotero, citation management, reference libraries, bibliographic databases, or local library management. Also use when chaining with other catalog skills (Harvard, LOC, HathiTrust, etc.) to save found records into the user's Zotero library.
development
Search for items and properties on Wikidata and retrieve entity details, claims, and external identifiers. Supports both keyword search (Wikidata Action API) and semantic/hybrid search (Wikidata Vector Database), plus direct entity retrieval (Special:EntityData) and structured querying (WDQS SPARQL).
testing
Query and explore the TGAZ (Temporal Gazetteer) SQLite database of 82,000+ historical Chinese placenames spanning 763 BCE to 1911 CE. Use this skill whenever the user asks about historical Chinese places, administrative geography, dynastic jurisdictions, place name evolution, or wants to query tgaz.db. Also trigger when the user mentions CHGIS, TGAZ, historical gazetteer, Chinese historical GIS, or asks questions like "what was X called in dynasty Y", "what counties existed in year Z", "where was X located", or any spatial/temporal query about Chinese historical geography. This skill is relevant even for casual questions like "tell me about ancient Chang'an" or "Tang dynasty cities near the Yellow River".