/dm-game:game-ui-patternsfrom dm-game
Guides browser game UI shell and HUD decisions: which patterns are essential (pause, options, modal stack, navigation), common (pointer lock, minimap, toasts), or situational (diegetic HUD, inventory). Use when starting a new game shell, adding menus, or fixing common bugs like missing restart, double Esc, or lost pointer lock.
Ships in dm-game. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Purpose: Stop re-deriving the shell. Every browser game needs the same dozen screens and behaviours. Each rebuild costs a session and reintroduces a bug the last game already fixed. This skill says what to build, at which tier, and where the recipe lives.
Sources: The tiering and the shell contract are this plugin's own construction. They come from a survey of nine Gorewood games (2026-10-11): what recurs, what broke, and what the strongest implementation did. They are checked against:
Each pattern skill cites its own sources. Several "every gamer knows this" conventions have no public source: Start opens pause, B backs out, pause on blur, and prompts follow the last-used device. Console certification text is under NDA, and the skills label these UNSOURCED rather than borrowing authority they don't have.
Ten behaviours a shipped real-time browser game satisfies. Each line names its owner, so a failure has an address.
references/run-flow.md)Test: walk the game keyboard-only, then pad-only, then pause from every screen. Any line above that fails is a ship blocker for a real-time game. See game-verification for running that walk mechanically, and what it can't see.
| Pattern | Use when | Skip when | Skill |
|---|---|---|---|
| Pause overlay | Real-time play | Turn-based with no clock (royal-inbox); live-orders sims where pausing is a toggle, not a screen (volatile-state-redux) | game-shell |
| Modal stack and input ownership | More than one screen can be open | Never skip; a single-screen game still has pause over play | game-shell |
| Auto-pause | Real-time single-player | Turn-based; multiplayer; bot and perf runs | game-shell |
| Fresh-press guards | Any screen that can open while a key is held | — | game-shell |
| Title / game over / scores | A run can end | Idle games with prestige instead of death (logarithmic) still need a title | game-shell |
| Audio unlock | The game has sound | No audio | game-shell |
| Focus and navigation | Any menu | — | menu-navigation |
| Key remapping | Any keyboard input | — | input-bindings |
| Gamepad support | Real-time action games | Text or pointer-only games, but say so on the title | input-bindings |
| Options screen, audio buses, a11y toggles | Any shipped game | — | settings-and-persistence |
| Versioned settings persistence | Anything is saved | — | settings-and-persistence |
| Pattern | Use when | Skip when | Skill |
|---|---|---|---|
| Pointer lock and virtual cursor | Mouse-look, or aiming that must not hit the screen edge | Click-to-move, top-down with a visible cursor, any menu-heavy game | pointer-lock |
| Objective compass / edge arrows | Targets can be off screen | The whole play space fits on screen | hud-readouts |
| Minimap / radar | Navigation over a space larger than a few screens | The compass already answers "where" | hud-readouts |
| Toasts and achievement popups | Events the player should know about but not stop for | The event needs a decision; use a modal | hud-readouts |
| Score and combo readouts | There is a score | — | hud-readouts |
| Damage feedback and shake budgets | The player can be hurt | — | game-feel |
| Follow camera, zoom, combat framing, camera options | The world is bigger than the screen | A fixed single-screen arena | camera-control |
| Touch controls (sticks, touch fire, rotate card) | The game should play on a phone or tablet | Desktop-only by design, said on the title | touch-controls |
| Upgrade / draft card picker | Mid-run choices between numbers | The choice is spatial or narrative | progression-legibility |
| Pattern | Use when | Skip when | Skill |
|---|---|---|---|
| Diegetic vs overlay HUD | Immersion is a declared pillar, and the info is non-urgent | Info the player needs within a second | hud-readouts |
| Radial menu | Pad-first, a few choices picked mid-action (starting value in situational-ui) | Mouse-first, or more choices than fit one ring | situational-ui |
| Inventory grid | Items have spatial size, or the bag is the puzzle | A list would do | situational-ui |
| Dialogue box | Spoken or read lines | Ambient barks; use toasts | situational-ui |
| Photo mode | The game is beautiful and players share it | Prototype stage | situational-ui |
| Tutorials and contextual hints | Any mechanic play alone doesn't teach | — | player-ux |
| Hold-to-complete key cap with progress | Any verb completed by holding a key | Tap verbs | input-bindings |
| In-play comms (crew radio, coaching during action) | Lines must be read while the game runs, and must stay true | Fire-and-forget news (toasts) or lines the game can wait on (dialogue) | in-play-comms |
| Accessibility presets | The a11y settings outgrow one screen | A handful of toggles; presets add a layer for nothing | accessibility-design |
| Question | Follow | Why |
|---|---|---|
| Canvas-drawn or DOM menus? | DOM overlay with <dialog>, inert and native focus | Canvas menus need a hand-built focus layer. Two corpus games built one, and one settings panel never got it. |
| Act on press or on release? | Split by surface: game-world verbs on press; DOM menu buttons use native click; destructive items take a second activation | WCAG 2.5.2 and XAG 107 want menu activation on the up event; down-event completion is allowed only where it is essential. See game-feel, Gate 3. |
| Remap conflict: refuse or swap? | Swap, name the displaced action, offer undo | Most corpus games swap; refusing strands a player who wants the key. |
| Where does the settings version live? | In the payload ({ version: 3, … }), with a migration ladder | A version in the key name orphans old data instead of migrating it. |
| Pause on blur, or only when hidden? | Both, through one latch, except when focus went into an in-page iframe | Blur-pause is UNSOURCED convention, chosen as the corpus majority. Hidden-pause is non-negotiable: background tabs stop rAF and throttle timers (MDN, Page Visibility API). |
Gall's Law applies to shells too. Grow from a slice that works.
Rule: do not start step n+1 until step n survives the keyboard-only walk. A shell grown in this order never has a pause with no menu, because the pause menu existed before anything else could open over it.
Three tight links. Everything else routes through the map, so adding a skill
touches one file rather than twenty: references/routing-map.md (in
game-design).
What SKILL.md sets; muted values are Claude Code's defaults
40 skills in this plugin
/accessibility-designUse when designing any player-facing feature, evaluating a game for accessibility, responding to accessibility feedback, designing difficulty or assist options, adding subtitle/caption systems, implementing input remapping, or when a player reports they can't play. Covers the four accessibility pillars (visual, auditory, motor, cognitive), implementation tiers, colorblind design, subtitle standards, input accessibility, and testing methodology. Accessibility is a design discipline, not a post-launch checklist./async-and-socialSocial and competitive design that does not require players to be online together: ghost/replay data, leaderboards, asynchronous PvP, offline vulnerability, and anti-snowball mechanics. Use when adding leaderboards or high-score tables, designing ghost races or replay challenges, letting players attack or compete against absent opponents, deciding what social signal a single-player game should carry, or when matches and runs feel decided in the first minutes. Anti-snowball applies to single-player roguelikes and simulations too, not just PvP. For real-time multiplayer architecture, matchmaking, guilds, and moderation, this skill deliberately does not cover them — those are large specialities and belong in dedicated references.npx claudepluginhub rbergman/dark-matter-marketplace --plugin dm-gameOther plugins' skills for the same job