К основному содержанию
скилл Claude Code CX Codex Cursor GitHub Copilot

game-automation — скилл для Claude Code: что делает и как установить

Скилл запускает игры, снимает экран через GPU-захват и управляет окном через виртуальные клавиши и мышь. Нужен ИИ-агенту для автоматической проверки модов в реальной игре.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add rehan-remade/universal-modder --skill game-automation -a claude-code
Открыть на GitHub

Что делает game-automation

Скилл даёт агенту набор инструментов um win для Windows и WSL. Агент запускает игру через Steam или прямой исполняемый файл, задаёт фиксированный размер окна и считывает кадры через Windows.Graphics.Capture. Это спасает от чёрных экранов, которые выдаёт стандартный GDI-захват на играх с рендерингом через видеокарту.

Управление идёт через скрипт WinDrive.ps1 или библиотеку um.win на Python. Доступны клики по координатам клиентской зоны окна, относительные смещения для FPS-камер и режим scanmode on для DirectInput. Для ускорения тестов скилл советует встраивать в сам мод сценарии, консольные команды или JSON-мост на локальном сокете 127.0.0.1.

Каждый вызов um win drive запускает PowerShell и требует от одной до двух секунд, поэтому цепочки действий нужно передавать одной строкой. При включённом Windows Auto HDR скриншоты SDR-игр выходят пересвеченными — перед съёмкой функцию придётся отключить в параметрах графики Windows.

Какие задачи решает

  • снять скриншот окна игры через GPU-захват без чёрного экрана
  • запустить игру в оконном режиме через Steam или exe с нужным разрешением
  • эмулировать клики мыши, ввод текста и зажатие клавиш в меню
  • завершить зависшие процессы игры и сборщиков краш-отчётов по точному PID

Примеры запросов агенту

  • Запусти Terraria через Steam с id 105600 в окне 1920x1080 и сделай скриншот
  • Проверь через um win ps список процессов, найди зависший краш-репортер и сними его по PID
  • Наведи фокус на окно игры, нажми Enter и введи тестовую команду

Как установить game-automation

1Через Skills CLI (Vercel)

npx skills add rehan-remade/universal-modder --skill game-automation -a claude-code

2Вручную: положить файлы

~/.claude/skills/game-automation/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/game-automation/

Из того же набора7

Весь набор →
asset-pipeline rehan-remade Готовит из сгенерированной или нарисованной картинки файлы, которые загрузит движок: кадры спрайтов, полосы анимации, изометрические ракурсы из 3D-модели. Claude Code CX Codex Cursor +1 1 500установок mashup-mods rehan-remade Скилл для создания кросс-игровых модов: от Minecraft внутри Skyrim до скейтбординга в MW2. Охватывает passthrough-моды, портирование контента и встраивание одной игры в другую. Claude Code CX Codex Cursor +1 1 500установок reverse-engineering rehan-remade Помогает агенту разобрать игру изнутри: декомпилировать код, вскрыть форматы ассетов, снять дамп живой памяти. Пригодится, когда для мода нужен точный адрес функции или устройство файла. Claude Code CX Codex Cursor +1 1 500установок mod-any-game rehan-remade Скилл для создания модов к ПК-играм: от разведки движка и резервных копий сейвов до генерации ассетов и сборки первого рабочего прототипа. Claude Code CX Codex Cursor +1 1 500установок showcase-video rehan-remade Записывает окно игры с её собственным звуком и собирает из нарезки короткий ролик о моде: титры, переходы, музыка, затемнение. Claude Code CX Codex Cursor +1 1 400установок fal-assets rehan-remade Генерирует спрайты, бесшовные текстуры, PBR-карты, 3D-модели и звуки через API fal. Пригодится разработчикам модов и инди-игр, когда в проекте не хватает арта или аудио. Claude Code CX Codex Cursor +1 1 400установок

Похожие

mantis-reproduce официальный google Создаёт и запускает скрипты воспроизведения сбоев в песочнице для проверки уязвимостей. Пригодится, когда найдены дефекты и нужно подтвердить падение программы. Claude Code CX Codex Cursor +1 1 500установок mantis-researcher официальный google Скилл проводит статический анализ и глубокий аудит файлов по плану из workspace/plan.json. Он ищет граничные проверки, нарушения интерфейсов и отсутствие валидации. Claude Code CX Codex Cursor +1 1 500установок react18-dep-compatibility официальный github Проверяет минимальные версии зависимостей для React 18.3.1 и React 19. Пригодится при обновлении React и разборе peer dependency конфликтов. GitHub Copilot 764установок react18-batching-patterns официальный github Находит и устраняет регрессии автоматического батчинга в классовых компонентах React 18. Помогает исправить баги после обновления с React 17. GitHub Copilot 754установок qa-test-planner softaworks Собирает тест-план, ручные тест-кейсы, регрессионный набор и баг-репорт по описанию фичи. Запускается только по имени: qa-test-planner. Claude Code CX Codex Cursor +1 4 300установок cost-benchmark ruvnet Запускает бенчмарки на локальном корпусе задач и сравнивает затраты с базовыми моделями Gemini и Claude. Пригодится для проверки точности и расходов перед релизом. Claude Code CX Codex Cursor +1 679установок improve-codebase-architecture Matt Pocock Скилл ищет архитектурные узкие места в кодовой базе и показывает варианты углубления модулей в HTML-отчёте. Подойдёт для ревью перед рефакторингом. Claude Code 1 163 035установок design-taste-frontend Leonxlnx Скилл задаёт арт-дирекцию для публичных страниц и рабочих экранов, а затем проверяет результат в браузере по скриншотам. Нужен, когда интерфейс выглядит шаблонным или недоработанным. Claude Code CX Codex Cursor +1 673 100установок

