Skip to content

Agent skills ​

An archive of index-card drawers; small brass helpers file cards in an open drawer

Most ENCORE ports were written with coding agents. These skills carry what those sessions learned — the procedures that worked, the rules that kept ports faithful, and the traps that cost days — to whoever starts the next one. They are plain Markdown in the open Agent Skills format: a folder per skill with a SKILL.md (a name, a description saying when to use it, and the procedure), plus reference files and templates. Any agent that supports skills can load them; any agent that does not can still be pointed at them from its AGENTS.md.

Start with encore-new-reimplementation: it walks through bootstrapping a project and hands over to the others as the work moves on.

encore-new-reimplementation

Bootstrap a new faithful 1:1 reimplementation of an old PC game targeting the gasm WebAssembly runtime, end to end - choose the approach (port from disassembly, script runtime, source port), pin the exact executable by size and CRC-32, lay out the repository, write AGENTS.md from the bundled template, add fetch-gasm-sdk.sh with a single version pin, the CMake native/gasm platform switch, CI, and reach the first milestone. Use when starting a new ENCORE-style project or when an existing one lacks this scaffolding. This is the entry skill; it routes to encore-reverse-engineering, encore-file-formats, encore-port-function, encore-verification, encore-x87-fidelity, encore-gasm-backend, encore-netcode, encore-modern-additions, encore-data-hygiene and encore-ship-release.

encore-data-hygiene

Legal and data rules for ENCORE game reimplementations - never commit the game's assets, code or anything derived from them; read tables, strings and constants from the user's own executable at run time behind a size and CRC-32 check; keep decompiler output out of the repository; decide the screenshot policy; accept every form of the user's data (disc image, raw BIN, folder, installed copy, installer archives); and use correct wording ("bring your own copy", no freeware claims). Use when setting up .gitignore, adding an exe table reader, reviewing a commit for leaked data, writing user-facing docs about game data, or adding a new data source.

encore-file-formats

