/dm-game:game-verificationfrom dm-game
Verification kit for browser games: headless sim sweeps, determinism tests, mutation-checked regression, real-Chrome perf harnesses with frame-time percentiles, and scripted UI walks via CDP input. Reports each instrument's blind spot alongside its result.
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.
Read when SKILL.md points to them.
Purpose: Prove a game change with the cheapest instrument that can actually see the failure, and say what that instrument cannot see in the same breath as its result.
Sources:
page.keyboard and page.mouse dispatch input through the Chrome
DevTools Protocol (CDP), so the browser treats it as trusted, default actions
included.element.dispatchEvent(new KeyboardEvent(…)) runs listeners and produces no
default action: no focus move, no slider step, no button activation (DOM
spec; the operator's driving-a-browser notes).scripts/check-options-browser.cjswindow.__DEV__ state plus pixel reads, and frame byte-compare
(just determinism): gravelight tools/dev-smoke.mjsprofile-production.cjsjust perfdocs/ui.md:
timberwolf tools/ui-check.mjsevaluate:loop?benchmark/?soak: volatile-state-reduxThe sketch references/ui-walk.mjs is a Playwright walk of the game-shell flows.
keyboard.down calls
deliver a real key repeat.Pick by the failure you need to see. Report by the column on the right.
| Instrument | Sees | Cannot see |
|---|---|---|
| Unit test of a pure function (Esc decision, rebind, stacking, toast queue) | Logic branches, edge values | Event order, timing, the DOM, the browser |
| Mutation check (break the code, and the test must fail at the expected line) | Whether a test tests what it claims | Whether the test covers the right behaviour |
| Determinism test (same seed twice, diff the full event log) | Hidden nondeterminism: Math.random, wall clock, unordered iteration | Determinism across machines, unless run on them; float drift between engines |
| Headless sim sweep (seeds × scenarios × autopilot) | Balance envelopes, clear rates, pacing curves at scale | Everything a bot can't feel: legibility, satisfaction, fatigue, learning (simulation-first-design's table) |
| Real-Chrome production perf harness | Frame-time percentiles, GC spikes, stress at scale on this machine | Other GPUs, thermals, mobile, and the dev build's different code paths |
| Scripted UI walk, real CDP input | Focus, default actions, Esc order, key repeat, persistence across reload | Pads (unless shimmed), pointer lock (often refused under automation), screen readers, feel |
Synthetic dispatchEvent | That a listener is wired | Default actions. A test that "presses" a key this way and asserts the slider moved proves nothing |
| Pixel or screenshot compare | Layout regressions, clipping, a missing element | Whether it's readable, and anything below the diff threshold |
| Manual walk on real hardware | Real pads, real pointer lock, real OS focus, high-refresh judder | Repeatability; record what you did |
| A person playing | Feel, comprehension, fun | Anything they don't mention; see playtest-design |
Rule: a result is the number plus the right-hand column. "Clear rate 24/24" is not a result. "Clear rate 24/24, from a bot that never retreats" is. "UI walk green" is not a result. "UI walk green on keyboard in Chromium; pads and pointer lock not exercised" is.
The walk asserts on state the game itself exposes:
freeHorsesPerformance.play.ui.menu.screenwindow.__DEV__document.activeElement, and localStorage after a reloadA probe that recomputes the answer shares the bug it is meant to catch. Expose a
dev-only handle (?dev=1), strip it from production, and check it's stripped:
gravelight has a dev-stripped recipe that greps the bundle.
page.keyboard.press, down/up (two
downs produce a key repeat), and page.mouse. All go through CDP and are
trusted.navigator.getGamepads behind the dev
flag with scripted button states, and run the shell and nav code against it.
pointerlockerror on every
request.
pointerlockchange
events.window.dispatchEvent(new Event('blur')) is acceptable
here, because blur has no default action to miss. It proves the latch is wired,
not that the browser fires the event; the manual alt-tab check covers that.Each one is a script, re-run before every release:
keyboard.down('Escape') pop one level, not twoA sweep over a nondeterministic sim measures noise. Before the first sweep:
Gravelight extends this to rendered frames: capture frames are byte-stable because
shake is driven by the tick, not by Math.random.
When a test is written after the fix, confirm it would have caught the bug.
A failure at the wrong line, a TypeError in setup or a timeout means the test
isn't testing what its name says. Record the mutation in the commit or a ledger;
timberwolf keeps them in docs/ui.md.
?stress, volatile-state-redux ?soak)."Done" for a feel goal needs felt. A green suite is verified about what it tests and assumed about everything else.
page.waitForTimeout, or the walk tests the guard instead of the
flow. Then add one step that deliberately presses inside it.--use-angle=metal on
macOS and SwiftShader elsewhere. A software renderer changes perf completely, so
never take perf numbers from it.waitForFunction(() => …ready)), never
on a fixed sleep, except where the sleep is the test (rule 3, guards).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
Three short reads, in order
game-testing, determinism, playwright, perf-budgets, ui-walkthroughs
npx claudepluginhub rbergman/dark-matter-marketplace --plugin dm-game40 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.Other plugins' skills for the same job