Add a new city map entry to the city registry. Use when adding a new detailed city map with pins and labels to city-viewer.html — distinct from add-location which adds a world map marker.
Help the user add a new city entry to the city registry.
City data is split across two files:
js/city-maps.js — thin index (metadata only: id, name, image, previewImage). No pins or labels.js/cities/<id>.js — full city data (pins and named labels). Loaded on demand.Both files must be updated when adding a new city.
Gather info — If $ARGUMENTS doesn't supply everything, ask the user for:
images/cities/cityname/cityname.PNG. Ask the user to confirm the file exists, or check with Glob.Create the ID — kebab-case version of the city name. E.g. "Fort Ashveil" → fort-ashveil. Grep js/city-maps.js to confirm it's unique.
Backup first — run the /backup skill before editing.
Create js/cities/<id>.js — the per-city data file. Use this exact format:
window.CITY_MAPS_REGISTRY = window.CITY_MAPS_REGISTRY || {};
window.CITY_MAPS_REGISTRY["city-id"] = {
id: "city-id",
name: "City Name",
image: "images/cities/city-id/city-id.PNG",
previewImage: "images/cities/city-id/city-id.PNG",
pins: [],
namedLabels: [],
};
If the user provides initial pins, format each as:
{ n: 1, x: 50.0, y: 50.0, name: "Pin Name", type: "landmark", desc: "Description.", size: 1.3 },
If the user provides named labels, format each as:
{ id: "label-id", name: "Label Name", x: 50.0, y: 50.0, type: "district", desc: "Description." },
js/city-maps.js — add a one-line entry to the CITY_MAPS array before the closing ];. Metadata only, no pins: { id: "city-id", name: "City Name", image: "images/cities/city-id/city-id.PNG", previewImage: "images/cities/city-id/city-id.PNG" },
tavern, inn, market, shop, temple, shrine, keep, fortress, landmark, harbor, gate, district, warehouse, stables, arena, college, bank, tower, cemetery, sea, direction
n values in pins are sequential starting at 1id values are kebab-case, unique within the city