Decodes an old game's data files and installation media for an ENCORE-style faithful reimplementation - documents each format from the executable's own reader, writes a decoder and native test that print a --summary hash over every file on the disc (asserted via an environment variable) and cross-checks it against an independent reader, reads the shipped media in place (ISO 9660, raw MODE1/2352 BIN, InstallShield cabinets including split files, Installer VISE) through a case-insensitive VFS, and writes codecs (Smacker, Bink 1 with tables from the user's binkw32.dll, Cinepak, MS-ADPCM) from public descriptions. Use when adding support for a new file type, codec, archive, installer or disc layout, or when a decoder disagrees with the original or between folder and image.

encore-gasm-backend

Builds the gasm WebAssembly backend for a C/C++ reimplementation of an old PC game - fetch script pinning GASM_VERSION and wasi-sdk 34 (wasm32-wasip1), a CMake native|gasm switch with gasm_add_game, 1 MiB stack, the platform.h contract with platform_gasm.c as the only includer of gasm.h, the frame model (state machines per gasm_frame, or gasm_main + gasm_wait_frame via Asyncify/stack switching, or init/frame/exit split), assets via --asset-dir/--asset cd=image with case-insensitive lookup and 64-bit positioned reads, storage namespaces, catch-up frames, capability probing with gasm.has, a native build for tools and sanitizers, and version-pin bumps. Use when scaffolding a new port's runtime layer, converting a blocking Win32 main loop, wiring data loading or saves, debugging traps, or upgrading the gasm pin.

encore-modern-additions

Adds opt-in modern features to a faithful reimplementation of an old PC game on gasm without changing the original - widescreen (report a 4:3 screen at the mode's height and widen only the 3D view, or true Hor+ with appended modes), higher internal resolution as a display-only second pass, art upscaling and PNG skins, cast shadows and colour grades, and saves portable between browser and desktop - each behind a parameter or appended option with the original as default, and proven harmless with golden hashes off and state/audio hashes on. Use when asked for widescreen, hi-res, HD art, filters, shadows, or save export/import, or when reviewing whether an addition leaks into gameplay.

encore-netcode

Ports an old PC game's multiplayer onto gasm, whose only network primitive is outbound WebSocket (gasm:net) plus gasm-relay rooms. Covers choosing a route (stub as "no service provider", DirectPlay emulated over a relay room, WinSock emulated beneath the original stack with the room as a LAN segment, or a new transport plus a server rewrite verified against compiled original functions), reproducing transport event semantics (one event per poll, admission delay, drain order), struct layouts generated by compiling original headers, golden data and packet-log replay tests, float/RNG rules across languages, security deviations, testing with --realtime, and deploying gasm-relay or a rewritten server. Use when a port reaches its network code, when designing a dedicated or lobby server replacement, or when testing or deploying online play.

encore-port-function

Ports one function (or one small module) of an original game executable to portable C11 for an ENCORE-style faithful reimplementation on gasm - names it in names.tsv, reads decompile and disassembly, rewrites it in the same structure and arithmetic with a /* Name 0xADDR */ citation, keeps quirks and bugs, maps structs to their original offsets with size asserts, turns C++ classes into structs with explicit vtables, routes unported callees through PENDING_NOTE, handles MSVC static initialisers and CRT behaviour (rand, qsort, ftol), converts blocking loops to frame steps or gasm_wait_frame, and verifies with tests on real data and unchanged headless hashes. Use whenever porting, re-porting or fixing a function from disassembly, or when a port diverges from the original.

encore-reverse-engineering

Sets up and runs the reverse-engineering loop for a faithful reimplementation of an old Windows game - pins the target binary by size and CRC-32, imports it into Ghidra driven headlessly from the shell (ghidra-cli), creates the functions auto-analysis misses, keeps names in a version-controlled names.tsv with confidence levels, regenerates greppable full decompile dumps, inventories the executable by address range, borrows names from a symbol-bearing build, flags where the decompiler cannot be trusted, and reads tables from the user's executable at run time. Use when starting RE on a new game, when naming or understanding a function before porting it, when the decompiler output looks wrong or suspicious, or when a table or constant from the exe is needed in the port.

encore-ship-release

Ship an ENCORE game reimplementation built on gasm - the static browser player in docs/public/play (Worker mode, transferred canvas, AudioWorklet, fixed-timestep catch-up cap, folder/disc-image picking with validation, OPFS import with a completion marker, saves zip export), vendoring the pinned gasm-host and csfs npm packages, copy-wasm.sh, the release workflow on plain semver tags producing the wasm plus macOS/Linux/Windows gasm bundles with .sha256 files and per-OS smoke tests, launchers that remember the data path, ANGLE and ad-hoc signing, and the VitePress docs site on GitHub Pages with badge and wording rules. Use when adding or fixing the play page, packaging bundles, cutting a release, or setting up the project site.

encore-theory-of-operation

Writes the theory-of-operation document for an ENCORE-style game reimplementation - an educational account, in prose with diagrams, of how the original game was designed and how it works as a program and as a game (program shape, time and determinism, data, world, gameplay systems such as physics, damage, AI and mission scripting, saving, presentation, and lessons for building such a game), drawn from the project's reverse-engineering and format notes, with no decompiler text, no game data and no addresses in the main text. Use when a port is complete or plays through, when setting up a new project's port plan (to add it as the final step), or when asked to explain how a ported game works.

encore-verification

Sets up and runs the verification ladder for a faithful 1:1 reimplementation of an old PC game on the gasm WebAssembly runtime - virtual clock at the original tick rate, golden video/audio FNV hash lines compared across gasm-run, the Node runner and the browser, folder-vs-disc-image checks, explained re-baselines, Python reference decoders, Unicorn differential tests of the original's machine code, reference-renderer pixel diffs, scripted whole-game regression, ASan/UBSan native builds, tests that skip without game data, and greppable not-ported coverage. Use when adding or changing ported code, when a hash moves, when bootstrapping test infrastructure for a new port, or before claiming a change works.

encore-x87-fidelity

Ports x87/MSVC floating-point and CRT behaviour bit-exactly into C compiled for WebAssembly (wasm32 via wasi-sdk) - identifying FPU precision and rounding mode per phase (53-bit CRT default, 24-bit under Direct3D 7, RC changed by the game), double-evaluate/float-store, wide-exponent single precision, exact rounding-mode emulation, -ffp-contract=off, x87 stack order, NaN compare semantics, __ftol truncation, float constants read by address, single-precision runtime asin/acos, libm differences, MSVC rand/qsort, 16.16 fixed point, and modelling uninitialised or out-of-bounds reads. Use when porting any function with float maths, FP compares, float-to-int conversion, random numbers or sorting from a 1990s/2000s Windows game, or when a differential test shows ULP-level or NaN divergence.

Installing them ​

Clone the repository and copy the skills into the directory your agent reads skills from:

sh
git clone https://github.com/emdzej/encore
cp -R encore/skills/encore-* <your-project>/.agents/skills/

The skills README lists the directories common agents use (project-level and per-user), and how to reference the skills from an AGENTS.md for agents that do not load skills by themselves.

How they relate to the guides ​

The guides are the long form, written for people: why things are done a certain way, with the evidence. The skills are the short form, written for agents: what to do, in which order, and how to check it. Each skill links to the guide pages behind it.

ENCORE ships no game code or data — bring your own copy. All games are trademarks of their respective owners; ENCORE is not affiliated with them. Each project is GPL-3.0 and runs on gasm.