MCPInstall

qa-game

Add Playwright QA tests to a game — visual regression, gameplay verification, and performance. Use when the user says "add tests", "test my game", "add QA", "check for bugs", or "add visual regression tests". Do NOT use for manual playtesting or gameplay design.

Installs
940
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/playableintelligence/game-creator --skill qa-game
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads qa-game automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

QA Game

Add automated QA testing with Playwright to an existing game project. Tests verify your game boots, scenes work, scoring functions, and visuals haven't broken — like a safety net for your game.

Instructions

Analyze the game at $ARGUMENTS (or the current directory if no path given).

First, load the game-qa skill to get the full testing patterns and fixtures.

Step 1: Audit testability

  • Read package.json to identify the engine and dev server port
  • Read vite.config.js for the server port
  • Read src/main.js to check if window.__GAME__, window.__GAME_STATE__, window.__EVENT_BUS__ are exposed
  • Read src/core/GameState.js to understand what state is available
  • Read src/core/EventBus.js to understand what events exist
  • Read src/core/Constants.js to understand game parameters (rates, speeds, durations, max values)
  • Read all scene files to understand the game flow
  • Read design-brief.md if it exists — it documents expected mechanics, magnitudes, and win/lose reachability

Step 2: Setup Playwright

  1. Install dependencies: npm install -D @playwright/test @axe-core/playwright && npx playwright install chromium
  2. Create playwright.config.js with the correct dev server port and webServer config
  3. Expose window.__GAME__, window.__GAME_STATE__, window.__EVENT_BUS__, window.__EVENTS__ in src/main.js if not already present
  4. Create the test directory structure:
    tests/
    ├── e2e/
    │   ├── game.spec.js
    │   ├── visual.spec.js
    │   └── perf.spec.js
    ├── fixtures/
    │   └── game-test.js
    └── helpers/
        └── seed-random.js
    
  5. Add npm scripts: test, test:ui, test:headed, test:update-snapshots

Step 3: Generate tests

Write tests based on what the game actually does:

  • game.spec.js: Boot test, scene transitions, input handling, scoring, game over, restart
  • visual.spec.js: Screenshot regression for stable scenes (gameplay initial state, game over). Skip active gameplay screenshots — moving objects make them unstable.
  • perf.spec.js: Load time budget, FPS during gameplay, canvas dimensions

Follow the game-qa skill patterns. Use gamePage fixture. Use page.evaluate() to read game state. Use page.keyboard.press() for input.

Step 4: Design-intent tests

Add a test.describe('Design Intent') block to game.spec.js. These tests catch mechanics that technically exist but are too weak to matter.

  1. Lose condition: Detect deterministically whether the game has a lose state. Read GameState.js — if it has a won, result, or similar boolean/enum field, the game distinguishes win from loss. Also check render_game_to_text() in main.js — if it returns distinct outcome modes (e.g., 'win' vs 'game_over'), the game has a lose state.

    If a lose state exists: start the game, provide NO input, let it run to completion (use page.waitForFunction with the round duration from Constants.js). Assert the outcome is the losing one (e.g., won === false, mode === 'game_over').

    This assertion is non-negotiable. Do NOT write a test that passes when the player wins by doing nothing. If the current game behavior is "player wins with no input," that is a bug — write the test to catch it.

  2. Opponent/AI pressure: If an AI-driven mechanic exists (auto-climbing bar, enemy spawning, difficulty ramp), test that it produces substantial state changes. Run the game for half its duration without player input. Assert the opponent's state reaches at least 25% of its maximum. If design-brief.md exists, use its expected magnitudes for thresholds. Otherwise, derive from Constants.js: calculate rate * duration and assert it reaches meaningful levels.

  3. Win condition: Test that active player input leads to a win. Provide rapid input throughout the round and assert the outcome is a win.

Step 5: Entity interaction audit

Audit collision and interaction logic for asymmetries that would confuse a first-time player.

If design-brief.md has an "Entity Interactions" section, use it as the checklist. Otherwise, audit GameScene.js directly:

  1. Find all collision handlers, overlap checks, or distance-based interactions
  2. Map which entities interact with which others
  3. Flag any visible moving entity that interacts with one side (player OR opponent) but not the other — add a // QA FLAG: asymmetric interaction comment in the test file noting the entity name and the asymmetry

