Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

reverse-engineering · rehan-remade — Claude Code skill: what it does, how to install

Lets the agent read a game from the inside: decompiled code, dumped asset formats, live memory. Useful when a mod needs an exact function address or the layout of a file.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add rehan-remade/universal-modder --skill reverse-engineering -a claude-code
Open on GitHub

What reverse-engineering does

The skill makes the agent read the actual build: decompile the code, dump the asset formats, watch live memory, grab a GPU frame. It picks the tool per runtime, and um scan tells it which runtime it is facing. .NET and Unity Mono go through ilspycmd; IL2CPP through Cpp2IL or Il2CppDumper on GameAssembly.dll plus global-metadata.dat; Java through Vineflower; native code through Ghidra or IDA driven over MCP. Cheat Engine, Frida and x64dbg cover live memory, RenderDoc covers draw calls and render targets.

What it learns lands in MODLOG.md: names, IDs, offsets, formats. Decompiled output and extracted assets stay outside the mod repo, in a path like ~/<game>-decomp/, and never get published. For an undocumented format the order is fixed. Collect stock files, hex-dump the headers, parse every one without errors, then prove a writer with a round trip before it touches new files.

The hard stop is anti-cheat: no debugger and no scanner gets attached to a game that runs it. Single-player, offline or servers you run yourself. One more thing shapes the workflow. An agent can confidently mislabel a function, so a guess has to survive a dynamic check before a patch is built on it. Skipping that step is how a mod ends up hooking the wrong address.

What it helps with

  • decompile Assembly-CSharp.dll and locate the damage function
  • dump IL2CPP types out of GameAssembly.dll
  • work out an undocumented .pak format and prove the reader with a round trip
  • find the player position address in live memory
  • pick apart a RenderDoc frame to see where geometry gets injected

Example prompts for the agent

  • Decompile `Assembly-CSharp.dll` with `ilspycmd` and find where boss damage is calculated. Put the offsets into `MODLOG.md`.
  • Nobody documented the `.pak` format. Compare headers across a few stock files, write a reader, then prove it with a round trip.
  • Capture a frame in RenderDoc and show me which draw call renders the HUD.

How to install reverse-engineering

1Skills CLI (Vercel)

npx skills add rehan-remade/universal-modder --skill reverse-engineering -a claude-code

2Manually: put the files in place

~/.claude/skills/reverse-engineering/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/reverse-engineering/

From the same set7

The whole set →

Other versions of reverse-engineering

Similar

create-game-assets gamedev-skills A skill that carries a game's art from style brief and asset manifest to alpha checks and contact sheets. Handy once sprites start drifting out of style. Claude Code CX Codex Cursor +1 6,400installs router gamedev-skills Dispatches game development tasks to specialized skills by detecting the project engine and classifying gameplay or shipping workflows. Claude Code CX Codex Cursor +1 6,400installs godot-ui-control gamedev-skills A Claude Code skill that teaches the agent to lay out Godot 4.7 HUDs and menus with Control nodes: anchors, containers, themes and focus. Claude Code CX Codex Cursor +1 6,400installs godot-nodes-scenes gamedev-skills Teaches the agent to build a Godot 4.7 project from nodes and scenes: reusable .tscn files, runtime instancing, autoload singletons, and node lookups that survive renames. Claude Code CX Codex Cursor +1 6,200installs godot-gdscript gamedev-skills Guides coding assistants in writing statically typed GDScript 2.0 for Godot 4.7 and porting legacy scripts from Godot 3.x. Helpful when structuring node lifecycles and signals. Claude Code CX Codex Cursor +1 6,200installs godot-physics gamedev-skills Configures Godot 4.7 2D and 3D physics bodies, collision layers, Area triggers, and raycasts. It prevents jitter and collision mask misconfigurations. Claude Code CX Codex Cursor +1 6,100installs orbit-card heygen-com Adds a 10-second 1920×1080 HyperFrames motion block where a single feature card orbits a dot sphere using exported Blender camera paths. Claude Code CX Codex Cursor +1 9,800installs sdf earthtojake This skill authors and validates SDFormat files for models and worlds, then helps prepare them for simulator handoff. Claude Code CX Codex Cursor +1 10,500installs