Вопросы о game-automation

Как установить game-automation в Claude Code?

Выполните команду npx skills add rehan-remade/universal-modder --skill game-automation -a claude-code.

Что делает скилл game-automation?

Скилл даёт агенту команды для запуска игр, захвата окна через GPU, кликов по координатам и тестирования модов через скрипты или локальный JSON-мост.

Почему скриншоты игры через обычный захват получаются чёрными?

Игры с графическим рендерингом на GPU не отдают кадры стандартному GDI-захвату. Скилл использует утилиту gfxcapture на базе Windows.Graphics.Capture, которая перехватывает изображение напрямую из графического потока окна.

Исходный текст

SKILL.md · MIT
---
name: game-automation
description: Launch, see and drive a real game so an agent can test its own mods. Covers launching via Steam or the exe, windowed mode at a fixed size, screenshots of the game window (GPU-safe capture), clicking and typing into menus, holding keys, relative mouse, crash-reporter cleanup, killing by PID, reading logs, scripted test scenes, and an in-game JSON bridge that lets an agent observe and act. Windows-first (also from WSL), with notes for Linux and macOS. Use when a mod must be verified in game, when navigating menus automatically, or when building a repeatable test or demo scene.
---

# Game automation: the agent's hands and eyes

The real game is the oracle. The loop is launch → navigate → set up the scene → act → **screenshot and read
logs** → decide. Build it once per game, then every change you make can be checked in a minute.

## Windows (native or from WSL): `um win`
```bash
um win setup                                   # once: PowerShell tools + an ffmpeg with gfxcapture, picks NVENC/AMF/QSV/x264
um win ps                                      # windowed processes: pid, name, title
um win launch --steam 105600                   # or: um win launch "C:\Games\Foo\Foo.exe" -- -windowed
um win shot --exe Terraria.exe shot.png --scale 0.33   # full frame + a 1/3 copy that's cheap to look at
um win drive --proc Terraria "focus" "click 640 360" "key 0x1B" "type hello" "hold 0x44 1500"
um win drive --proc Terraria "hold 0x20 150" "sleep 200" "hold 0x20 150"   # sleep <ms> pauses between steps
um win drive --proc Terraria idle              # seconds since the user last touched mouse/keyboard (does not wait)
um win kill <pid>                              # exact PID only
um win reg get "HKCU\Software\..."             # registry (reg set backs the key up first)
```
From Python (for longer scripts), `from um.win import Drive, shot, Recorder`, then `d = Drive("AoE2DE_s")`,
`d.focus()`, `d.click(x, y)`, `d.key("0x0D")`.

**WinDrive commands** (`um/ps1/WinDrive.ps1`; stdin protocol, one reply per line). Coordinates are in
the game window's **client area**.
- Mouse: `move x y`, `click x y [right]`, `mdown`/`mup`, `drag x0 y0 x1 y1`, `rel dx dy` (FPS cameras /
  raw input), `wheel 120`.
- Keyboard: `key <vk> [tap|down|up]`, `hold <vk> <ms>`, `type <text>`, `scanmode on` (DirectInput /
  raw-input games that ignore virtual-key events).
- Window: `focus`, `rect`, `size <w> <h>` (sets the client size), `title`, `fg`, `idle`, `untop`.
- Timing: `sleep <ms>` waits between steps in one call. Each `um win drive` call starts PowerShell (1-2 s),
  so put timed combos in one call.
- Virtual-key codes: Esc 0x1B, Enter 0x0D, Space 0x20, W/A/S/D 0x57/0x41/0x53/0x44, F1 0x70, Shift 0x10,
  Ctrl 0x11, arrows 0x25-0x28.

**Rules of the road**
- **Never focus a game with an online mode while the human is typing.** It happened with GTA V: the agent
  focused GTA to click Story Mode, the human's keystrokes hit GTA's landing page, and GTA warned about
  "accessing GTA Online servers with an altered version". ScriptHookV blocked it; don't rely on that.
  Check `idle`, ask the human to click, and launch with the anti-cheat off so online can't start. See
  `knowledge/techniques/driving-real-games-safely.md`.
