offline-game-revival
🎮 AI agent skill that revives shut-down mobile games as fully offline memorial builds — plus a zero-token pipeline that rescues lost game data from screenshots & screen recordings. 停服手游离线化 · 录屏抽帧OCR
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Check it deeper on your machine
It has changed since its scan on 11 Nov 2026.
As a Claude Code plugin, install it and then ask Claude Code:
/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/Cynthia-wlan9509/offline-game-revival with scanskillsafety
Or from a terminal, clone it and run it:
git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/Cynthia-wlan9509/offline-game-revival'
It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.
Badge for your README
Markdown
[](/listings/cynthia-wlan9509--offline-game-revival)HTML
<a href="/listings/cynthia-wlan9509--offline-game-revival"><img src="/api/listings/cynthia-wlan9509--offline-game-revival/badge.svg" alt="findsafeskills safety rating" /></a>Install
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
**Claude Code (plugin marketplace)**
/plugin marketplace add Cynthia-wlan9509/offline-game-revival /plugin install offline-game-revival@offline-game-revival
**Any agent that supports Agent Skills** (Claude Code, OpenAI Codex, Cursor, GitHub Copilot, OpenCode, Goose…) — copy the folder into that agent's skills directory:
git clone https://github.com/Cynthia-wlan9509/offline-game-revival cp -r offline-game-revival/skills/offline-game-revival ~/.claude/skills/ # Claude Code cp -r offline-game-revival/skills/offline-game-revival ~/.codex/skills/ # Codex
Other agents read [`AGENTS.md`](AGENTS.md), which points them to the skill. Sub-agent roles are in [`agents/`](agents).
**Chat only (DeepSeek / ChatGPT / Kimi web)** — paste [`prompts/chat-playbook.md`](prompts/chat-playbook.md) as your first message. The model becomes your lead engineer; you run the commands it gives you and paste back the output.
Then just ask: *"This game's servers shut down — make it playable offline"* or *"Extract the shop prices and gacha rates from these 15 GB of screen recordings."*
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
.claude-plugin/marketplace.json · Manifest · 15 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.
- {
- "name": "offline-game-revival",
- "owner": { "name": "Cynthia-wlan9509" },
- "metadata": {
- "description": "Bring shut-down mobile games back to life as fully offline memorial builds, and rescue lost game data from player screenshots and screen recordings."
- },
- "plugins": [
- {
- "name": "offline-game-revival",
- "source": "./",
- "description": "Turn server-dead mobile games into offline, playable preservation builds (recon, anchor-asserted patches, local fake server, repack, on-device acceptance) and recover server-side numbers from screenshots/recordings with local keyframes + dedupe + OCR.",
- "category": "game-preservation"
- }
- ]
- }
README.md · README · 176 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.
- <div align="center">
- # 🎮 Offline Game Revival
- ### An AI agent skill that brings shut-down mobile games back to life — fully offline, on a real phone.
- **When the servers die, the game shouldn't.**
- [English](README.md) · [简体中文](docs/README.zh-CN.md) · [繁體中文](docs/README.zh-TW.md) · [日本語](docs/README.ja.md) · [한국어](docs/README.ko.md) · [Español](docs/README.es.md) · [Português](docs/README.pt-BR.md) · [Français](docs/README.fr.md) · [Deutsch](docs/README.de.md) · [Русский](docs/README.ru.md) · [Tiếng Việt](docs/README.vi.md) · [Bahasa Indonesia](docs/README.id.md)
- 
- 
- 
- 
- [](https://github.com/Cynthia-wlan9509/offline-game-revival/stargazers)
- </div>
- ---
- Every year, hundreds of mobile games shut down. The APK still sits on players' phones — but without the server it can't log in, can't load a save, can't do anything. Years of stories, characters and memories become unreachable.
- **Offline Game Revival** is a battle-tested playbook packaged as an [Agent Skill](https://docs.claude.com/en/docs/claude-code/skills). Point your coding agent (Claude Code and other agents that read `SKILL.md`) at a dead game's APK, and it knows how to turn it into a **standalone memorial edition**: install the APK, play the whole game, no network, no root, no PC, no runtime injection.
- ## ✨ What's inside
- | | |
- |---|---|
- | 🩺 **Can it be saved?** | Before any patch, answer three questions within half a day: are the game's rules on the phone, is the game itself inside the APK, and how much server-side data can be recovered. Story, idle and card games usually can be saved; games whose battles are computed on the server, or that download the game itself after first launch, usually can't. |
- | 🔍 **Recon** | Unpack the APK, find the real logic layer (Lua / JS / C# transpiled), identify encryption and resource-integrity checks. |
- | ⚡ **Faster triage & tougher recon** *(new)* | Answer "can it be saved?" fast: install the original APK on a rooted emulator, cut the network and cold-start. If the full login screen renders, the game and its assets are there and only the login layer is in the way. For asset bundles where only one stretch is encrypted, pin down the exact encrypted window block by block. Mini-games whose rules live entirely in the client run headless on a PC, so every level can be checked at once. See [`recon.md`](skills/offline-game-revival/references/recon.md) and [`playtest.md`](skills/offline-game-revival/references/playtest.md). |
- | 🧩 **Anchor-asserted patching** | One build entry point. Every code replacement asserts its anchor — if the upstream package changes, the build *fails loudly* instead of shipping a silently broken patch. |
- | 🖥️ **Local fake server** | Intercept the HTTP/JSON layer and answer hundreds of endpoints from a local save. A methodology for mapping every endpoint's caller and what it reads, then generating safe defaults. |
- | 📦 **Repack & re-sign** | Recompute engine cache checksums, rebuild resource tables, zipalign, sign. Includes a reverse-engineered cache-checksum algorithm and loader patches for LayaAir native. |
- | ✅ **On-device acceptance** | "The screen opens" ≠ "it works". State must actually change and survive a cold restart. Tutorial-driven testing: follow the game's own guide steps with real taps. |
- | 🛡️ **Safe releases** *(new)* | Before shipping, install the previous public build, play a save, upgrade over it and diff the save key by key. When installing on the user's own phone, back up the save first and compare it byte for byte afterwards. Rename the package so the memorial edition installs side by side with the official app. See [`verify.md`](skills/offline-game-revival/references/verify.md) and [`patch.md`](skills/offline-game-revival/references/patch.md) (section 5). |
- | 🎞️ **Data rescue from screenshots & recordings** *(new)* | Server-side numbers (shop prices, gacha rates, rewards, card stats) die with the server. `scripts/harvest.py` turns **tens of GB of player screenshots and screen recordings** into a few hundred KB of categorized text — keyframes → near-duplicate removal → local OCR → per-screen grouping — **fully offline, zero tokens**, then `scripts/llm_structure.py` batches it through DeepSeek / OpenAI / Qwen / Kimi / local Ollama into merged JSON + CSV. |
- | ⏩ **Time-travel tests** *(new)* | `scripts/timewarp` runs your fake server in a sandbox with a virtual clock: fast-forward days, restart the app, and **audit every reward** — if a response says "+50 gems" but the save didn't change, it fails. Simulate 30 days of play in a second and see on which day each gate becomes reachable. Zero dependencies. |
- | 🤝 **Any agent, any model** *(new)* | Works with Claude Code, Codex, Cursor, Copilot, OpenCode, Gemini CLI… via `SKILL.md` + `AGENTS.md`. Ships scout / worker / verifier sub-agent roles so an expensive model makes the calls and cheap ones do the legwork. No agent at all? Paste `prompts/chat-playbook.md` into DeepSeek / ChatGPT and run the commands it gives you. |
- | 📚 **Failure ledger** | About 190 KB and 216 entries of real pitfalls: symptom → root cause → fix. Crashes from start-up races, UI that silently moved off-screen, pooled XHR objects "poisoned" by fake responses, saves that never hit disk… |
- ## 🏆 Proven on real games
- The playbook was distilled from reviving five commercial mobile games whose servers shut down:
- - **Case A — Unity + Lua**: full single-player memorial build, verified on a physical Android 14 phone.
- - **Case B — LayaAir native + JavaScript**: 315 server endpoints reimplemented locally, 700+ regression assertions, all major systems (story chapters, battles, gacha, pets, dating, tower, events) clicked through on a device.
- - **Case C — Unity micro client (Mono + SLua)**: the APK held only about a quarter of the game's resources; the rest came from a player's phone backup. Half-encrypted Mono assemblies, a packer shell, and a local server written entirely in Lua.
- - **Case D — native Kotlin + Live2D, AI character chat**: the core feature, chatting with the characters, ran on the publisher's server-side LLM. Chat now goes to the player's own OpenAI-compatible API or a local model, kept in character by cards and sample lines taken from the game's own script; with no model set up, characters reply with their original voiced lines.
- - **Case G — LayaAir + long-connection sproto protocol**: the whole game was in the APK, so the work was the server side: the package shipped its own protocol schema (400+ requests), the systems were rebuilt locally one by one, with an auto-play script that follows the in-game guides with real taps to find the next missing system. Most of what it taught is in the failure ledger: empty default replies that silently lock features, claim refusals that show players a meaningless error, and fake "virtual players" that look broken.
- One more game was dropped after half a day: the game itself was downloaded after first launch, and that download died with the server.
- All five case studies are included (anonymized) in [`references/`](skills/offline-game-revival/references). Notes from two more games (cases E and F) are folded into the reference files rather than written up as separate case studies.
- ## 💸 What it cost
- Most of the work was done with Claude Code on a subscription. To give a sense of scale, here is the token usage from the local session logs (sub-agents included), converted at Anthropic's public API prices. That is a conversion, not what was actually billed.
- | Case | Calendar days | Tokens | At API list price |
- |---|---|---|---|
- | A — Unity + Lua | 18 | 7.4 B | ≈ $2,140 |
- | B — LayaAir native + JS | 9 | 2.6 B | ≈ $720 |
- | C — Unity micro client (Mono + SLua) | 5 | 2.3 B | ≈ $620 |
- | All game-revival work (A + B + C, plus one day of recon on the game that was dropped) | | 12.4 B | ≈ $3,500 |
- The table counts Claude only. With the Codex phase below added, the total is about $3,900.
- - 98.5% of the tokens are cache reads: every turn, the model re-reads the conversation so far, and that is billed at a small fraction of the normal input price. The text the model actually wrote is only about 35 M tokens. (Both figures are measured over all Claude usage in the same period, 14.1 B tokens, not per case.)
- - Case A started with about 10 days in Codex, backed by DeepSeek V4.1 Flash and GPT-6 Astra: about 2.25 B tokens, ≈ $420 at list price. DeepSeek took about 2.0 B tokens for only ≈ $27–54 (off-peak to peak price); GPT-6 Astra took about 0.26 B tokens for ≈ $387.
- - Counted up to 2026-10-25.
- ## 🚀 Install
- **Claude Code (plugin marketplace)**
- ```bash
- /plugin marketplace add Cynthia-wlan9509/offline-game-revival
- /plugin install offline-game-revival@offline-game-revival
- ```
- **Any agent that supports Agent Skills** (Claude Code, OpenAI Codex, Cursor, GitHub Copilot, OpenCode, Goose…) — copy the folder into that agent's skills directory:
- ```bash
- git clone https://github.com/Cynthia-wlan9509/offline-game-revival
- cp -r offline-game-revival/skills/offline-game-revival ~/.claude/skills/ # Claude Code
- cp -r offline-game-revival/skills/offline-game-revival ~/.codex/skills/ # Codex
- ```
- Other agents read [`AGENTS.md`](AGENTS.md), which points them to the skill. Sub-agent roles are in [`agents/`](agents).
- **Chat only (DeepSeek / ChatGPT / Kimi web)** — paste [`prompts/chat-playbook.md`](prompts/chat-playbook.md) as your first message. The model becomes your lead engineer; you run the commands it gives you and paste back the output.
- Then just ask: *"This game's servers shut down — make it playable offline"* or *"Extract the shop prices and gacha rates from these 15 GB of screen recordings."*
- ## 🎞️ Rescue data from screen recordings (standalone)
- The harvester works without any agent:
- ```bash
- pip install -r skills/offline-game-revival/scripts/requirements.txt
- python skills/offline-game-revival/scripts/harvest.py ./player_recordings ./out --limit 50 # trial run
- python skills/offline-game-revival/scripts/harvest.py ./player_recordings ./out # full run, resumable
- export DEEPSEEK_API_KEY=sk-... # or OPENAI_API_KEY, DASHSCOPE_API_KEY…
- python skills/offline-game-revival/scripts/llm_structure.py ./out --limit 2 # structure 2 chunks, check quality
- python skills/offline-game-revival/scripts/llm_structure.py ./out # everything → out/structured/merged.json
- ```
- - **Keyframes that matter**: keeps a frame only when the screen *changed and settled* — skips transition animations and motion blur; long scrolling lists still get sampled.
- - **Cross-source dedupe**: the same screen from a screenshot and from a recording is merged (status bar ignored).
- - **Local OCR** (RapidOCR / ONNX, CPU-only, CJK + Latin) with boxes and reading order.
- - **Output**: `for_llm/*.txt` chunks + a ready-made prompt and JSON schema in [`media-harvest.md`](skills/offline-game-revival/references/media-harvest.md); `llm_structure.py` merges all answers and flags conflicting numbers.
- ## ⏩ Time-travel tests (standalone)
- ```bash
- node skills/offline-game-revival/scripts/timewarp/examples/mini.test.js # 51 passed
- BUGGY=1 node skills/offline-game-revival/scripts/timewarp/examples/mini.test.js # catches 3 planted bugs
- ```
- Point `timewarp.create({ files, entry, inventory, granted })` at your own fake server. Checklist of the time bugs worth testing (reset hour, sign-in loops, regen caps, timers, restart persistence): [`timewarp.md`](skills/offline-game-revival/references/timewarp.md).
- ## 🌙 Night shift (second skill)
- [`skills/night-shift`](skills/night-shift/SKILL.md) lets the agent keep working through a to-do list while you sleep or are away for a few hours. Copy the fill-in [`NIGHT-RUN.md`](skills/night-shift/templates/NIGHT-RUN.md) into your project, run the two-minute checklist, then start `/loop` with no interval. The agent paces its own wake-ups and works one item at a time, handing legwork to sub-agents. Every "done" needs evidence and gets its own commit. Anything it would have to ask you about gets the most conservative default, and it finishes with a five-part report. Nothing in it is game-specific.
- In case C, the first night ran a little over 4 hours and verified 11 items on an emulator, each with a screenshot or log and a commit, dispatching 5 workers and using about half of one 5-hour usage window; another night it random-tapped the game 3,000 times on the emulator with zero crashes.
- It relies on Claude Code desktop features (`/loop`, `ScheduleWakeup`, `request_keep_awake`, `get_usage`, `start_session`); the skill says how to fall back when one is missing (in the plain CLI: sub-agents instead of parallel sessions). The plugin install includes it; to copy it by hand: `cp -r offline-game-revival/skills/night-shift ~/.claude/skills/`.
- ## 🐞 Collecting bug reports
- When you ship a game you made yourself, or a build, fan work or doujin project you have permission to distribute, bug reports keep coming. The skill's [`distribution.md`](skills/offline-game-revival/references/distribution.md) (section 7) describes the loop: players post in a forum, a bot collects and sorts the posts, the agent reproduces and fixes each bug and drafts the reply, and nothing is posted until you approve it. A ready-made Discord bot for this is open source: [hearback](https://github.com/Cynthia-wlan9509/hearback).
- ## 🧭 Philosophy
- 1. **Patch at build time, not at runtime.** A Frida script that "works" still needs to be injected forever. Changes baked into the package install and just work.
- 2. **Single entry point + anchor assertions.** Silent skips ship broken builds.
- 3. **Artifacts are not source.** Fix the patch script, never hand-edit the output.
- 4. **"It opens" is not "it works."** Verify state changes, survive restarts, write down what's verified vs. merely implemented.
- ## ⚖️ Responsible use & disclaimer
- This repository exists to **study how games work** and to preserve games whose official service has ended. It contains only methods and the author's own tools.
- - **No downloads here.** This repository contains no game assets, no game code, no decryption or signing keys and no installation packages, and it offers nothing for download. Please don't ask for them here.
- - **Don't let builds spread.** Keep what you make for personal, non-commercial use, on a copy you obtained lawfully. Please don't publish or resell modified installation packages, game assets or keys, and don't run private servers for profit.
- - **Only for games whose official service has ended.** Please don't use it on live games, for cheating, to get around anti-cheat, or in ways that harm other players or the rights holder.
- - **Follow the law where you live; you are responsible for your own use.** Copyright and anti-circumvention laws differ by country. In the United States, for example, the DMCA (17 U.S.C. §1201) prohibits circumventing technical protection measures except under narrow exemptions, and in the EU decompiling software is allowed only in limited cases. Nothing here is legal advice, and nothing here says that any particular use is legal. If in doubt, ask a lawyer before you start.
- - **No affiliation.** Game names and trademarks belong to their owners. This project is not affiliated with or endorsed by any game company.
- - **No warranty, no liability.** Everything here is provided "as is" under the MIT License. To the maximum extent permitted by law, the author is not liable for any damage, data loss, account action or legal consequence that comes from using it.
- - **Rights holders:** if you believe anything here infringes your rights, please open an issue; we will look into it promptly and remove it if needed. If a game comes back officially, please support the official version.
- By using the contents of this repository you agree to the above.
- ## 🤝 Contributing
- Revived a game with this skill? Hit a new pitfall? **New engine case studies** (Cocos, Unreal, Godot, IL2CPP…) and **new entries for the failure ledger** are very welcome.
- - **Report or ask**: open an [issue](https://github.com/Cynthia-wlan9509/offline-game-revival/issues).
- - **Change something**: fork the repo, edit, and open a pull request. Every PR is reviewed before it is merged.
- - **Help maintain it**: after a few merged PRs, ask in an issue and you can be invited as a collaborator with write access.
- What may and may not go into the repo (no game assets, no keys, no player data) is in [CONTRIBUTING.md](CONTRIBUTING.md).
- If this saved a game you loved, a ⭐ helps other players find it.
- ## ⭐ Star history
- [](https://star-history.com/#Cynthia-wlan9509/offline-game-revival&Date)
- ## 📄 License
- [MIT](LICENSE)
- <sub>Keywords: game preservation · time travel testing · multi-agent · DeepSeek · ChatGPT · Codex · shut down game · server shutdown · offline mode · APK repack · Lua · LayaAir · Unity · reverse engineering for preservation · screen recording OCR · keyframe extraction · Claude Code skill · agent skills · 停服游戏 · 单机化 · 离线版 · 游戏保存 · 録画OCR · サービス終了 · 서비스 종료</sub>
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.