# Game Automation

Launch, see and drive a real game so an agent can test its own mods.

- Repository: https://github.com/rehan-remade/universal-modder (9317 stars)
- Category: Testing
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add rehan-remade/universal-modder --skill game-automation -g -a claude-code -y`
Codex: `npx skills add rehan-remade/universal-modder --skill game-automation -g -a codex -y`
Cursor: `npx skills add rehan-remade/universal-modder --skill game-automation -g -a cursor -y`
Gemini CLI: `npx skills add rehan-remade/universal-modder --skill game-automation -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add rehan-remade/universal-modder`

## 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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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")`.

The rest: https://github.com/rehan-remade/universal-modder/blob/HEAD/.agents/skills/game-automation/SKILL.md
