/gameframe:re-tracefrom gameframe
Traces game binary behavior from concrete entry points (strings, exports, imports, RTTI, constants) to find how original game code implements features. Designed for reverse-engineering before reimplementation.
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.
Tracing means following the program from something concrete to the code you need, and leaving a
written trail. Static reading only: label conclusions observed, inferred or unknown
(re-start). When the exact numbers matter, finish with re-emulate.
grep -rn "1400be770\|SaveGame" docs/ labels/ | head
For a DOS game, look for debug symbols first (tools/dos/tdinfo.py BINARY summary): with
them, the entry point is a name (tdinfo.py BINARY procs enemy), with its parameters, locals
and the source line of each address (tdinfo.py BINARY lines UNIT.PAS).
Work outward from something you can see. In rough order of usefulness:
"Saves/", "data/units.xml"), format strings ("%d citizens"),
UI text, error messages, debug and log text, script function names. decomp_query.py strings WORD lists them with the functions that use them. Developers leave log messages that name
the function they are in.?Serialize@Stream@IO@@...) names hundreds of functions for free: re-ghidra named.CreateFileW/ReadFile
(loading), QueryPerformanceCounter (timing), XInputGetState (input), send/recv
(network), D3D11CreateDevice (rendering). Find their callers..?AVClassName@@ strings; each points to a type
descriptor, which leads to the class's vtable and so to all its methods.readdata.py) or in a data file (re-format). Its readers lead to the rules. A value
that changes during play (gold, health) can be found in memory dumps with
tools/triage/memscan.py. The code that writes that address is the rule
(docs/observe/memory.md).tools/triage/constants.py BINARY names the random generators,
checksums, hashes and decompressors by their constants and gives each address.
tools/triage/tables.py BINARY finds sine and cosine tables. tools/triage/insns.py BINARY '^(in|out) ' '^int ' lists every port access and interrupt: the hardware layer.
tools/triage/hashnames.py BINARY finds the hash function behind names stored as numbers
and names each hash constant (docs/engines/engine-runtime.md).scripts/ghidra-run.sh BINARY callargs OUT FUNCTION...
lists every call to a function with its constant arguments: the sound ids, the file names,
the random ranges. A log of the original's system calls shows the same from outside
(docs/observe/system-calls.md).WinMain/main (or the entry point) find the per-frame update; the
systems hang off it in a fixed order, which you will need anyway (see docs/GAME-PATTERNS.md).Optimised code hides its source behind compiler forms: division by a constant becomes a
multiply and a shift, a switch becomes a jump table, small functions are copied into their
callers. docs/COMPILED-CODE.md lists these forms and how to find the game's own code past the
C runtime's start-up.
param_1 is (often this), the globals it reads (DAT_... pointers to
singletons), and the callees that touch the OS, threads, files or the GPU.labels/names.tsv for the function and its callees, a row
in labels/fields.tsv per field (Citizen 0x44 hunger f32 written by FUN_1400be770).Save/Load/Serialize function reads or writes every field in
order with its type: the cleanest field list you will get.decomp_query.py writers 0x44, then skip constructors and copies.decomp_query.py layout CTOR SERIALIZER USER:param_2 merges every
access to one pointer across functions into a table and a draft struct. The allocation size
(operator new(0x148)) gives the whole size. docs/TYPES.md has the shapes of lists, trees,
hash tables and the C++ containers. Send re-typer for many structures at once.tools/triage/hashnames.py BINARY finds the function and names the constants
(docs/engines/engine-runtime.md).array + i * 0x1f0 + 0x90): find getters that return sub-objects, subtract,
and continue inside the sub-object.*this = &vtable. List it (re-ghidra vtable);
slot offsets are what call sites use: (**(code **)(*obj + 0x18))(obj) calls slot +0x18.
Base classes share early slots; compare tables to find the hierarchy.Read every DAT_ constant and table the function uses with tools/pe/readdata.py, and record
each with its address. Never round or "tidy" them: 0.33333331 is not 1/3 in a 32-bit float
simulation.
re-land)A topic document in docs/ (extend one if it exists): an opening paragraph (what, which binary
and version, which evidence), then prose and tables keyed by address and offset: function →
role, fields, constants, the call order, and Open questions. Never paste pseudocode or
disassembly: describe it. Update docs/CHECKLIST.md.
re-ghidra section 5). For arithmetic, read the
instructions; for exact values, emulate.scripts/ghidra-run.sh BINARY decompile OUT 0xADDRESS.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub tanepiper/game-frame --plugin gameframe16 skills in this plugin
/re-browseBuild and grow a resource viewer for a game - first the catalogue (tools/formats/catalog.py, a static HTML page and JSON manifest of every file, its kind, entropy, hex and what the Python decoders make of it, with pictures), then the project's own viewer app on the port's readers (pictures, palettes, sound, 3D models, text, hex; native and browser; a file output mode for agents). Use at the start of a project, right after the inventory, and after every new decoder, so the person and the agent can check decoded content by looking at it./re-cleanroomRun a source-visible specification and source-blind implementation workflow when a project wants independent reimplementation from a neutral behavior contract./re-emulateOther plugins' skills for the same job