verify
星标16
分支2
更新时间2026年7月9日 16:37
Drive the zxcode web IDE / play app in a headless browser to verify emulator-facing changes at runtime.
安装
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
SKILL.md
readonly菜单
Drive the zxcode web IDE / play app in a headless browser to verify emulator-facing changes at runtime.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
| name | verify |
| description | Drive the zxcode web IDE / play app in a headless browser to verify emulator-facing changes at runtime. |
http://localhost:8080/
(Caddy proxy, CSP-accurate) proxying the webpack dev server on :8000.npm run dev. Start it when needed:
npm run dev:play (port 8001, up in ~60s). Kill it afterwards if you
started it.ENGINE_REV: fetch / for the bundle URL, then
curl -s .../dist/bundle.<hash>.js | grep -o "r[0-9]*-[a-z-]*".
webpack-dev-server usually DOES pick up packages/emulator edits, but check.No playwright in the repo. npm i playwright-core in the scratchpad and
launch the cached headless shell:
const { chromium } = require('playwright-core');
const browser = await chromium.launch({ executablePath:
process.env.HOME + '/.cache/ms-playwright/chromium_headless_shell-1200/chrome-headless-shell-linux64/chrome-headless-shell' });
#jsspeccy-screen canvas exists AND
globalThis.zxMatrixKey is set (Go wasm runs on the main thread, so
page.evaluate can call zx* exports directly).#jsspeccy-screen (menu/toolbar/dialog buttons are hidden):
page.locator('#jsspeccy-screen button').locator('visible=true').first().click().
The overlay button is the one with style.width === '192px'.keyboard.press() / instant mouse.click() on a virtual key can land
down+up inside one frame and be missed. Use down / sleep(150ms) / up.canvas.toDataURL() before/after.window.__zxgoAudio().pulledPerSec (~44100 when running, audio works in
the headless shell) or press a key and look for pixel change.document.activeElement is the canvas; the
apps show a cyan ring via :focus-within (.emulator-frame in web,
#jsspeccy-screen in play). GoEmulator.start() auto-focuses the canvas.
Virtual keys (#virtkeys) dispatch synthetic key events AT the canvas and
work without focus.zx-matrix-key CustomEvent on document
(detail: {row, mask, down}) — the apps' on-screen keyboards mirror it.
Canvas blur releases all held matrix keys in the core.[zxplay] emulator engine: zxgo ... rNN-... is the
ENGINE_REV ground truth for what the page actually runs.