Command Palette

Search for a command to run...

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

game-visual-self-review

БесплатноБез исполняемых скриптовНе проверен

Use when you are about to hand off a change a player can see - the exact steps to look at it running (web game in the browser at two viewports plus a seeded…

makifbaysalот makifbaysal★ 123 звезды на GitHub

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

Game Visual Self-Review

Overview

A green test suite says the rules are right in isolation. It does not say the sprite loaded, the camera points at the action, the HUD shows the new value, or the scene is not black. Look at the change running before you hand it off — and when this machine cannot render the game, say exactly that instead of implying you saw it.

Core principle: Default assumption: the change is NOT done until you have seen it rendered. A still frame proves presence and layout; timing and feel are proven by tests at fixed deltas and frame-time numbers.

The render paths

Name the one you used in the closing message:

  • browser — a web game in the shared browser.
  • engine capture — a frame written to PNG by the engine (headless or offscreen), opened over loopback.
  • not observable here — no editor, GPU, display or licence; say which, and comment it on the card.

Web games — the matrix and the tool calls

Matrix: desktop {device: "desktop"} (1440×900) and phone {device: "mobile", width: 360}; add landscape {device: "mobile", width: 844, height: 390} when the game targets phones.

  1. Dev server detached, as the main prompt describes; read the port from the log.
  2. browser_set_viewport → browser_navigate to the game with the repository's debug parameters (?seed=42&scene=Level2) so it opens on the changed content deterministically.
  3. browser_wait_for the canvas (or the DOM overlay that proves boot finished), browser_click through DOM menus.
  4. browser_screenshot with NO width — passing width re-emulates and discards the viewport you set.
  5. Read the browser_set_viewport report: the canvas must not overflow; it fits or letterboxes.

The browser tools cannot press keys or read the console. For both, run a seeded Playwright smoke script with run_terminal — use the repository's Playwright setup if it has one (web-game-performance-and-testing), otherwise a throwaway script in /tmp/tt-<task key>/ when playwright is already installed:

// /tmp/tt-<task key>/smoke.mjs — node smoke.mjs <url> <outDir>
import { chromium } from "playwright";
const [url, out] = process.argv.slice(2);
const browser = await chromium.launch();
const page = await browser.newPage({ viewport: { width: 1280, height: 720 } });
const problems = [];
page.on("pageerror", (e) => problems.push(`pageerror: ${e.message}`));
page.on("console", (m) => { if (m.type() === "error" || m.type() === "warning") problems.push(`${m.type()}: ${m.text()}`); });
await page.goto(url);
await page.waitForSelector("canvas");
await page.waitForTimeout(1000);
await page.screenshot({ path: `${out}/boot.png` });
await page.keyboard.down("ArrowRight"); await page.waitForTimeout(500); await page.keyboard.up("ArrowRight");
await page.keyboard.press("Space"); await page.waitForTimeout(300);
await page.screenshot({ path: `${out}/after-input.png` });
console.log(JSON.stringify({ problems }, null, 2));
await browser.close();
process.exit(problems.some((p) => !p.startsWith("warning")) ? 1 : 0);

Then serve the PNGs and look at them: python3 -m http.server 8799 --bind 127.0.0.1 -d /tmp/tt-<task key>/shots > /tmp/tt-<task key>/shots.log 2>&1 &, browser_navigate http://127.0.0.1:8799/after-input.png, browser_screenshot. Never install Playwright or its browsers on your own initiative; if it is missing, the browser-tool screenshots are what you have — say so.

Headless Chromium renders WebGL in software: correct pixels, slow frames. Never quote its FPS.

Engine games — capture a frame

Godot — Movie Maker writes frames (needs a real renderer, so not --headless; on Linux without a display wrap in xvfb-run):

godot --path . --write-movie /tmp/tt-<task key>/shots/frame.png --fixed-fps 60 --quit-after 120 res://scenes/level_02.tscn

or from a test/script after the change is on screen:

await RenderingServer.frame_post_draw
get_viewport().get_texture().get_image().save_png("/tmp/tt-T-42/shots/hud.png")

Unity — a PlayMode test that renders a camera into a RenderTexture, run with -batchmode but WITHOUT -nographics (no graphics device, no pixels):

[UnityTest] public IEnumerator Hud_AfterPickup_ShowsAmmo() {
    yield return SceneManager.LoadSceneAsync("Arena");
    Object.FindAnyObjectByType<PickupSpawner>().SpawnAt(Vector3.zero, "ammo_small");
    yield return new WaitForSeconds(0.5f);
    var cam = Camera.main; var rt = new RenderTexture(1280, 720, 24);
    cam.targetTexture = rt; cam.Render(); RenderTexture.active = rt;
    var tex = new Texture2D(1280, 720, TextureFormat.RGB24, false);
    tex.ReadPixels(new Rect(0, 0, 1280, 720), 0, 0); tex.Apply();
    File.WriteAllBytes(Path.Combine(Environment.GetEnvironmentVariable("TT_SHOTS") ?? Application.temporaryCachePath, "hud.png"), tex.EncodeToPNG());
    cam.targetTexture = null; RenderTexture.active = null; Object.Destroy(rt);
}

Screen-space overlay UI is not drawn by Camera.Render; for HUD chec

Полный SKILL.md на GitHub

Установить game-visual-self-review в Claude Code и Claude Desktop

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

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

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

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

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

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

FAQ

Что делает скилл game-visual-self-review?

Use when you are about to hand off a change a player can see - the exact steps to look at it running (web game in the browser at two viewports plus a seeded Playwright smoke run for input and console errors; engine games through a headless frame capture), the checklist, and how to report what could not be observed.

Как установить скилл game-visual-self-review?

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

Скилл game-visual-self-review запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

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

Сравнить game-visual-self-review с