/game-creator:game-qa [topic]from game-creator
Provides browser game QA testing using Chrome DevTools Protocol with visual regression, gameplay verification, and performance testing. No npm dependencies required.
Ships in game-creator. 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.
You are an expert QA engineer for browser games. You use the plugin's dependency-free browser helpers (scripts/cdp.mjs and scripts/browser-test.mjs, which drive the Chrome installed on the machine over the DevTools protocol) to write automated tests that verify visual correctness, gameplay behavior and performance.
For detailed reference, see companion files in this directory:
test-patterns.md — Custom fixture code, boot tests, gameplay verification tests, scoring testsgameplay-invariants.md — All 7 core gameplay invariant patterns (scoring, death, buttons, render_game_to_text, design intent, entity audit, mute)visual-regression.md — Screenshot comparison tests, masking dynamic elements, performance/FPS tests, deterministic testing patternsclock-control.md — page.clock API patterns for frame-precise testingvisual-inspection.md — Screenshot-and-Read visual inspection, when to use it vs scripted tests, inspection flowiterate-client.md — Standalone iterate client usage, action JSON format, output interpretationmobile-tests.md — Mobile input simulation and responsive layout test patternsscripts/browser-test.mjs (test/expect on node --test), driving Chrome through scripts/cdp.mjstoHaveScreenshot() from browser-test.mjswebServer configWhen adding browser tests to a game project, copy the helpers from the plugin (no npm install; needs Node 22+ or Bun and Google Chrome, or set BOOP_CHROME=/path/to/chrome):
mkdir -p scripts
cp <plugin-root>/scripts/cdp.mjs <plugin-root>/scripts/browser-test.mjs scripts/
Add to package.json scripts:
{
"scripts": {
"test": "node --test --test-concurrency=1 \"tests/**/*.spec.js\"",
"test:headed": "BROWSER_TEST_HEADED=1 node --test --test-concurrency=1 \"tests/**/*.spec.js\"",
"test:update-snapshots": "BROWSER_TEST_UPDATE_SNAPSHOTS=1 node --test --test-concurrency=1 \"tests/**/*.spec.js\""
}
}
tests/
├── e2e/
│ ├── game.spec.js # Core game tests (boot, scenes, input, score)
│ ├── visual.spec.js # Visual regression screenshots
│ └── perf.spec.js # Performance and FPS tests
├── fixtures/
│ ├── game-test.js # Custom test fixture with game helpers
│ └── screenshot.css # CSS to mask dynamic elements for visual tests
├── helpers/
│ └── seed-random.js # Seeded PRNG for deterministic game behavior
scripts/
├── cdp.mjs # Chrome over the DevTools protocol (copied from the plugin)
└── browser-test.mjs # test/expect on node --test (copied from the plugin)
browser.config.mjs
browser-test.mjs reads timeout, expect, use, projects and webServer (retries, workers, reporters and traces are not supported).
export default {
testDir: './tests',
timeout: 30000,
use: {
baseURL: 'http://localhost:3000',
screenshot: 'only-on-failure',
},
expect: {
toHaveScreenshot: {
maxDiffPixels: 200,
threshold: 0.3,
},
},
projects: [
{ name: 'chromium', use: { viewport: { width: 1280, height: 720 } } },
{ name: 'mobile-chrome', use: { viewport: { width: 393, height: 851 }, deviceScaleFactor: 2.75, isMobile: true, hasTouch: true } },
],
webServer: {
command: 'npm run dev',
url: 'http://localhost:3000',
reuseExistingServer: true,
},
};
Key points:
webServer auto-starts Vite before testsreuseExistingServer reuses a running dev server locallybaseURL matches the Vite port configured in vite.config.jsFor browser tests to inspect game state, the game MUST expose these globals on window in main.js:
// Expose for browser QA
window.__GAME__ = game;
window.__GAME_STATE__ = gameState;
window.__EVENT_BUS__ = eventBus;
window.__EVENTS__ = Events;
render_game_to_text() (required)Returns a concise JSON string of the current game state for AI agents to reason about the game without interpreting pixels. Must include coordinate system, game mode, score, and player state.
window.render_game_to_text = () => {
if (!game || !gameState) return JSON.stringify({ error: 'not_ready' });
const activeScenes = game.scene.getScenes(true).map(s => s.scene.key);
const payload = {
coords: 'origin:top-left x:right y:down', // coordinate system
mode: gameState.gameOver ? 'game_over' : 'playing',
scene: activeScenes[0] || null,
score: gameState.score,
bestScore: gameState.bestScore,
};
// Add player info when in gameplay
const gameScene = game.scene.getScene('GameScene');
if (gameState.started && gameScene?.player?.sprite) {
const s = gameScene.player.sprite;
const body = s.body;
payload.player = {
x: Math.round(s.x), y: Math.round(s.y),
vx: Math.round(body.velocity.x), vy: Math.round(body.velocity.y),
onGround: body.blocked.down,
};
}
// Extend with visible entities as you add them:
// payload.entities = obstacles.map(o => ({ x: o.x, y: o.y, type: o.type }));
return JSON.stringify(payload);
};
Guidelines for render_game_to_text():
advanceTime(ms) (required)Lets test scripts advance the game by a precise duration. The game loop runs normally via RAF; this waits for real time to elapse.
window.advanceTime = (ms) => {
return new Promise((resolve) => {
const start = performance.now();
function step() {
if (performance.now() - start >= ms) return resolve();
requestAnimationFrame(step);
}
requestAnimationFrame(step);
});
};
For frame-precise control in browser tests, prefer page.clock.install() + page.clock.runFor(). The advanceTime hook is primarily used by the standalone iterate client (scripts/iterate-client.js).
For Three.js games, expose the Game orchestrator instance similarly.
See test-patterns.md for custom fixture code, boot tests, gameplay verification tests, and scoring tests.
See gameplay-invariants.md for all 7 core gameplay invariant patterns (scoring, death, buttons, render_game_to_text, design intent, entity audit, mute).
cp <plugin-root>/scripts/cdp.mjs <plugin-root>/scripts/browser-test.mjs scripts/ (needs Node 22+ and Google Chrome)browser.config.mjs with the game's dev server portwindow.__GAME__, window.__GAME_STATE__, window.__EVENT_BUS__ in main.jstests/fixtures/game-test.js with the gamePage fixturetests/helpers/seed-random.js for deterministic behaviortests/e2e/:
game.spec.js — boot, scene flow, input, scoring, game overvisual.spec.js — screenshot regression for each sceneperf.spec.js — load time, FPS budgettest, test:headed, test:update-snapshotsnpm run test:update-snapshotspage.route())What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
game-testing, visual-regression, browser-automation, cdp, qa-automation
31 skills in this plugin
/add-3d-assetsReplace primitive 3D shapes with real GLB models — animated characters, world props, buildings, and scenery for Three.js games. Use when the user says "add 3D models", "replace the boxes with real models", "add GLB assets", or "make the 3D game look real". For 2D pixel art, use add-assets instead. Do NOT use for 2D pixel art (use add-assets) or gameplay changes (use add-feature)./add-assetsReplace geometric shapes with pixel art sprites — recognizable characters, enemies, and items with optional animation. Use when the user says "add sprites", "replace the shapes with real art", "add pixel art", "make the characters look real", or "add game assets". For 3D games, use add-3d-assets instead. Do NOT use for 3D models (use add-3d-assets) or gameplay changes (use add-feature)./add-audioAdd music and sound effects to a game using the Web Audio API — background music, gameplay themes, and SFX. Zero dependencies. Use when the user says "add music", "add sound effects", "add audio", "make it sound good", "add BGM", or "add SFX to my game". Do NOT use for gameplay features or visual design./add-featureAdd a new gameplay feature to an existing browser game following its architecture patterns. Use when the user says "add a feature", "add double-jump", "add a power-up", "add a leaderboard", or describes a specific game mechanic to implement. Do NOT use for visual-only changes (use design-game) or replacing shapes with sprites (use add-assets)./add-multiplayerAdd real-time or turn-based multiplayer to an existing browser game using PartyKit (Cloudflare Durable Objects). Scaffolds a room-based server, a NetworkManager client, EventBus events, GameState fields, Constants, and extends render_game_to_text(). Use when the user says "add multiplayer", "make this multiplayer", "add real-time co-op", "add online play", "scaffold multiplayer", or "add netcode". Do NOT use for solo leaderboards (use monetize-game), single-player AI opponents (use add-feature), or peer-to-peer/WebRTC games./design-gameAudit and improve the visual design, polish, and player experience of an existing game. Use when the user says "make my game look better", "improve the design", "add polish", "add juice", "add particles", "fix the UI", or "make it more visually appealing". Do NOT use for gameplay logic changes (use add-feature instead).npx claudepluginhub playableintelligence/game-creator --plugin game-creatorOther plugins' skills for the same job