Skip to content
Back to skills

Mini City

ASecurity

Build a new "Little <City>" animation for the Little Cities site — a 50-second, hand-drawn, isometric Canvas 2D map of a real city that builds itself, with day/night modes, chapters and a camera tour — and add it as a tile on the home page. Use when the user asks to add, build or make another city (e.g. "/mini-city Tokyo", "do Tokyo", "add Paris to mini-city"), or to write the prompt for one.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 29, 2026
ai-agentspythongonodegit

Security analysis

A100/100

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

Scanned November 29, 2026

npx -y skills add southpolemonkey/mini-city --skill mini-city --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Mini City?

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

Security grade badge for Mini City
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/southpolemonkey-mini-city/badge)](https://www.skillsdirectory.com/skills/southpolemonkey-mini-city)

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: mini-city
description: Build a new "Little <City>" animation for the Little Cities site — a 50-second, hand-drawn, isometric Canvas 2D map of a real city that builds itself, with day/night modes, chapters and a camera tour — and add it as a tile on the home page. Use when the user asks to add, build or make another city (e.g. "/mini-city Tokyo", "do Tokyo", "add Paris to mini-city"), or to write the prompt for one.
---

# mini-city: add a city to Little Cities

The site is a folder of self-contained HTML animations plus a home page of tiles. Run everything from the site's root folder.

**Step 0: find or set up the site.** The current folder is a Little Cities site if it has `shanghai/index.html` and `index.html`; work there. Otherwise (the skill was installed as a plugin and Claude was started somewhere else):
- If a `mini-city/` subfolder holds the site, `cd` into it.
- Otherwise clone the starter, which has the engine, the home page and five example cities: `git clone --depth 1 https://github.com/southpolemonkey/mini-city.git` then `cd mini-city`. Tell the user you did this and where.

The site looks like this:

```
<repo root>/
  index.html                          ← home page, one tile per city
  thumbs/<slug>-0.webp, <slug>-1.webp ← tile pictures (day, night)
  prompts/<slug>.txt                  ← the prompt each city was built from
  san-francisco/, sydney/, beijing/, tehran/ …
  shanghai/index.html                 ← the base engine: start from this
```

- **Preview:** `python3 -m http.server 8000` in the repo root, then open `http://localhost:8000/<slug>/`. Each city is one static HTML file, so any static host (GitHub Pages, Netlify, Cloudflare Pages) can serve the folder as is.
- **Keep it local.** Build the city as files in the repo. Don't publish it anywhere (Artifacts, gists, hosting) unless the user asks.
- **Needs:** `python3`, `node` (syntax check) and a Chromium/Chrome for screenshots (`npx playwright install chromium`, or set `CHROME=/path/to/chrome`).
- Scripts are in this skill's own `scripts/` folder (the base directory shown when the skill loads). Run them with the site root as the current directory, or set `SITE=/path/to/site`.

## Workflow

1. **Prompt.** If the user hasn't given one, write `prompts/<slug>.txt` from `reference/prompt-template.txt`. Fill in 12–15 landmarks and everyday scenes that make the city recognisable. `reference/example-prompt-shanghai.txt` is a finished example. Show it to the user only if they asked to see the prompt; otherwise go ahead.
2. **Plan the map** before writing any code:
   - Decide which way the viewer looks, so the signature skyline or landmark sits upper-centre.
   - Set the land/water rectangles and the block grid. Each block is 3×3 tiles on a 4-tile pitch, with block (i,j) at x=4i+1, y=4j+1.
   - Give each block a `GEN` type in `LAYOUT`, and give landmark blocks an `LT` time that matches their chapter.
   - Make the compass in `compass()` match the chosen orientation.
3. **Build `<slug>/index.html`.** Copy `shanghai/index.html`, then replace the city-specific sections listed in `reference/engine.md`. Leave the engine (projection, primitives, people, cars, night system, render loop, controls) alone.
   - **Write one file:** fine for a small city.
   - **Assemble from pieces:** for a big one, write the pieces in the scratchpad (head, layout, generators, world, ground/camera) and join them with a short Python script. That keeps each edit small.
   - Use a fresh seed in `rng(...)` and a fresh localStorage key (`'<abbr>-night'`).
4. **Verify** with `scripts/shoot.sh <slug> [times...]`. It runs a syntax check, writes day, night and phone screenshots to `/tmp/mini-city-shots/<slug>/` (set `OUT=` to change this, for example to the scratchpad), prints any console errors, and exits non-zero if there were any. With no times given it shoots every chapter.
   - Look at every image. Check that each chapter's camera key frames its landmark and that labels sit on the things they name.
   - Check for sort-order glitches: things drawn on top of buildings they should be behind.
   - Check that the night frames look lit rather than just dark.
   - Fix what you find, then shoot again.
5. **Add the tile:**
   - Run `scripts/thumbs.sh <slug>` to make the two thumbnails.
   - Run `scripts/add-tile.py <slug> "<Name>" "<coords>" "<one-line landmarks>"` to add the tile to the home page.
   - Shoot the home page (`scripts/shoot.sh home`) and look at it.
6. **Report** the link (`http://localhost:8000/<slug>/` locally, or the user's own site if they host one; add `?night=1` for night mode), what is in each chapter, and any known quirks.

## URL parameters every city supports
- `?t=<seconds>`: jump to a moment (used for screenshots).
- `?night=0|1`: force day or night.
- `?bare=1`: hide the title card and controls (used for thumbnails).

Read `reference/engine.md` before writing code. It covers the coordinate system, the item and dynamic-object contracts, the night-mode rules, the camera and chapters, and the mistakes that already cost time once.

Files in this skill

  • SKILL.md5 KB
  • reference/engine.md8.9 KB
  • reference/example-prompt-shanghai.txt3.2 KB
  • reference/prompt-template.txt2.5 KB
  • scripts/add-tile.py1.4 KB
  • scripts/shoot.sh2.7 KB
  • scripts/thumbs.sh1.9 KB

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.

View all in ai-agents →

Comments

Loading comments…

Newsletter

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