This is a flag, not a hard fail. Some asymmetries are intentional (e.g., hazards that only affect the player). The flag ensures the asymmetry is a conscious design choice, not an oversight.

Step 6: Run and verify

  1. Run npx playwright test to execute all tests
  2. If visual tests fail on first run, that's expected — generate baselines with npx playwright test --update-snapshots
  3. Run again to verify all tests pass
  4. Summarize results

Step 7: Report

Tell the user in plain English:

  • How many tests were created and what they check
  • How to run them: npm test (headless), npm run test:headed (see the browser), npm run test:ui (interactive dashboard)
  • "These tests are your safety net. Run them after making changes to make sure nothing broke."

Example Usage

/qa-game examples/flappy-bird

Result: Installs Playwright → creates 15 tests (boot, scene transitions, input, scoring, restart, game-over, visual regression, FPS, load time) → generates tests/ directory with fixtures and helpers → all tests pass. Run npm test anytime after changes.

Next Step

Tell the user:

Your game now has automated tests! Finally, run /game-creator:review-game for a full architecture review — it checks your code structure, performance patterns, and gives you a score with specific improvement suggestions.

Pipeline progress: /viral-game → /design-game → /add-audio → /qa-game → /review-game

(This is the /viral-game one-shot pipeline — not the /make-game multi-session, milestone-driven workflow.)

FAQ

What does the qa-game skill do?

Add Playwright QA tests to a game — visual regression, gameplay verification, and performance. Use when the user says "add tests", "test my game", "add QA", "check for bugs", or "add visual regression tests". Do NOT use for manual playtesting or gameplay design.

How do I install qa-game?

Run npx skills add https://github.com/playableintelligence/game-creator --skill qa-game in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/qa-game/ (personal) or .claude/skills/qa-game/ (project).

Which AI agents can use qa-game?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is qa-game safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains qa-game?

It is published by playableintelligence in playableintelligence/game-creator. It has 940 recorded installs.

More from playableintelligence/game-creator

View all →

game-designer

playableintelligence/game-creator

Game UI/UX designer that analyzes and improves the visual polish, atmosphere, and player experience of browser games. Use when a game needs visual improvements, better backgrounds, particles, animations, screen transitions, juice/feel, or overall aesthetic upgrades.

Frontend & Design1.9K installs

game-assets

playableintelligence/game-creator

Game asset engineer that creates pixel art sprites, animated characters, and visual entities for browser games. Use when a game needs better character art, enemy sprites, item visuals, or any upgrade from basic geometric shapes to recognizable pixel art.

Media & Creative1.6K installs

design-game

playableintelligence/game-creator

Audit 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).

Media & Creative1.4K installs

phaser

playableintelligence/game-creator

Build 2D browser games with Phaser 3 using scene-based architecture and centralized state. Use when creating a new 2D game, adding 2D game features, working with Phaser, or building sprite-based web games.

Media & Creative1.4K installs

game-audio

playableintelligence/game-creator

Game audio engineer using Web Audio API for procedural music and sound effects in browser games. Zero dependencies. Use when adding music or SFX to a game.

Media & Creative1.3K installs

game-architecture

playableintelligence/game-creator

Game architecture patterns and best practices for browser games. Use when designing game systems, planning architecture, structuring a game project, or making architectural decisions about game code.

Popular testing & qa skills

View category →

tdd

mattpocock/skills

Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.

Testing & QA1.2M installs

grilling

mattpocock/skills

Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.

Testing & QA996.2K installs

migrate-to-shoehorn

mattpocock/skills

Migrate test files from as type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace as in tests, or needs partial test data.

Testing & QA484.1K installs

run-train

lllllllama/rigorpilot-skills

Rigor Train skill for deep learning research repositories. Use when a documented or selected training command should be run conservatively for startup verification, short-run verification, full kickoff, or resume, with command, config, seed, log, checkpoint, status, and metric evidence written to standardized trainoutputs/. Do not use for environment setup, exploratory sweeps, speculative idea implementation, or end-to-end orchestration.

Testing & QA337.8K installs

test-driven-development

obra/superpowers

Use when implementing any feature or bugfix, before writing implementation code

Testing & QA261.8K installs

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work

Testing & QA216.8K installs