/console-skill:console-levels scan|unpack|repack|diff|strings|files <path> [flags]from console-skill
Maps PS2 disc data files, unpacks CRI AFS and table-of-contents archives, repacks them preserving offsets, diffs files/folders, lists strings, and reads port logs to show which disc files a level loads. Use when editing game levels or unpacking archives.
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.
The Level Designer maps a game's data and gives you a way in. A PS2 disc is a folder of files: the ELF,
IRX modules, and data, usually a few huge archives that hold every level, model, texture and sound.
datascan.py tells you what each file is, finds the table of contents inside an archive, splits it
into files you can edit, and puts it back together so the game still reads it. Then the port loads
your edited archive straight from the extracted disc folder, with no ISO to rebuild.
Be honest with the user: every game's level format is its own. This tool gives the map and the knife (what the files are, how the archives split, which bytes changed). Working out what the bytes inside a level mean is per game: diff two levels, diff before and after an in-game change, and read the loader in Ghidra. Compressed or encrypted archives (high entropy everywhere, no table found) need the game's own decompressor found in its code first.
${CLAUDE_SKILL_DIR} below is this skill's folder (where this SKILL.md lives).
python3 "${CLAUDE_SKILL_DIR}/datascan.py" scan console/disc/ --sort size --embedded # map the disc
python3 "${CLAUDE_SKILL_DIR}/datascan.py" files console/runs/<newest>.log # files the port looked up
python3 "${CLAUDE_SKILL_DIR}/datascan.py" unpack console/disc/DATA/STAGE.AFS --out console/levels/STAGE
python3 "${CLAUDE_SKILL_DIR}/datascan.py" diff console/levels/STAGE/files/0003_ST01.DAT console/levels/STAGE/files/0004_ST02.DAT --as f32
python3 "${CLAUDE_SKILL_DIR}/datascan.py" strings console/disc/SLUS_203.12 --grep .afs
python3 "${CLAUDE_SKILL_DIR}/datascan.py" repack console/levels/STAGE --out console/levels/STAGE.AFS
Other flags: --json everywhere; scan --min-size N; unpack --format afs|toc --layout KIND --header N --force-toc; repack --layout auto|keep|pack --force; diff --gap N --max N; strings -n N --encoding ascii|sjis|utf16le|all --max N. Exit codes: 0 ok, 1 needs attention (no table found, an
entry outgrew its slot, a missing disc file; for diff, the inputs differ), 2 bad input.
| path | what |
|---|---|
| the extracted disc folder | read only: scan, unpack, strings, diff never change it |
a runtime log (console/runs/*.log) | files reads the [sceCdSearchFile:ok] and sceCdSearchFile failed: lines |
console/levels/<NAME>/files/ | the unpacked entries, numbered in archive order (0003_ST01.DAT) |
console/levels/<NAME>/index.json | format, table layout, alignment, offsets, slot sizes, hashes: everything repack needs |
console/levels/<NAME>/_header.bin, _extra_*.bin | the archive's header bytes and any bytes outside the entries, kept so a repack is exact |
--out of repack | the rebuilt archive (refuses to overwrite an existing file without --force) |
Formats, the table detector, AFS details and the index.json schema: reference/formats.md. Finding what level bytes mean (diffing, Ghidra, PCSX2): reference/level-workflow.md.
scan <extracted disc> --sort size --embedded. Note the biggest files, their kind
and entropy, and any table of contents found (AFS, N entries or count+pairs n=.. (0.9)). Below
7.5 bits per byte with a table found: an archive you can split. Above 7.5 everywhere: compressed or
encrypted; find the decompressor in the ELF before going further.run.py boot), then
files console/runs/<newest>.log lists the disc files it looked up, in order. The files looked up
right when the level starts are the level's. strings <ELF> --grep .bin (or .afs, stage, map)
finds file names the code uses. In PCSX2 you can watch the same thing in its log.unpack <archive> --out console/levels/<NAME>. AFS is parsed exactly. Other archives
use the best table-of-contents guess at confidence 0.6 or more; below that it refuses and says why.
If you know the layout from Ghidra, force it with --layout and --header.diff two levels, or the same level before and after a small change you
make, with --as f32 to see coordinates and --as u16|u32 for counts and ids. Read the loader in
Ghidra: find the file name string, follow its cross-reference to the code that parses the buffer.
Write what you learn into console/design.md (the game's design doc from /console-reverse).console/levels/<NAME>/files/ (same names). Keep sizes when you
can.repack console/levels/<NAME> --out console/levels/<NAME>.AFS. With the default
--layout auto, entries that still fit stay at their exact offsets (the safest result: nothing else
moves). If one outgrew its slot, offsets are recomputed with the original alignment and the table is
rewritten; it says so. Use --layout keep when the game hard-codes offsets in its code (it then
refuses rather than move anything). Every repack reads itself back to verify.STAGE.AFS.orig, or keep it in
console/), copy the repacked one over it in the extracted disc folder. The port reads cdrom0:\
from the ELF's folder (cdRoot) and looks files up by name with their real size, so no ISO rebuild.console/STATE.md.dd
from a DVD drive on macOS or Linux). Never download ISOs, ELFs or BIOS files, never help find them,
never ask for them.datascan.py never writes into the disc folder; you copy the
repacked file in yourself, after keeping the original.tim2.py works on unpacked entries).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
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-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./console-physicsPhysics Tuner. Finds the numbers that decide how the game moves (speed, gravity, grip, jump height, frame rate) and tunes them. Scans the user's own game ELF for a float32 value stored in data or built in code (lui, ori or addiu, then mtc1), shows the instructions that read it, lists frame-timing candidates, and prints the exact pnach lines to test a new value in PCSX2 plus the PS2Recomp fix (TOML instruction patches or the data write /console-mod bakes in). Reads only; writes nothing. Use when the user says "make the car faster", "lower the gravity", "jump higher", "more grip", "change the damage", "wider camera", "unlock 60 fps", "find the speed value", or when /console-mod needs a number found.Other plugins' skills for the same job