/gameframe:re-browsefrom gameframe
Builds and grows a resource viewer for a game: generates a static HTML catalogue with file metadata, entropy, hex, and decoder output, then extends a viewer app for pictures, palettes, sound, 3D models, and text.
Ships in gameframe. 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.
None: SKILL.md is the whole skill.
A resource viewer opens the player's copy of the game and shows every file: what it is, what
the decoders make of it, and what is not understood yet. Build it on the first day and grow it
with every format. The guide is docs/working/viewer.md. This skill gives the steps.
Run it after re-inventory, before any decoder exists. It lists every file with its kind (from
its first bytes), its size, its entropy and a hex view.
python3 tools/formats/catalog.py game derived/catalog
open derived/catalog/index.html # for the person
cat derived/catalog/catalog.json # for the agent: one entry per file, and the summary
derived/ is ignored by git. The catalogue holds game material: never commit it.
As decoders are written (re-format), pass each one with the files it reads. The decoder is the
same decode(reader) module validate.py runs:
python3 tools/formats/catalog.py game derived/catalog \
--decoder '*.dat=decoders/units.py' \
--decoder 'graphics/*.pic=decoders/picture.py' \
--palette game/GAME.PAL --palette-offset 0
To see pictures, add images(result) to the decoder. It returns a list of
(label, width, height, pixels), with one palette index per byte, row by row. For true colour,
add a fifth item 'rgb' and give three bytes per pixel.
def images(result):
return [(f'sprite {i}', s['w'], s['h'], s['pixels']) for i, s in enumerate(result['sprites'])]
The summary line is the project's format coverage, for example "12 of 47 files decode
completely (31% of 2,345,678 bytes); 1 fails; 34 have no decoder". Copy it into
docs/CHECKLIST.md whenever it changes. The exit status is 1 when a decoder fails on a file.
Open each new decoder's pictures and tables in the catalogue before you port it.
re-observe), and label it assumed.Ask the person to check what only a player knows: which icon is which, whether a face, a ship or a map looks the way it does in the game. Record what they confirm as observed with the file and entry number.
When the port has its first reader, build the viewer as an app in the port's language. A
Rust port on wgpu and winit can use egui (egui, egui-wgpu, egui-winit of the same
version as its wgpu; enable egui's default_fonts feature, or no text is drawn).
Lay it out like this:
| Part | Where | Rule |
|---|---|---|
| Readers | the port's format crate or module | The viewer has no decoder of its own |
| Host services | one shared crate: window set-up, audio output, loading the player's files, browser glue | The game and the viewer both use it. Move code there from the game; do not copy it |
| The viewer | apps/viewer (or the port's equivalent) | A file list by kind, one view per kind of file, a hex view for everything |
Give it these views, as the game's files need them:
Each view names the original routine that reads the format and marks inferred and assumed
choices. Mark the viewer's own presentation choices (a camera, flat shading, a song played on a
different synthesiser) with Deviation: comments.
game-data/original or game/).127.0.0.1 only (the port's dev-server script with an
--app viewer choice). Never bundle or upload the files.viewer --export DIR opens no window and
writes every view to files. Write one PNG per picture, palette and font (NAME.png), one
frame of each model or level from a fixed camera (NAME.3d.png), and a manifest.json with
every file's kind, its reader, whether every byte was consumed and the coverage line. Print
the coverage line too. An agent reads the manifest and looks at the pictures to check a
decoder, compares them with captures of the original (re-verify, tools/verify/), and
takes the diary's figures from them (re-site). The export holds the game's material:
write it into derived/ only.cargo run --release -p GAME-viewer -- --export derived/viewer # no window
jq '.coverage' derived/viewer/manifest.json
When modding is a goal, the viewer becomes the editor, after its readers are proved and before the game itself. Build it in this order (Writers, editors and mods):
Edit enum: move this vertex, set this
texture, change this price. The window and a command-line mode both make those values, so an
agent, a test or a script can do anything a person can
(one edit type).tools/formats/derived.py.The tests that make it trustworthy: a save with no edits equals the original file on every
file of the kind (validate.py --write); each edit kind saves, reads back and finds exactly its
change; an edit and its undo give the original bytes; one edit of each kind loads in the
original game and shows there.
Write each format into the project's docs/FORMATS.md (or one document per format) with its
evidence, add a README section on running the viewer, and update docs/CHECKLIST.md with the
coverage line (re-land).
default_fonts feature is off.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub tanepiper/game-frame --plugin gameframe16 skills in this plugin
/re-cleanroomRun a source-visible specification and source-blind implementation workflow when a project wants independent reimplementation from a neutral behavior contract./re-emulateRun individual functions from a game's Windows x64 binaries (tools/emu/pe_emu.py), 32-bit x86 Windows binaries (tools/emu/pe32_emu.py) or 16-bit DOS/NE programs (tools/emu/dos_emu/) under the Unicorn emulator to capture exact ground truth for chosen inputs, and record the calls they make (random draws) with call_trace.py. Use for anything a reimplementation must match bit for bit - random number generators, maths, procedural generation, simulation steps, pathfinding, parsers - instead of trusting the pseudocode./re-formatDecode a game's data files - package/archive containers, compressed entries, resource and asset formats, save games - by finding the code that reads them, prototyping a decoder with tools/formats/reader.py, proving it against every file of its type with validate.py (all bytes consumed), then porting it. Use when a file type is not yet understood or a decoder fails on some files./re-ghidraDecompile a game's binaries with Ghidra in headless mode and work with the result as text - the full export (decomp.c, functions, strings, imports, exports), queries with decomp_query.py, one-off decompiles of functions Ghidra missed, vtable and reference listings, constants read from the binary, and checks against the disassembly. Use whenever you need pseudocode for a native binary, including 16-bit DOS (MZ) and NE programs./re-inventoryFirst look at a game's files (Windows PE, or DOS MZ/NE/LE executables) - which binaries hold the game's own code, which engine and middleware it uses, whether it is native, managed, scripted or packed, which data containers and save files exist - and record it in docs/FINDINGS.md; then read the manual and the program's long strings into docs/lore.md, which says what each system is for. Use at the start of a project, or when a new binary or file type turns up./re-landFinish a reverse-engineering slice by documenting evidence, updating labels and the checklist, then committing only your own files, merging completed work into local main, and pushing. Never leave completed, merge-ready work uncommitted or waiting to merge.Other plugins' skills for the same job