Agent skill

Repack

by jenissimo in jenissimo/bottleship

Turn a game installer/archive/disc (InstallShield, PackageForTheWeb/WinZip-SFX, Inno/GOG, ISO/BIN-CUE, CAB, FreeArc, plain ZIP) into a .wgb bundle using BottleShip's OWN self-hosted format readers —…

Apache-2.0Auto-check passed

Install Repack

skills CLI
$ npx skills add jenissimo/bottleship --skill repack -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jenissimo/bottleship repack --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jenissimo/bottleship.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/repack .claude/skills/repack && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
repack
GitHub stars
131
Token cost
~2k tokens
SKILL.md length
930 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
Apache-2.0

At a glance

Turn a game installer/archive/disc (InstallShield, PackageForTheWeb/WinZip-SFX, Inno/GOG, ISO/BIN-CUE, CAB, FreeArc, plain ZIP) into a .wgb bundle using BottleShip's OWN self-hosted format readers —…

  • Works in 5 steps: Identify the container, pick our reader → Pack with make-wgb (never hand-write JSON) → THE EMPTY-DIRECTORY PITFALL (read this —… → …
  • Packing a new game
  • SKILL.md covers 1. Identify the container,…, 2. Pack with make-wgb (never…, 3. THE EMPTY-DIRECTORY PITFALL… and 4. Inspect / patch an existing…, plus 2 more sections
  • Calls bun and apt

What it does

Repack is an agent skill from jenissimo/bottleship. Turn a game installer/archive/disc (InstallShield, PackageForTheWeb/WinZip-SFX, Inno/GOG, ISO/BIN-CUE, CAB, FreeArc, plain ZIP) into a .wgb bundle using BottleShip's OWN self-hosted format readers — NEVER apt/7-Zip/cabextract/unshield/innoextract. Use when packing a new game, repacking an existing .wgb, or diagnosing a bundle that boots but writes nothing / loops a menu (the empty-directory pitfall). Covers make-wgb, wgb.ts, and the formats/ stack.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It works with TypeScript, WebAssembly and Windows. The repository describes itself as: Run classic Windows games in your browser. A high-level-emulation engine that boots real x86 Windows executables and reimplements Win32, COM and DirectDraw/Direct3D on WebGPU…. The licence is Apache-2.0.

When your agent uses it

  • Packing a new game
  • Repacking an existing .wgb
  • Diagnosing a bundle that boots but writes nothing / loops a menu (the empty-directory pitfall)

Example prompts

  • “/repack”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Identify the container, pick our reader
  2. Pack with make-wgb (never hand-write JSON)
  3. THE EMPTY-DIRECTORY PITFALL (read this — it is brutal to diagnose)
  4. Inspect / patch an existing .wgb
  5. Verify

What it can do on your machine

Read from SKILL.md and the folder at commit 358a9ed. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • bun
    • apt

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Repack loads about 2k tokens when it runs. Until then it costs about 115 tokens; SKILL.md has 930 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~115
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jenissimo/bottleship at commit 358a9ed, republished under its Apache-2.0 licence (© jenissimo). 930 words, ~2,026 tokens.

Download SKILL.mdSave it as .claude/skills/repack/SKILL.md (or your agent's skills folder).
name
repack
description
Turn a game installer/archive/disc (InstallShield, PackageForTheWeb/WinZip-SFX, Inno/GOG, ISO/BIN-CUE, CAB, FreeArc, plain ZIP) into a .wgb bundle using BottleShip's OWN self-hosted format readers — NEVER apt/7-Zip/cabextract/unshield/innoextract. Use when packing a new game, repacking an existing .wgb, or diagnosing a bundle that boots but writes nothing / loops a menu (the empty-directory pitfall). Covers make-wgb, wgb.ts, and the formats/ stack.

BottleShip Repack

Everything to get a game from a distributed installer/archive/disc into a bootable .wgb is self-hosted in this repo. Do NOT install or shell out to a system unpacker (apt install, 7-Zip, cabextract, unshield, innoextract, WINE). The whole point is that .wgb bring-up needs no external native tool and works headless (CI, cron, no root). If a container isn't covered, EXTEND the stack (packages/formats/<fmt> core + a tools/ CLI), don't reach for a binary.

1. Identify the container, pick our reader

DistributionWhat it isOur tool
data1.hdr + data1.cab…InstallShield Cabinet (ISc(, v5/v6+) — most 1998–2003 game installersbun tools/unshield-extract.ts <data1.hdr> <out> [--list]
setup.exe (WinZip-SFX / "PackageForTheWeb")a ZIP or CAB wrapping an InstallShield disk setunwrap outer with cab-extract/zip → then unshield-extract the inner data1.hdr
.cab (MSCF), incl. appended to an SFX stubMicrosoft Cabinet (NONE + MSZIP)bun tools/cab-extract.ts
GOG setup_*.exe / Inno SetupInno headers (LZMA1/2)end-to-end: bun tools/gog-to-wgb.ts; inspect: bun tools/inno-inspect.ts
.iso / .bin+.cueISO9660 / disc imagebun tools/iso-to-wgb.ts; bun tools/bin2iso.ts
.arcFreeArc (srep+LZMA) repackspackages/formats/src/freearc/
.rarstore-only RAR5 wrapper around an installer (typical game drop), incl. .partN.rar setsbun tools/rar-extract.ts <a.rar> <out> [--list] — refuses compressed/solid/encrypted/RAR4
.zip / .wgbstore+deflate ZIP (also the .wgb container)bun tools/wgb.ts
Blizzard setup.exe / .mpqMoPaQ archive appended to a self-extracting stubbun tools/mpq-extract.ts <installer.exe> <out> [--list]
.tar.xz, or a Linux .sh installera tar.xz appended to a shell stub (makeself, YAD Simple Installer) — the shape a Wine-wrapped repack arrives asbun tools/tar-extract.ts <a.sh> <out> [--list] [--filter s] [--strip n] — finds the appended stream itself

A Blizzard installer payload carries no (listfile) — MPQ stores hashes, not names — so --list comes up empty and extraction has to go by block index. The names live in the installer's own script inside the archive (SetupDat\*.ins, the FileBlock lists): dump the blocks, read the script, then map MPQ paths to install paths. Files whose block is encrypted still decrypt: the key is recovered from the sector table.

Cores live in packages/formats/src/<fmt>/; the native codec backend (LZMA1/2/srep) is public/unpack-streaming.wasm (Rust crate tools/build-unpack-streaming). See CLAUDE.md "Archive / installer formats" for the authoritative list.

A Linux repack is a whole Wine prefix, so the game is …/prefix/drive_c/<install dir> and the tarball also carries Wine itself — extract the subtree, not the archive (--filter prefix/ --strip <n>). Beware Git Bash rewriting an argument that looks like a POSIX path: --filter /prefix/ arrives as C:/Program Files/Git/prefix/ and matches nothing (an empty extraction now fails loudly instead of exiting 0). The prefix's system.reg/user.reg are the authoritative record of what the installer wrote and --reg-import reads them directly — with --reg-import-under, since a hive is a whole machine's registry (see §2).

2. Pack with make-wgb (never hand-write JSON)

bun tools/make-wgb.ts <game-dir> <out.wgb> \
    --name "Game Name" --exe GAME.EXE \
    --os win98 --width 1024 --height 768 --bpp 16 \
    --reg-path "Software\Vendor\Game" --skip-video

make-wgb generates manifest.json + registry.json via JSON.stringify (correct \\ escaping) and packs in one step. Never write registry.json/manifest.json by hand (shell heredoc / Write) — backslash escaping is unreliable across editors/linters/hooks. --help prints the full flag list.

Registry from a real install rather than retyped: --reg-import <file> takes an exported .reg OR a Wine prefix's own system.reg/user.reg, and --reg-import-under "Software\Vendor" (repeatable, and an error if it matches nothing) keeps the game's subtree out of the 17 000 other keys a hive carries. --reg-path/--reg-value still win on a value they both name — which is how the install path gets corrected, since the prefix records where the game lived THERE (C:\game\RA3\) and a bundle's rom is the guest's C:\.

Show full SKILL.md (381 more words)Show less

3. THE EMPTY-DIRECTORY PITFALL (read this — it is brutal to diagnose)

A .wgb is a store-only ZIP, and a ZIP has no entry for an empty directory. An installer-created empty folder (user\rosters, user\save\photos, save/config trees) is silently dropped on pack. The game then does fopen("user\rosters\x","wb"), which on Windows does NOT create parent dirs, so the write FAILS — and our VFS faithfully returns null (parentDirectoryExists gate). Symptoms are nasty and non-obvious: the game boots and renders fine but saves nothing, or a menu resets/loops (e.g. Airfix Dogfighter's Enlist → the pilot-roster write failed → login re-opened New-Pilot forever).

Fixes, in order of preference:

  • make-wgb auto-detects empty dirs in the source and writes them to emulator.createDirs. So if your EXTRACT preserved the empty dirs, you're covered for free.
  • If the source already lost them (many extractors don't emit empty dirs either), pass them: --create-dirs "user\rosters,user\save\photos,user\save\levels" (comma/semicolon list, / or \).
  • Existing bundle you can't repack: add the field to the manifest via bun tools/wgb.ts set-manifest <archive.wgb> <manifest.json> (edit JSON, never shell).

At boot the worker calls ensureDirTreeSync (mkdir -p) for each createDirs entry — recreating the installer's on-disk layout. This is the sanctioned mechanism, not a per-game hack.

How to SUSPECT this class: game writes/saves silently no-op, or a "create/confirm" action bounces back. Confirm from a log window around the action — a VFS: openSync(...) CREATE_* parent missing line is the smoking gun. Cross-check what dirs the game expects with the RE service (strings for user\..., save\... paths) and seed exactly those.

4. Inspect / patch an existing .wgb

bun tools/wgb.ts list <a.wgb>              # ls entries
bun tools/wgb.ts manifest <a.wgb>          # print manifest.json
bun tools/wgb.ts cat <a.wgb> <entry>       # dump one entry
bun tools/wgb.ts replace <a.wgb> <entry> <file>
bun tools/wgb.ts patch-manifest <a.wgb> <json.path> <value>   # single field
bun tools/wgb.ts set-manifest <a.wgb> <manifest.json>         # whole manifest

patch-wgb-vram overrides VRAM for an existing bundle. Aliases: ls, x, pm.

Note: the dev server may hold the file handle (EPERM on rename during set-manifest). Stop Vite (PowerShell kill of the vite process), patch, restart.

5. Verify

Load it and drive to the point the pack decision affects (a save, the menu that looped): ?game=dev then window.loadApp('/apps/<name>.wgb'), or the /bringup skill + harness. For a save/dir fix, confirm via bun tools/harness.ts fsStat "C:\\user\\rosters" (isDir=true) and fsList after the game writes — the file should enumerate from the overlay.

Hard rules

  • Self-hosted readers ONLY — no system unpacker, ever. New format ⇒ extend formats/.
  • make-wgb / JSON.stringify for all manifest+registry — never hand-escape backslashes.
  • Empty dirs are invisible in ZIP — trust make-wgb's auto-detect, or seed createDirs.
  • A bundle that boots but won't save ⇒ suspect the empty-dir pitfall FIRST.

© jenissimo, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/repack of jenissimo/bottleship.

Open the folder on GitHubat commit 358a9ed

Compare with similar skills

Repack next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Repack compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Repack this skilljenissimo/bottleship131—~2kAutomated safety check: PassApache-2.0
Build Fluentqt Guicalvinhxx/Fluent-Qt152—~1.6kAutomated safety check: PassMIT
Bun Win32involvex/youtube-music-cli456—~1.1kAutomated safety check: PassMIT
Language Supportlive-codes/livecodes1.5k—~1.6kAutomated safety check: PassMIT
Wine Assembly Connectvgrichina/berrry-wine110—~1.9kAutomated safety check: PassMIT
Dotnet UInovotnyllc/dotnet-artisan233—~1.3kAutomated safety check: PassMIT

Similar skills

  • Build Fluentqt Gui

    calvinhxx/Fluent-Qt

    Create, integrate, redesign, or fix C++ and PySide6 GUIs using FluentQt, including component and Gallery work.

    152 GitHub stars~1.6k tokensUpdated 3 days ago
    Frontend & DesignAuto-check passed
  • Bun Win32

    involvex/youtube-music-cli

    Win32 FFI binding lifecycle for @bun-win32/ packages (Win32 DLL bindings via bun:ffi on Windows).

    456 GitHub stars~1.1k tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Language Support

    live-codes/livecodes

    Work with 90+ supported languages, compilers, CSS processors, and WASM-compiled languages for markup, style, and script editors.

    1.5k GitHub stars~1.6k tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Wine Assembly Connect

    vgrichina/berrry-wine

    Connect to a Windows 98 game or app that a person is running in their browser on wine-assembly, then see its screen and play it with mouse and keyboard.

    110 GitHub stars~1.9k tokensUpdated yesterday
    SecurityAuto-check passed
  • Dotnet UI

    novotnyllc/dotnet-artisan

    Builds .NET UI apps across Blazor (Server, WASM, Hybrid, Auto), MAUI (XAML, MVVM, Shell, Native AOT), Uno Platform (MVUX, Extensions, Toolkit), WPF (.NET 8+, Fluent theme), WinUI 3 (Windows App SDK…

    233 GitHub stars~1.3k tokensUpdated 1 mo ago
    Frontend & DesignAuto-check passed
  • AI Code Mode

    TanStack/ai

    LLM-generated TypeScript execution in sandboxed environments: createCodeModeTool() with isolate drivers (createNodeIsolateDriver, createQuickJSIsolateDriver, createQuickJSBunIsolateDriver…

    3.2k GitHub starsUsed in 1 repo~5.6k tokens
    AI & LLM EngineeringAuto-check passed

More from jenissimo/bottleship

  • Bringup

    jenissimo/bottleship

    Drive and observe the BottleShip emulator to bring up a game, using the AI-agent harness (window.BS.harness + bun tools/harness.ts).

    131 GitHub stars~2.9k tokensUpdated yesterday
    Auto-check passed

Questions about Repack

What does Repack do?

Turn a game installer/archive/disc (InstallShield, PackageForTheWeb/WinZip-SFX, Inno/GOG, ISO/BIN-CUE, CAB, FreeArc, plain ZIP) into a .wgb bundle using BottleShip's OWN self-hosted format readers —…. Repack is an agent skill from jenissimo/bottleship.wgb bundle using BottleShip's OWN self-hosted format readers — NEVER apt/7-Zip/cabextract/unshield/innoextract.

When should I use Repack?

Repack fits situations like: packing a new game; repacking an existing .wgb; diagnosing a bundle that boots but writes nothing / loops a menu (the empty-directory pitfall).

How do I install Repack in Claude Code?

Run `npx skills add jenissimo/bottleship --skill repack -a claude-code`. Or copy the skill folder (.claude/skills/repack in jenissimo/bottleship) into .claude/skills/repack in your project. Claude Code loads it when a task matches its description.

How do I install Repack in Codex?

Run `npx skills add jenissimo/bottleship --skill repack -a codex`. Or copy the skill folder (.claude/skills/repack in jenissimo/bottleship) into .agents/skills/repack in your project. Codex loads it when a task matches its description.

Can I use Repack in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jenissimo/bottleship --skill repack -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/repack, .gemini/skills/repack, .github/skills/repack and .opencode/skills/repack in your project.

What does Repack need to run?

Going by SKILL.md and its folder, Repack needs the command-line tools its instructions call (bun and apt).

Does Repack access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Repack safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Repack use?

Repack is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Repack use?

About 2k tokens (SKILL.md is roughly 8.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Repack?

Skills that share tags, products or a category with Repack: Build Fluentqt Gui (calvinhxx/Fluent-Qt, 152 stars), Bun Win32 (involvex/youtube-music-cli, 456 stars), Language Support (live-codes/livecodes, 1.5k stars) and Wine Assembly Connect (vgrichina/berrry-wine, 110 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Repack?

jenissimo (a GitHub user) maintains it in jenissimo/bottleship, which has 131 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 6, 2026.

Source: jenissimo/bottleship on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.