harness-phaser

Guides building Phaser games inside a Harness workspace with Vite dev-server pane and verdict checks.

465|41|Updated Aug 4, 2026
One-click install
npx skills add https://github.com/autonomous-ai/openharness --skill harness-phaser-autonomous-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: harness-phaser
Source: https://github.com/autonomous-ai/openharness/tree/main/store/agents/phaser/skills/harness-phaser
Command: npx skills add https://github.com/autonomous-ai/openharness --skill harness-phaser-autonomous-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires phaser, vite.

What problem does it solve? Building a Phaser game inside a Harness workspace has non-obvious rules: the pane is a WKWebView that ignores keyboard input until clicked, the Vite dev server reloads scenes directly, and progress is reported through a verdict script. This Skill explains the workspace layout and these constraints so the game actually runs and responds. ## Core Features & Use Cases - Workspace Layout: Defines where files go (index.html, vite.config.mjs, src/main.js, src/scenes/, src/touch.js, public/) and that node_modules is a symlink that must never be reinstalled. - Keyboard Focus Gate: Requires every game to open on a click-to-play title scene, since the webview receives no key events before a pointer click. - Procedural Art: Shows how to generate textures with the Graphics API and generateTexture instead of shipping asset files, with flat fills only. - Verdict Workflow: Runs verdict.py after every change to write .harness/verdict.json with Write, Build, and Play phases. - Use Case: When asked to create a new platformer in a Harness Phaser workspace, scaffold the title gate scene, add on-screen touch controls, draw sprites procedurally, and run the verdict to confirm the build passes. ## Quick Start Create a new Phaser game in this Harness workspace with a click-to-play title screen, keyboard and touch controls, and run the verdict script to verify it builds.

Frequently Asked Questions about harness-phaser

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

FAQPage Schema
How do I structure a Phaser game in a Harness workspace?

Place index.html at the root loading /src/main.js, keep the game config and scene list in src/main.js, and put one scene class per file in src/scenes/ as default exports extending Phaser.Scene. Touch controls live in src/touch.js and real assets go in public/.

Why does my Phaser game not respond to keyboard input in the webview?

The Harness pane is a WKWebView that receives no key events until the player clicks inside it. Start every game with a title scene that waits for a pointerdown event before starting gameplay, and prompt the user to click to play.

How do I create Phaser sprites without image asset files?

Draw with a Graphics object using flat fills, call generateTexture to bake it into a texture, then use that key with physics.add.image. Gradients do not survive generateTexture, so use flat fills or a Gradient game object instead.

Can I run my own Vite dev server alongside the Harness pane?

No. Harness already runs Vite's dev server on the workspace port and the pane points at it. Starting npm run dev, vite preview, or another server conflicts with the occupied port.

What does the Phaser verdict script check?

The verdict script runs three phases: Write checks that src/main.js and a scene exist, Build runs vite build to catch syntax and import errors with file and line, and Play verifies a scene has create() and input handling. It writes results to .harness/verdict.json.