Questions about reverse-engineering

How do I install reverse-engineering in Claude Code?

Run npx skills add rehan-remade/universal-modder --skill reverse-engineering -a claude-code. The skill file lands at ~/.claude/skills/reverse-engineering/SKILL.md.

What does reverse-engineering do?

It teaches the agent to read a shipped game: decompile code for the runtime in front of it, decode file formats, inspect live memory and GPU frames. Mod work then rests on verified facts instead of a guess.

Does it work on games with anti-cheat?

No. The skill forbids attaching debuggers or scanners to games that run anti-cheat. It is meant for single-player, offline games and servers the user runs themselves.

Source text

SKILL.md · MIT
---
name: reverse-engineering
description: Read how a game actually works so a mod can hook it. Decompile .NET/Mono (ILSpy), IL2CPP (Cpp2IL, Il2CppDumper), Java (Vineflower) and native code (Ghidra, IDA, via MCP servers); dump data and asset formats; reverse-engineer a binary file format and prove it with a round trip; read live memory (Cheat Engine, Frida, x64dbg); find render passes (RenderDoc). Use when a mod needs game internals, e.g. "how does the boss AI work", "find the damage function", "what format is this .sld/.pak/.dat", "where is the player position in memory".
---

# Reverse engineering for mods

Rule zero: **read the real thing, don't guess.** Decompiled code, the actual data, a live memory view or a
GPU capture is the spec. Write what you learn into `MODLOG.md` (names, IDs, offsets, formats) as you go.

Keep all decompiled output and extracted assets **outside** the mod repo (e.g. `~/<game>-decomp/`) and never
publish them. Single-player, offline or servers the user runs. Never attach debuggers or scanners to games
with anti-cheat (see `skills/mod-any-game/references/safety.md`).

## Pick the tool by what the code is (`um scan` tells you)

