Website map editor UI patterns: click-to-edit flows, Zustand modals, WholeNumberInput, ComboboxTypeahead for entity/item ids, list panels, and styling.

MITAuto-check passedFrontend & Design

Install Map Editor

skills CLI
$ npx skills add webdevcody/survive-the-night-game --skill map-editor -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install webdevcody/survive-the-night-game map-editor --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/webdevcody/survive-the-night-game.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.cursor/skills/map-editor .claude/skills/map-editor && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
map-editor
GitHub stars
229
Token cost
~1.9k tokens
SKILL.md length
677 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

Website map editor UI patterns: click-to-edit flows, Zustand modals, WholeNumberInput, ComboboxTypeahead for entity/item ids, list panels, and styling.

  • Works in 3 steps: Sidebar list renders one row per map… → Primary click on the row → Modal reads row/col from store, loads…
  • Changing anything under packages/website/src/routes/editor (sidebar
  • SKILL.md covers Layout and state, Click-to-edit patterns, Numeric inputs and Item / entity typeahead, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Map Editor is an agent skill from webdevcody/survive-the-night-game. Website map editor UI patterns: click-to-edit flows, Zustand modals, WholeNumberInput, ComboboxTypeahead for entity/item ids, list panels, and styling. Use when adding or changing anything under packages/website/src/routes/editor (sidebar, modals, decal/NPC/merchant/spawner authoring, numeric fields, or typeaheads).

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Frontend & Design, covering State management. It works with Zustand. The licence is MIT.

When your agent uses it

  • Changing anything under packages/website/src/routes/editor (sidebar
  • Decal/NPC/merchant/spawner authoring

Example prompts

  • “/map-editor”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Sidebar list renders one row per map entity (e.g. MerchantsListPanel.tsx, NpcsListPanel.tsx).
  2. Primary click on the row
  3. Modal reads row/col from store, loads the current entry, and writes back via store actions. Use Dialog from ~/components/ui/dialog. Close…

What it can do on your machine

Read from SKILL.md and the folder at commit 2bbd1ab. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Map Editor loads about 1.9k tokens when it runs. Until then it costs about 82 tokens; SKILL.md has 677 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~82
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from webdevcody/survive-the-night-game at commit 2bbd1ab, republished under its MIT licence (© webdevcody). 677 words, ~1,897 tokens.

Download SKILL.mdSave it as .claude/skills/map-editor/SKILL.md (or your agent's skills folder).
name
map-editor
description
Website map editor UI patterns: click-to-edit flows, Zustand modals, WholeNumberInput, ComboboxTypeahead for entity/item ids, list panels, and styling. Use when adding or changing anything under packages/website/src/routes/editor (sidebar, modals, decal/NPC/merchant/spawner authoring, numeric fields, or typeaheads).

Map editor (website)

Read this skill before implementing or refactoring UI in packages/website/src/routes/editor. After changes, verify the checklist at the end.

Layout and state

  • Editor route: index.tsx mounts list panels, tile palette, and modals.
  • State: -store.ts (useEditorStore). Map mutations usually go through dedicated actions (e.g. setMerchantShopLinesAt, updateScavengeDecalEntry) so grids and meta stay reconciled.
  • Right overlay tabs: EditorRightOverlay.tsx — NPCs, Spawners, Merchants, Scavenge, Quests, etc.

Click-to-edit patterns

List row → modal (heavy forms)

Use when editing many fields or long content.

  1. Sidebar list renders one row per map entity (e.g. MerchantsListPanel.tsx, NpcsListPanel.tsx).
  2. Primary click on the row:
    • Optionally focusCameraOnMapCell(row, col) first so the user sees the tile (merchants do this together with opening the editor).
    • Call a store opener such as openMerchantMetaEditor(row, col), openScavengeDecalEditor(row, col), or openDialogueNpcEditor(row, col), which sets the matching *ConfigModal cell and closes competing modals when appropriate.
  3. Modal reads row/col from store, loads the current entry, and writes back via store actions. Use Dialog from ~/components/ui/dialog. Close with set*ConfigModal(null) on onOpenChange.

Reference implementations:

List row → inline panel (lighter forms)

Use when a small set of fields is enough and discovery next to the layer palette helps (decals).

Buttons
  • Small actions: Button with size="sm", className="!h-6 !min-h-0 !px-2 !py-0 !text-[10px]" (see merchant / scavenge panels).
  • Destructive row actions: variant="ghost" with red text classes matching merchant line remove.

Numeric inputs

  • Prefer WholeNumberInput for integer fields that must not flicker to 0 on every keystroke (it uses text + inputMode="numeric" and commits on blur).
  • Required props: value: number, onValueChange: (n: number) => void, max, and usually min (defaults to 0).
  • Styling (match merchant / scavenge): className="h-8 w-full rounded border border-gray-600 bg-gray-950 px-2 text-[11px] text-gray-100"
  • Optional “omit from map when equal to default”: display value={entry.field ?? DEFAULT} and in onValueChange write undefined (or null per API) when n === DEFAULT, so JSON stays minimal — see scavenge search/respawn/drop counts.
  • Do not use raw type="number" for new integer UX unless you need a specific behavior WholeNumberInput cannot express (e.g. a legacy optional field); if you keep type="number", follow an existing pattern and document why.
Show full SKILL.md (291 more words)Show less

Item / entity typeahead

  • Use ComboboxTypeahead for picking itemType strings (items, weapons, resources) from the full registry set.
  • Options: map ids to { value, label } (labels are usually the id string). Build the id list the same way everywhere:
    • MerchantMetaModal.tsx — sortedAllItemTypeIds() using itemRegistry, weaponRegistry, resourceRegistry from @survive-the-night/game-shared/entities/index.
  • Props: placeholder="Type to search…", listClassName="max-h-48" (or similar), and inside dialogs set stopEscapePropagation so Escape closes the dropdown instead of the dialog incorrectly (see merchant modal).
  • Quests reuse the same component with different option lists — see QuestsEditorPanel.tsx.

Row-based “tables” (shop stock, drop tables, etc.)

Mirror MerchantMetaModal.tsx:

  1. + Add item appends a row with a sensible default (first id in sorted list + default weight/price).
  2. Cap row count with a shared constant when appropriate (e.g. MERCHANT_META_MAX_SHOP_LINES from game-shared for shop-like lists).
  3. Each row: typeahead + WholeNumberInput columns + Remove.
  4. Optional “revert to default behavior” button (e.g. Use global catalog / Use built-in loot) that clears overrides in the shape the server expects.

Keep updates immutable (map/filter) and commit via one store call per logical edit if possible.

Labels and copy

  • Field labels: text-[9px] font-medium text-gray-500 (or text-gray-400 for section labels).
  • Helper text: text-[9px] text-gray-600 or text-[10px] text-gray-500.
  • Empty-state / warning: text-[10px] text-amber-200/90 where merchant does.

Agent verification checklist

After editing the map editor:

  1. Interaction: Does the user open the flow the same way as similar features (list → modal vs inline panel)? Is focusCameraOnMapCell used when a modal edits a tile?
  2. Numbers: Are new integer fields using WholeNumberInput with max (and documented min/default behavior)?
  3. Item pickers: Is ComboboxTypeahead used with the registry union pattern and stopEscapePropagation inside dialogs?
  4. State: Are updates going through -store.ts actions that reconcile grids/meta (no hand-editing only local React state for persisted data)?
  5. Visuals: Do buttons/inputs match merchant / scavenge spacing and typography?

© webdevcody, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .cursor/skills/map-editor of webdevcody/survive-the-night-game.

Open the folder on GitHubat commit 2bbd1ab

Compare with similar skills

Map Editor next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Map Editor compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Map Editor this skillwebdevcody/survive-the-night-game229—~1.9kAutomated safety check: PassMIT
React State Managementinvolvex/youtube-music-cli45613 repos~3kAutomated safety check: PassMIT
LobeHub Data Fetching Layerslobehub/lobehub83k—~1.7kAutomated safety check: PassCustom licence
Create Storeryokun6/ryos1.3k—~2.1kAutomated safety check: PassAGPL-3.0
LobeHub Zustand Store Patternslobehub/lobehub83k—~1.6kAutomated safety check: PassCustom licence
Nextjs15 Initbear2u/my-skills933—~2.4kAutomated safety check: PassNone

Similar skills

  • React State Management

    involvex/youtube-music-cli

    Master modern React state management with Redux Toolkit, Zustand, Jotai, and React Query.

    456 GitHub starsUsed in 13 repos~3k tokens
    Frontend & DesignAuto-check passed
  • Explains how LobeHub client code fetches data through services, SWR store hooks and cache keys, and when to avoid useEffect fetching or duplicated state.

    83k GitHub stars~1.7k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Create Store

    ryokun6/ryos

    Create or modify ryOS Zustand stores following repo conventions — persist middleware, partialize, versioned migrations, the debounced write-behind storage adapter for large slices, and cloud-sync…

    1.3k GitHub stars~2.1k tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Conventions for Zustand stores in LobeHub: list and detail state shapes, public, internal and dispatch actions, reducers, optimistic updates and naming rules.

    83k GitHub stars~1.6k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Nextjs15 Init

    bear2u/my-skills

    A skill your agent uses when user wants to create a new Next.js 15 project (Todo/Blog/Dashboard/E-commerce/Custom domain) with App Router, ShadCN, Zustand, Tanstack Query, and modern Next.js stack

    933 GitHub stars~2.4k tokensUpdated 3 mo ago
    Frontend & DesignAuto-check passed
  • Xray UI Dev

    bropines/xray-config-ui-editor

    Development and maintenance of Xray Config UI Editor. An agent skill from bropines/xray-config-ui-editor.

    119 GitHub stars~942 tokensUpdated 7 days ago
    Frontend & DesignAuto-check passed

More from webdevcody/survive-the-night-game

  • Items Sheet Sprites

    webdevcody/survive-the-night-game

    Add or regenerate 16×16 item/resource icons on items-sheet.png (Pillow), align with game-shared asset coords, InteractableTexts, and optional interactableDisplayName.

    229 GitHub stars~974 tokensUpdated 5 mo ago
    Auto-check passed

Works with

Questions about Map Editor

What does Map Editor do?

Website map editor UI patterns: click-to-edit flows, Zustand modals, WholeNumberInput, ComboboxTypeahead for entity/item ids, list panels, and styling. Map Editor is an agent skill from webdevcody/survive-the-night-game. Website map editor UI patterns: click-to-edit flows, Zustand modals, WholeNumberInput, ComboboxTypeahead for entity/item ids, list panels, and styling.

When should I use Map Editor?

Map Editor fits situations like: changing anything under packages/website/src/routes/editor (sidebar; decal/NPC/merchant/spawner authoring.

How do I install Map Editor in Claude Code?

Run `npx skills add webdevcody/survive-the-night-game --skill map-editor -a claude-code`. Or copy the skill folder (.cursor/skills/map-editor in webdevcody/survive-the-night-game) into .claude/skills/map-editor in your project. Claude Code loads it when a task matches its description.

How do I install Map Editor in Codex?

Run `npx skills add webdevcody/survive-the-night-game --skill map-editor -a codex`. Or copy the skill folder (.cursor/skills/map-editor in webdevcody/survive-the-night-game) into .agents/skills/map-editor in your project. Codex loads it when a task matches its description.

Can I use Map Editor in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add webdevcody/survive-the-night-game --skill map-editor -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/map-editor, .gemini/skills/map-editor, .github/skills/map-editor and .opencode/skills/map-editor in your project.

What does Map Editor need to run?

SKILL.md names no scripts, command-line tools or credentials: Map Editor is instructions for the agent only.

Does Map Editor access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Map Editor safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Map Editor use?

Map Editor is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Map Editor use?

About 1.9k tokens (SKILL.md is roughly 7.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Map Editor?

Skills that share tags, products or a category with Map Editor: React State Management (involvex/youtube-music-cli, 456 stars), LobeHub Data Fetching Layers (lobehub/lobehub, 83k stars), Create Store (ryokun6/ryos, 1.3k stars) and LobeHub Zustand Store Patterns (lobehub/lobehub, 83k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Map Editor?

webdevcody (a GitHub user) maintains it in webdevcody/survive-the-night-game, which has 229 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on April 16, 2026.

Source: webdevcody/survive-the-night-game on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.