/web-mini-game-kit:probing-web-game-mechanicsfrom Web Mini-Game Kit
Injects game state into a headless browser to verify that implemented mechanics (scoring, phase transitions, gates, resets) match their spec. Use when a mechanic's spec conformance is unverified and organic play is too slow or rare.
Ships in Web Mini-Game Kit. 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; scripts run unread.
Deterministically verify that a specific mechanic behaves as specified, by driving a real browser to the exact game state where the mechanic fires. Organic play (bots, manual input) reaches rare states slowly and non-deterministically; state injection reaches them in milliseconds and asserts exact outcomes.
This sits between two other layers — keep them separate:
smoke-testing-web-gamesevaluating-gameplay-balanceindex.html or dev-server URL) and Playwright + Chromium resolvable from the project directory.page.evaluate. Top-level let/var in a classic <script> (e.g. crisp-game-lib games) are reachable by evaluating their names as expressions. For bundled/module games, reaching state usually requires a deliberate debug handle (e.g. window.__game = { state, step }). Adding one is a change to the product, so decide it explicitly rather than by default: add the minimal handle when the current work already includes testability or touches that surface; otherwise report the mechanic as unprobeable instead of widening the change. If verification genuinely requires changing a production surface, say so and state why.Treat the debug handle as a maintained contract, not one-time setup. It grows with the game: any state a rule depends on must stay reachable through it, because a rule buried in a frame-local variable is unverifiable — it cannot be probed, and it will be the rule nobody notices breaking. Two sub-patterns are worth building deliberately rather than discovering late:
visualContract() returning {palette: {player: "cyan", danger: "red", ...}, hud: {row1Y: 2, gaugeX: 31, ...}}) so probes assert them as values and the renderer reads the same object. Part of what is assumed to be screenshot-only territory becomes machine-checkable, and the drawing code and the assertion become incapable of disagreeing.scripts/probe-template.mjs (copy into the project scratch area and adapt; it is a template to edit, not a runner to execute as-is). It resolves Playwright from the project cwd, captures pageerror/console.error in every phase, and exits non-zero on any error.window.__s0 = score at injection time) so assertions are deltas, not absolutes.ArrowUp and KeyW if both are bound to "up"). Probing one key per action leaves every other binding untested and green — observed case: a name-entry cursor bound to arrows only, in a game whose movement also accepted WASD, so WASD players could not enter their initials while both the probe suite and the screenshot harness stayed green.startGame() issued before the boot frame, which then ran startAttract() and discarded it. Never gate on a fixed timeout — wait on an observable state (waitForFunction(() => state().phase === "attract")) before injecting anything.A probe script kept with the project (scratch area or tests/), a pass/fail line per scenario with expected-vs-actual values, and screenshots for screen-level scenarios. Report probe-artifact failures separately from real bugs.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub abagames/agentic-gamedev-skills --plugin web-mini-game-kit4 skills in this plugin
/developing-with-crisp-game-libCreates or repairs browser mini-games specifically using crisp-game-lib. Use only when the user explicitly asks for crisp-game-lib or the existing project already uses it; skip for Godot, Unity, Phaser, canvas-only, or unspecified engine requests./smoke-testing-web-gamesSmoke-tests a browser game build in a headless browser through load, idle, and input phases, failing on console errors, uncaught exceptions, or crashes. Use after changes that can reach browser runtime, especially game-loop, input, dependency, entry-point, or build-output changes. Skip changes the running build cannot reach. This checks runtime health, not gameplay quality, balance, visuals, or mechanic correctness. Requires Node 18+ and Playwright with Chromium in the target project./styling-web-game-typographyImplements readable, licensed typography for distributed games (web export, downloadable, packaged). Use when defining theme-based text roles, adopting fonts, handling font licenses for redistribution, or checking HUD readability. Engine-agnostic core; Godot 4.2+ implementation patterns live in references/godot-patterns.md.Other plugins' skills for the same job