/rea-games:rea-gamesfrom rea-games
Reverse-engineers a game's behavior and rebuilds it in another engine (web, Godot, Bevy, Unity) with frame-by-frame verification. Records inputs/state, writes a GAME.md spec, builds the port, and validates it matches the original.
Ships in rea-games. 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.
You rebuild a game from what it does, and prove it. The loop is: record the original, write the spec, build the
port, verify, fix, repeat. Never call a port done until rea-games verify says every case is identical.
games/*/game.json for the games that ship). If the licence is unclear, say so and
ask before going on. Never use a trademarked name for the rebuild.
Vendor the original unmodified under originals/<game> with its licence file, and add a line to NOTICE.node -v (22+), and for a browser game Playwright and a Chromium (PLAYWRIGHT_PATH
points at an install outside the repository; drivers load it with loadPlaywright() from lib/playwright.mjs).rea-games new <game> makes games/<game>/ with game.json, record.mjs, GAME.md and a port stub.requestAnimationFrame with a fake you step by hand (dt per step is an input).Math.random with a seeded generator and save every value it returns in the case as tape. The
port reads those numbers back in the same order. If the original draws random numbers for things that do not
change play (clouds, particles), give those a separate stream and say so in GAME.md.rea-games record <game>): each case is {tape, inputs, trace}. A trace entry is the state
after one input or frame. Read it from the live game, or, when the state is private, from what it draws.
Cover: every kind of enemy/obstacle/item, win, lose, restart, the edges (empty, full, maximum speed), odd frame
times, and at least one saved state that is one step from each ending. Look at what the cases really contain.GAME.md from the recording, following the format in docs/game-md.md: constants, the order of operations inside one step, formulas, quirks
(including bugs the original has: keep them, the port must match), and what is not modelled and why that
cannot change the trace.rng. A runner reads a case on stdin and prints
{trace, tapeUsed}. Do not translate the original line by line; write from GAME.md, then check.rea-games verify <game> --port <name>. The first difference is printed with its path
(trace[412].tRex.yPos: 46 != 45.5). Fix the port, not the case. Use the number, not a guess.verify fail
each time with a trace difference, not a crash. A check that cannot fail proves nothing. Put the numbers in the PR.games/2048/ports/unity: plain C# rules shared by the scene and a dotnet runner. An engine port counts as verified
only when it runs the cases through a runner; otherwise label it "not verified".ports in game.json: cmd (the runner, run from games/<game>),
optional build (run once before the cases), and play for the web page that node scripts/bundle.mjs turns
into docs/play/<game>.html. Then run rea-games pack <game>: the repository keeps cases gzipped, and a
successful record removes the old packed copies. See CONTRIBUTING.md for the rest of the PR checklist.GAME.md says why and how much.NOTICE.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub erkamyaman/rea-games --plugin rea-gamesOther plugins' skills for the same job