develop-web-game

Run Playwright-based automated tests for web games with deterministic time-stepping.

24.7k|1.7k|Updated Nov 25, 2025
One-click install
npx skills add https://github.com/openai/skills --skill develop-web-game
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: develop-web-game
Source: https://github.com/openai/skills/tree/main/skills/.curated/develop-web-game
Command: npx skills add https://github.com/openai/skills --skill develop-web-game

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires playwright, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill streamlines the development of web games by providing a robust loop for implementing small changes, running automated tests with Playwright, and inspecting visual and textual output.

Core Features & Use Cases

  • Iterative Development: Implement changes in small, manageable steps.
  • Automated Testing: Utilize Playwright for deterministic testing, including input simulation and state capture.
  • Visual & State Inspection: Review screenshots and text-based game state (render_game_to_text) to verify correctness.
  • Use Case: When building a new character movement mechanic, you can implement the code, run the Playwright script to test forward, backward, jump, and special ability inputs, then visually confirm the character's animations and state changes in the captured screenshots and JSON output.

Quick Start

Use the develop-web-game skill to run the Playwright client against http://localhost:5173 with the provided action payloads.

Frequently Asked Questions about develop-web-game

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate testing for web games using Playwright?

Automate web game testing with Playwright by executing game logic and validating state through deterministic time-stepping, input simulation, and capturing screenshots. This approach enables reliable iterative development by programmatically verifying visual and textual output.

What functions does my web game need to expose for automated testing?

Your web game needs to expose `window.render_game_to_text` for capturing text-based game state and `window.advanceTime` for deterministic time-stepping. These functions allow the Playwright client to execute actions and validate state changes reliably during iterative development.

Can I capture screenshots and console errors during web game testing?

Yes, you can capture screenshots and console error logs during web game testing. The Playwright-based client captures visual output alongside text-based game state, allowing you to inspect both visual changes and console errors after simulating inputs.

What is deterministic time-stepping in web game testing and how does it work?

Deterministic time-stepping in web game testing advances the game state by controlled intervals using `window.advanceTime`. This ensures that game logic executes predictably during automated Playwright tests, making state validation reproducible across multiple iterative development cycles.

Does Playwright support iterative development workflows for browser-based games?

Playwright supports iterative development workflows for browser-based games by running automated tests against local environments. You can implement mechanics in small steps, simulate inputs via action payloads, and verify correctness through captured screenshots and JSON output.