/console-skill:console-tester run.py boot|soak|last, triage.py scan|compare|lookup, abdiff.py regs|memfrom console-skill
Automates playtesting for PS2 game ports: boots ELF under timeout, classifies runs as PASS/HANG/CRASH/FAIL, triages crash logs by PC with Ghidra function names, ranks fixes, and compares register/memory dumps against PCSX2.
Ships in console-skill. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Every fix in a port ends the same way: build, run, read the log, decide. This skill makes that loop
fast and honest. run.py never leaves a game window running, never floods the context (it keeps
the first and last 2000 lines and prints only the last 5000 characters), and judges each run the
same way every time. triage.py turns a log into a ranked fix list with an owner per item, and
compare tells you whether a change fixed something, broke something, or just let the game get
further and meet the next blocker.
Honest scope: soak repeats the same boot with the same scripted input; it finds crashes that come
and go (threads, timing, IOP). It does not play the game for you. "It plays" still means a person
played it.
${CLAUDE_SKILL_DIR} below is this skill's folder (where this SKILL.md lives).
python3 "${CLAUDE_SKILL_DIR}/run.py" boot --runner out/build/ps2xRuntime/ps2EntryRunner \
--elf console/disc/SLUS_203.12 --seconds 15 # one run
python3 "${CLAUDE_SKILL_DIR}/run.py" boot --runner ... --elf ... --expect "title" --until-expect
python3 "${CLAUDE_SKILL_DIR}/run.py" boot --runner ... --elf ... --input console/inputs/menu.txt
python3 "${CLAUDE_SKILL_DIR}/run.py" soak --runner ... --elf ... --runs 20 --seconds 30
python3 "${CLAUDE_SKILL_DIR}/run.py" last # the latest result
python3 "${CLAUDE_SKILL_DIR}/triage.py" scan console/runs/latest.log --map console/functions.csv
python3 "${CLAUDE_SKILL_DIR}/triage.py" scan console/runs/latest.log --markdown # for STATE.md
python3 "${CLAUDE_SKILL_DIR}/triage.py" compare console/runs/<before>.log console/runs/latest.log
python3 "${CLAUDE_SKILL_DIR}/triage.py" lookup 0x00123456 --map console/functions.csv
python3 "${CLAUDE_SKILL_DIR}/abdiff.py" regs console/ab/pcsx2.json console/ab/port.txt --width 32
python3 "${CLAUDE_SKILL_DIR}/abdiff.py" mem console/ab/pcsx2.bin console/ab/port.bin --base 0x00100000
run.py flags: --expect REGEX (repeatable), --until-expect, --input FILE / --record FILE
(controller replay and recording, needs a pad from /console-controller gen --replay), --out
(default console/runs), --arg, --cwd, --keep 2000, --tail-chars 5000, --json.
Exit codes everywhere: 0 ok (PASS, no issues, dumps match), 1 something needs attention, 2 bad input.
| file | what |
|---|---|
console/STATE.md | the run command and build folder (read them, never reconstruct them); one result line per run goes back in |
console/runs/<UTC stamp>.log | stdout + stderr of one run; first and last 2000 lines when huge |
console/runs/latest.log, latest.json | the last run and its verdict: result, reason, exit code or signal, expects, counts, first fatal line |
console/runs/soak-<stamp>.json | a soak summary: totals, flaky or not, fatal lines by count |
| your Ghidra CSV | Name,Start,End,Size from ExportPS2Functions.java (End is exclusive), to name PCs |
console/ab/ | your A/B dumps (PCSX2 side and port side) |
| result | means |
|---|---|
| PASS | every --expect line appeared (or, with none given, it ran the whole timeout without a crash) |
| HANG | the timeout came first and an expected line never did. Read the last lines: what was it waiting for? |
| CRASH | a fatal line (Error during program execution: ..., [main] fatal exception, [terminate], a failed ELF load), a non-zero exit, a signal, or it stopped after jumping to a missing function. The runtime catches game-thread exceptions and still exits 0, so the log decides, not the exit code |
| FAIL | it exited by itself, cleanly, before the expected lines (window closed, game returned) |
The log lines triage knows, their source files and owners: reference/log-lines.md.
Full version, with the circuit breaker and the PCSX2 A/B workflow: reference/test-protocol.md.
console/STATE.md. Runner path, ELF path, build folder. Never
rebuild it from memory. If it is missing, ask once and record it.cmake --build <build dir>, nothing else). Never clean.run.py boot with 10 to 15 seconds for boot, 30 for menus. Add an --expect
for the milestone you are chasing (a log line the game or runtime prints there).triage.py scan console/runs/latest.log --map <csv>. Work the top item: the first
fatal, then missing functions, stubs, syscalls, IOP, file I/O. The owner column says which
/console-* skill fixes it.triage.py compare <before>.log console/runs/latest.log.
FIXED is progress. NEW right after the old blocker usually means the game got further.
NEW elsewhere means the change broke something: look before the next fix.console/STATE.md: date, what changed, the result, the log name.run.py command (with its --expect and
--input) in console/STATE.md under "Regression runs". After any runtime change, run them all.
A milestone that passed before and fails now is the first thing to fix.console/STATE.md, look the code up in Ghidra, and do the PCSX2 A/B comparison. Then ask the
user a specific question if it is still unclear.| phase | milestone | how to check |
|---|---|---|
| boot | ELF file loaded successfully (with runtime logs on) and no fatal line | --expect "ELF file loaded" |
| bootloader | IOP modules load, no missing functions in the first seconds | triage.py scan: no tier 0 to 2 items |
| first picture | the game draws (logos, a loading screen) | look at the window; soak for flakiness |
| title screen | a log line the game prints there, or the screen itself | --expect, then --input to press Start |
| menus | a scripted walk through the menus survives | --input console/inputs/menu.txt --seconds 60 |
| in game | a person plays a level start to finish | the user, with a controller; record a script of it for regressions |
When the log does not explain a crash or a wrong value, run the original in PCSX2 as ground truth.
With the optional PCSX2-MCP debug server: break at the same address, read the registers and the
memory you care about, save them as JSON or binary. On the port side, a temporary trace override
prints the same registers at that address (template in the protocol reference). abdiff.py regs
and abdiff.py mem print the first divergence: that is where to look. Without PCSX2-MCP, PCSX2's
own debugger can show the same values by hand.
runner/*.cpp.
Share your fixes, overrides and replay scripts, not dumps.runner/*.cpp or headers to make a test pass.The owner column decides: /console-reverse (missing functions: entry_points, re-export from
Ghidra, re-run the recompiler), /console-backend (stubs, syscalls, IOP, file and disc I/O),
/console-graphics (GS, VU, MPEG video), /console-sound (audio), /console-saves (memory card),
/console-controller (pad, replay scripts), /console-mod (overrides), /console-anywhere
(build options such as FFmpeg).
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
ps2, playtesting, crash-triage, regression-testing, game-porting
npx claudepluginhub jakeschincariol/console-skill --plugin console-skill11 skills in this plugin
/console-anywherePlay Anywhere. Builds the port for Windows, Mac, Linux, Steam Deck, Android and PS Vita and packages it without any game files inside. doctor checks this machine's tools for a target and prints the exact install command for anything missing; plan prints the build steps taken from PS2Recomp's own README, android/README.md and vita scripts; package makes a player folder in console/dist/ (the runner, its libraries, an empty game/ folder, PLAYERS.md, a launch script, .recomp.json) and refuses outright if a disc image, PS2 ELF, IRX module, recompiled runner source or other game data is inside; guard runs that check on any folder; recomp-json writes the project's optional .recomp.json. Use when the user says "put it on my Steam Deck", "build it for Android", "play it on my phone", "on my TV", "Vita build", "Mac build", "package it", "make a release folder", "is it safe to zip this", or after the port plays on the machine it was built on./console-backendBackend Engineer. Builds the engine room the recompiled game runs on: syscalls, kernel stubs, file and disc I/O, the IOP. Reads PS2Recomp runtime logs and turns every "Unimplemented PS2 stub", "[Syscall TODO]", missing function, unhandled IOP RPC, failed disc read and untranslated instruction into a ranked fix list: count, first PC and RA, and the exact fix tool (a TOML binding, the runtime .cpp file to implement it in, an entry point and a recompile, or a game override). With the user's PS2Recomp checkout it reads the real handler names and syscall numbers. Writes nothing into the checkout; prints a table for console/STATE.md. Use when the user says "unimplemented stub", "syscall TODO", "it crashes at boot", "fix the backend", "it can't find a file", "the IOP", "what is syscall 0x3C", or after /console-tester reports a stop./console-controllerController Mapper. Hooks the game up to any controller: DualSense, Xbox, Switch Pro, keyboard or touch, remapped how you like. Reads a mapping in console/controls.json (a layout preset plus per-button overrides, radial deadzone, invert Y, stick swap, analog trigger threshold, keyboard keys, two players, Android touch zones) and writes console/ps2_pad.cpp, a drop-in replacement for PS2Recomp's ps2xRuntime/src/lib/ps2_pad.cpp with the same class, signature and DualShock 2 report. Optional input replay and recording for scripted test runs. Backs up the stock file before installing and only touches the PS2Recomp checkout you name. Use when the user says "my controller doesn't work", "remap the buttons", "use my Xbox pad", "Switch Pro buttons are swapped", "invert the camera", "keyboard controls", "two players", "touch controls on Android", or when /console-tester needs scripted input./console-graphicsGraphics Artist. Rebuilds the graphics: dumps every texture, lets you repaint or replace them with your own art, finds the widescreen fix. Converts PS2 TIM2 textures (.tm2, 32/24/16-bit and 8/4-bit indexed) from the user's own extracted disc to PNG, rebuilds them from edited PNGs at the same size and format (GS registers kept, palettes refit or quantised), finds TIM2 blobs inside archives and puts edited ones back, and lists the 4:3 aspect and FOV constants in the ELF with 16:9 pnach lines to try in PCSX2. Reads the packets the game sends the GS from a RAM dump (DMA chains, VIF codes, GIF tags, every register write) and flags what breaks rendering. Writes to console/textures/ and console/patches/, never into the disc image. Use when the user says "dump the textures", "repaint", "replace this texture", "my own art", "HD textures", "make it widescreen", "16:9", "the picture is stretched", "black screen", "garbage textures", "nothing draws", or "how does the port draw"./console-levelsLevel Designer. Maps the disc's data files, unpacks the archives the levels live in, and swaps in your edits. Inventories an extracted PS2 disc (size, type by magic, entropy, a table-of-contents guess with a confidence score), unpacks CRI AFS archives and detected table-of-contents archives into a folder with an index.json, repacks them in the same order and alignment (keeping every offset when your edits fit), diffs two files or folders to show which bytes a change touched, lists strings, and reads the port's log to show which disc files a level loads. Writes under console/ and never modifies the original disc files. Use when the user says "where are the levels", "unpack this archive", "what's in DATA.BIN", "edit the level", "swap in my map", "what changed between these two files", "which files does stage 3 load", or before /console-graphics or /console-sound needs a file that sits inside an archive./console-modMod Maker. Describe any change in plain English and Claude builds it into the game: patches, cheats, new behaviour, as code that never touches the original files. Ports PCSX2 .pnach patches to the PS2Recomp port (code writes become ps2_recomp TOML instruction patches, data writes become a C++ game override that writes RDRAM at load or every frame, the rest are flagged for a manual port with the reason) and scaffolds game overrides that bind, replace or wrap a game function with the real PS2Recomp API. Writes to console/patches/, never to the game's files, the generated runner/*.cpp or headers. Use when the user says "mod this game", "add a cheat", "infinite health", "port this pnach", "make my gun do X", "change how X works", "game override", "turn this PCSX2 patch into the port", or once the port boots and they want to change it.Other plugins' skills for the same job