- **Input only goes to the game.** WinDrive refuses to send while another app is in the foreground. The one
  exception is when nothing is and the cursor is over the game, which windowed games cause by dropping the
  foreground on clicks.
- **The user may be at the PC.** If `idle` is under a minute, ask before driving, and keep sessions short.
  Unattended runs are fine once the user says so.
- **Screenshots cost tokens.** Look at `--scale 0.33` copies. Multiply coordinates back ×3 for clicks, and
  keep a table of menu click points in MODLOG.md, measured once.
- **Why gfxcapture:** GPU-rendered games come out black with GDI capture. gfxcapture (Windows.Graphics.Capture)
  grabs one window's real frames, even when covered. It can't capture minimized windows.
- **HDR displays:** with Windows Auto HDR on for an SDR game, captures come out washed out (2-3x brighter,
  cyan-shifted), so colours can't be judged. `um win shot`/`record` warn when it's on; turn it off for the game
  while capturing (Settings > System > Display > Graphics > the game > Auto HDR), and back on after if the user wants.

## Make the window predictable
- **Windowed mode at a fixed client size.** Every game hides this setting somewhere:
  - an ini (`[/Script/Engine.GameUserSettings]` in UE `GameUserSettings.ini`, Unity's
    `Screenmanager Fullscreen mode` / `Resolution` registry values under `HKCU\Software\<company>\<product>`);
  - a launch flag (`-windowed -w 1920 -h 1080`, Unity `-screen-fullscreen 0 -screen-width 1920 -screen-height 1080`,
    Source `-sw -w 1920 -h 1080`);
  - or the game's own registry (AoE2: `Mode Display` 0 + `Windowed Width/Height`).
  - `um win drive --proc X "size 1920 1080"` also resizes most windowed games.
- **Skip intros:** launch flags (`-skipintro`, `-nosplash`, Unity `-popupwindow`), or delete/rename intro
  videos in a **copy** of the game.
- **Jump straight in:** loader flags (tModLoader `-skipselect Player:World`), a save made for testing,
  scenario auto-load, a dev console command.
- **Background throttling:** many games throttle or pause unfocused. Find the setting (Terraria:
  `Main.instance.InactiveSleepTime = TimeSpan.Zero`; Unity: `Application.runInBackground = true`; UE:
  `t.IdleWhenNotForeground 0`).

## Better than clicking: a scripted scene or a bridge
- **Chat or console commands in your mod** give items, spawn enemies and teleport. They make tests one line
  (`/arsenal`, `/mothership`).
- **Test scenes:** a mod-side timeline (spawn waves at frame N, fire at N+30), a scenario with triggers
  (AoE2 via AoE2ScenarioParser), a dedicated test world with a pristine backup.
- **Agent bridge:** a JSON-lines socket inside the mod on `127.0.0.1` (see
  `examples/terraria-tmodloader/reference/AgentBridge.cs`).
  - Commands like `observe` (menu options or world state as text), `click <id>`, `controls`, `step`.
  - Handle every request on the game's main thread after an update, so replies are consistent.
  - Read menus generically from the UI tree, so the agent sees what a player would. Leave destructive
    buttons (delete) out.
  - An agent can then play without pixels at all.
- **Out-of-process backend:** keep the in-game part thin and put the brains outside (HTTP/file-drop). That
  pattern scales to AI NPCs and cross-game mashups.

## Crashes and cleanup
- **Crash reporters** (BugSplat `BsSndRpt64.exe`, `CrashReportClient.exe`, `UnityCrashHandler64.exe`) can
  linger and make Steam say "already running". `um win ps` to spot them, `um win kill <pid>` to clear
  them.
- Never `pkill -f` or wildcard `taskkill /IM`. The pattern can match your own shell or other apps.
- After a crash, read the loader or game log first (the mod-any-game skill lists them), then the Windows
  Event Viewer (Application log) for native crashes.

## Linux and macOS
- **Linux (X11):** `xdotool search --name "Game" windowactivate --sync key Escape`, `xdotool mousemove
  --window $W 640 360 click 1`. Screenshots: `import -window $(xdotool search --name Game) shot.png`, or
  ffmpeg `x11grab`.
- **Linux (Wayland):** ydotool + `grim`. Proton games are Windows games under Wine: launch options
  (`WINEDLLOVERRIDES`, `PROTON_LOG=1`) go in Steam.
- **macOS:** `screencapture -l <windowid> shot.png` (window id via `GetWindowID` or AppleScript),
  `osascript` / `cliclick` for input. Input and screen recording need Accessibility and Screen Recording
  permission for the terminal.

© rehan-remade · MIT · rehan-remade/universal-modder

Смотрите также

Спонсоры проекта

Компании, которые помогают держать аналитику открытой