Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

verify-app

БесплатноЗапускает вложенные скриптыНе проверен

Launch and drive the real ShieldBattery Electron app with the sb-app script and playwright-cli over the Chrome DevTools Protocol. Use it to verify ANY…

ShieldBatteryот ShieldBattery★ 232 звезды на GitHub

Об этом скилле

Verifying changes in the Electron app

The Electron app is the primary verification surface. Most features are gated behind the Electron client check, and the web /dev devonly pages render against mock data with no store: they prove a component looks right, nothing more. To verify that something works, drive the real app.

sb-app.mjs does the repetitive parts (launch, wait until rendered, log in, attach playwright-cli, make a lobby against computers, start a replay, wait for a game state, tear down). You drive everything else with playwright-cli on the session it attached. Like dev-stack.mjs it works from any directory and shell, and drives the checkout it lives in.

node .claude/skills/verify-app/sb-app.mjs launch 2                      # instance 2, logged in as claude-2
node .claude/skills/verify-app/sb-app.mjs lobby 2 --computers 1 --start # melee vs 1 computer, waits for 'playing'
node .claude/skills/verify-app/sb-app.mjs end 2                         # end the game, keep the app
node .claude/skills/verify-app/sb-app.mjs stop --all                    # tear down every instance sb-app launched

Prerequisites

  1. Dev stack running (the dev-env skill): dev-stack.mjs start node rust renderer. launch refuses without :5555 and :5566, because the dev app fetches its shell and modules from the renderer dev server.
  2. Seeded accounts: pnpm run seed-dev (claude-admin + claude-1..12, password shieldbattery, UI language reset to English).
  3. playwright-cli is a global npm tool on PATH: run it bare (playwright-cli --version → 0.1.14). Don't wrap it in npx/pnpm dlx/pnpm exec; they add noise to stdout that corrupts the output you parse, and pnpm dlx re-downloads it.
  4. Game DLL, if you changed game/ and will launch a game: node game/gates.mjs --build (or game\build.bat, plus build.bat x86 for 32-bit). A bare cargo build leaves game/dist/shieldbattery_64.dll stale, so the launched game silently runs the old code. launch warns when the DLL in dist is older than the game sources. To inject a DLL from somewhere else (another worktree's game/dist, or a pinned copy while dist is being rebuilt), pass --dll-dir <dir> (sets SB_GAME_DLL_DIR, dev builds only).
  5. App main-process bundle, if you changed app/ (or common/ code it uses): pnpm run build-app-main, then relaunch the instances. The app runs the bundled main process from app/dist/index.js; only the renderer is served live. launch warns when the bundle is older than that code. A stale bundle is otherwise silent until something you added is missing at runtime (e.g. No handler registered for '…').

Launching

Instance N (1..12) is SB_SESSION=sessionN (its own settings and login), CDP port 9221+N, playwright-cli session cN, default account claude-N.

node .claude/skills/verify-app/sb-app.mjs launch <N> [--foreground] [--hidden] [--env K=V]...
     [--dll-dir <dir>] [--login <user>] [--no-login]

launch warms the renderer, starts Electron, waits for the CDP port and for the app to actually render (a window that stays blank is relaunched), handles login, attaches playwright-cli -s=cN, and prints one line: PID, port, cli session, logged-in user. It takes roughly 10 s. If instance N is already up it is reused as is, and launch flags are ignored with a warning: to change --env, --dll-dir or window mode, stop N first.

Which instance. Use instance 2 and up for test accounts. Instance 1 is usually logged in as the developer's own dev account, and launch keeps whoever is already logged in unless you pass --login <user>. Don't log that account out or run throwaway tests on it uninvited. Always read the user in launch's output rather than assuming claude-N.

Login rules. Logged out → logs in as --login or claude-N. Already logged in → keeps that account unless --login names a different one, in which case it logs out and back in. Test instances come back logged out after every relaunch, which is why launch logs in for you. sb-app.mjs login <N> <user> switches accounts on a running instance.

Window behavior. The user is usually working on this machine while you test.

  • By default launch sets SB_APP_BACKGROUND=1 and SB_GAME_BACKGROUND=1: the app and any game it launches open behind other windows without taking focus or moving the cursor. Driving over CDP works the same, the game still renders, and screenshot(gameId) works. The game log confirms it: Launching in the background (SB_GAME_BACKGROUND=1).
  • --hidden never shows the app window at all. Use it for unattended runs that only need the game or the store. Don't use it when you need page screenshots (playwright-cli screenshot): a hidden window has been seen to stop producing frames, and the screenshot hangs waiting for fonts.
  • --foreground is for when the user will l
Полный SKILL.md на GitHub

Установить verify-app в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

sb-app.mjs

FAQ

Что делает скилл verify-app?

Launch and drive the real ShieldBattery Electron app with the sb-app script and playwright-cli over the Chrome DevTools Protocol. Use it to verify ANY client/feature behavior, single-client or multi-client (chat, whispers, lobbies, parties, matchmaking), and any time you need a dev app instance running - to start a game against computers, play a replay, take in-game screenshots or run a capture or benchmark. The browser + /dev pages only prove superficial rendering (they're not wired to the Redux store and use mock data).

Как установить скилл verify-app?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл verify-app запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить verify-app с