**Managed .NET** (XNA/FNA, Unity Mono, most indie C#)
- `dotnet tool install -g ilspycmd`, then `ilspycmd -p -o ~/<game>-decomp <Game>.exe` (or
  `Assembly-CSharp.dll`). This gives a full C# project you can grep.
- dnSpyEx: step through with a debugger, set breakpoints, edit methods.
- MCP: ILSpy-MCP / dnspy-mcp let an agent query types and methods directly.

**Unity IL2CPP**
- Cpp2IL (or Il2CppDumper) on `GameAssembly.dll` + `global-metadata.dat` gives types, fields, method
  signatures and addresses, plus dummy DLLs for ILSpy.
- Method bodies are native: load `GameAssembly.dll` in Ghidra/IDA and apply the generated script to name
  functions.
- Live: UnityExplorer, or `il2cpp-frida-mcp`.

**Java** (Minecraft, Slay the Spire...)
Vineflower / CFR / Recaf. For Minecraft, use Loom `genSources` with Mojang mappings.

**Native C/C++** (custom engines, Unreal game code, console recomps)
- Ghidra (free) or IDA, driven through MCP so the agent can decompile, rename, retype and follow
  cross-references:
  - Ghidra: GhidraMCP (LaurieWired), pyghidra-mcp (headless, with a run-script tool; code-capable tools beat
    hundreds of tiny ones), ReVa.
  - IDA: the official Hex-Rays IDA MCP (IDA 9.4+ Pro/Home; "code mode" runs IDAPython), or ida-pro-mcp.
  - Binary Ninja and radare2 have MCP servers too.
- Workflow:
  1. Strings, then cross-references, then the function.
  2. Name and type everything you understand. Renames accumulate into a readable program.
  3. Confirm dynamically (below) before building on a guess. Agents can confidently misidentify things.
- Unreal: dump the reflection data first (UE4SS dumper or Dumper-7); it names most gameplay classes and
  properties for free.

**Dynamic / live**
- Cheat Engine: value scans → "find out what writes to this address" → struct → owner. CheatEngine MCP
  servers exist.
- x64dbg: breakpoints and tracing (x64dbg-mcp; bind it to 127.0.0.1, since some default to 0.0.0.0).
- Frida (frida-mcp, frida-game-hacking-mcp): hook functions from JavaScript, log arguments.
- ReClass.NET rebuilds structs from live memory.

**Graphics**
- RenderDoc (renderdoc-mcp) captures a frame and shows every draw, the render targets, the constant buffers
  (view/projection matrices) and the depth buffer.
- That's how you find where to inject geometry or effects (mashup-mods), and which texture holds a sprite
  atlas.

## Data files and asset formats
Use the community tool first:
- Unity: UABEA, AssetRipper
- Unreal: FModel, UAssetGUI
  - **Fully compressed UE3 `.upk`** (UELib shows `Exports=0`): unpack a copy with Gildor's `decompress`
    (from UE Viewer), or, for LZO packages, with
    [`unpack_upk.py`](references/ue3-packages/README.md).
- Bethesda: xEdit, BSArch
- GameMaker: UndertaleModTool
- Genie: genieutils
- Source: VRF, Crowbar
- FromSoft: WitchyBND, Smithbox
- Godot: GDRE Tools

Before reversing a format yourself, search the community archives. Most game formats from the 2000s and
2010s were worked out there:
- **XeNTaX** (closed in 2023): the [forum](https://archive.org/details/forum.xentax.com_2023-08-15),
  [wiki](https://archive.org/details/wiki-wikixentaxcom_202305) and
  [attachments](https://archive.org/details/Xentax-forum-attachments-archive) are on archive.org, with a
  [public backup on GitHub](https://github.com/XeNTaXBackup/XeNTaXBackup.github.io);
- **[ZenHAX](https://zenhax.com/index.php.html)**: game file research and QuickBMS scripts (posts up to
  early 2023);
- **[The definitive guide to exploring file formats](https://archive.org/details/definitive-guide-to-exploring-file-formats)**
  (Mr. Mouse, XeNTaX): the classic tutorial on reading an unknown format.

Use them for format knowledge and tools, whatever its origin (betas, leaked SDKs). Don't download game files,
leaked code, SDKs or license keys from them.

For an **undocumented format**:
1. Collect several stock files. Compare sizes, and hex-dump the headers (`xxd | head`). Look for magic
   numbers, counts, offsets and tables of fixed-size records.
2. Form a hypothesis for the header, then the frame/record layout, then the compression. Check it by
   parsing every stock file without errors.
3. Write a reader that decodes to something viewable (PNGs, JSON) and **look at it**.
4. Write the writer, and **prove it with a round trip**: decode → encode → decode, compared against the
   original. The AoE2 SLD sprite writer was accepted only when it round-tripped the stock knight at
   0.9/255 mean error (`examples/aoe2-de-civ/sld.py`).
5. Only then write new files. Test them in game with one asset before batch-converting.

## Make it an oracle
- **Engine logic you port** (for a simulator, a trainer, a reimplementation): record real traces from the
  game (positions, velocities per tick) and replay them against your port. In the Terraria Eye of Cthulhu
  work, the Eye's velocity matched 99.9% once the port used the action applied on frame t+1. Float32
  constants mattered too (`0.2f` ≠ `0.2`). A leftover mismatch was traced to a hidden buff (Happy!, x1.21
  move speed). Replays find what reading the code misses.
- **For long RE runs:**
  - a journal file;
  - small verified steps;
  - cap attempts per problem (about 3 identical failures, then change approach);
  - commit every confirmed fact.

© rehan-remade · MIT · rehan-remade/universal-modder

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor