Logo vun Cocos Reverse Engineering

Cocos Reverse Engineering

Communautéit
Crain99
cocos-reverse-engineering

Reverse engineer Cocos Creator 2.x / 3.x game builds. Detect the engine version, decrypt XXTEA-encrypted .jsc scripts, recover settings/config metadata, rebuild the asset graph (scenes, prefabs, sprite frames, audio, animations, Spine, DragonBones) and emit an editable Cocos project. Use when the user wants to decompile, unpack, or inspect a compiled Cocos Creator game (H5, web-mobile, mini-game, native build).

Iwwersiicht

EditeurCrain99
Repositorycocos-reverse-engineering-skill
Skill-Nummcocos-reverse-engineering
Stären
48
Forks
23
Matgeliwwert Fichieren
12
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 12 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    Vum Crain99 op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Cocos Reverse Engineering an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/Crain99/cocos-reverse-engineering-skill/tree/main/plugins/cocos-reverse-engineering/skills/cocos-reverse-engineering
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Crain99/cocos-reverse-engineering-skill.git /tmp/cocos-reverse-engineering-skill
mkdir -p .claude/skills
cp -r /tmp/cocos-reverse-engineering-skill/plugins/cocos-reverse-engineering/skills/cocos-reverse-engineering .claude/skills/cocos-reverse-engineering
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Cocos Reverse Engineering an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Cocos Reverse Engineering automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Cocos Reverse Engineering net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Cocos Creator Reverse Engineering

Recover the editable project (scripts + scenes + assets + meta) from a compiled Cocos Creator build. Supports Cocos Creator 2.3.x / 2.4.x (the src/project.js + res/ layout and the main.js + assets/ layout) and Cocos Creator 3.x (the assets/main/ bundle layout with config.json + import/ + native/ + cocos-js/). Handles XXTEA-encrypted .jsc scripts via auto key extraction.

The workflow is driven by cc-reverse, a Node.js CLI that this skill wraps and extends with engine detection and decryption helpers.

Prerequisites

This skill requires Node.js 16+ and the cc-reverse CLI installed. Run the dependency checker to verify:

bash
bash ${CLAUDE_PLUGIN_ROOT}/skills/cocos-reverse-engineering/scripts/check-deps.sh

If anything is missing, follow ${CLAUDE_PLUGIN_ROOT}/skills/cocos-reverse-engineering/references/setup-guide.md, or let the install helper handle it:

bash
bash ${CLAUDE_PLUGIN_ROOT}/skills/cocos-reverse-engineering/scripts/install-dep.sh cc-reverse

Workflow

Phase 1: Verify and install dependencies

bash
bash ${CLAUDE_PLUGIN_ROOT}/skills/cocos-reverse-engineering/scripts/check-deps.sh

The output contains machine-readable lines:

  • INSTALL_REQUIRED:<dep> — must be installed before proceeding (node, cc-reverse).
  • INSTALL_OPTIONAL:<dep> — nice-to-have (7z, unzip, ffmpeg for audio format conversion).

If required dependencies are missing (exit code 1), install them:

bash
bash ${CLAUDE_PLUGIN_ROOT}/skills/cocos-reverse-engineering/scripts/install-dep.sh <dep>

Re-run the check until everything passes. Do not proceed to Phase 2 until all required dependencies are OK.

Phase 2: Detect the project layout

Cocos Creator ships three distinct build layouts. Before anything else, identify which one you're looking at — the rest of the workflow branches on this.

Action: Run the detector script.

bash
bash ${CLAUDE_PLUGIN_ROOT}/skills/cocos-reverse-engineering/scripts/detect-project.sh <path-to-build>

It prints ENGINE=<version> (2.3.x, 2.4.x, or 3.x), followed by key paths (settings, bundles, script entry, asset roots, native dirs) and a list of encryption markers. Machine-readable keys:

  • ENGINE= — detected engine series.
  • ENCRYPTED=yes|no — are .jsc files present?
  • BUNDLES=<csv> — detected bundle names (3.x only; main,internal,resources,<subpackages>).
  • WEB_MOBILE=yes|no — is this the web-mobile build (has index.html)?

The detector looks at:

  • src/settings.js + src/project.js + res/ → 2.3.x
  • main.js + settings.js + assets/ + optional subpackages/ → 2.4.x
  • index.html + data/ + assets/main/config.json + cocos-js/ + application.js + src/settings.json → 3.x
  • Web-mobile games packed inside an index.html at the root also work — treat the build dir as the root.
  • HTML5 builds from a ZIP/WAR need to be extracted first (use unzip/7z).

See ${CLAUDE_PLUGIN_ROOT}/skills/cocos-reverse-engineering/references/cocos2x-format.md and cocos3x-format.md for detailed layout maps.

Phase 3: Decrypt JSC (if encrypted)

If Phase 2 reported ENCRYPTED=yes, recover the XXTEA key and decrypt before the main reverse pass.

Action: Try auto-extraction first; fall back to manual key if the user has one.

bash
bash ${CLAUDE_PLUGIN_ROOT}/skills/cocos-reverse-engineering/scripts/find-jsc-key.sh <path-to-build>

This greps main.js, src/main.js, application.js, and cocos-js/ for known key patterns:

  • xxteaKey = "…" / encryptKey = "…" / XXTEA_KEY = "…"
  • key: "<16+ hex>" (Cocos 2.x default is a UUID-shaped string)
  • In 3.x, search src/settings.json → assets.encrypted and application.js for the xxteaKey variable
  • Keys embedded as arrays of bytes ([0x61, 0x62, ...]) — the script normalises these back to a string

Expected output: one or more KEY=<value> lines. If the key is obvious, cc-reverse will find it automatically too; the script is for confirmation and for the cases where cocos-engine ships it as a byte array.

If no key is found, ask the user — don't guess. Unauthorized decryption of encrypted game assets may be restricted by the software's licence.

Reference: ${CLAUDE_PLUGIN_ROOT}/skills/cocos-reverse-engineering/references/jsc-decryption.md.

Phase 4: Run the reverse pass

Drive cc-reverse to rebuild the project.

Action: Run the unpack wrapper, passing the key if one was found.

bash
bash ${CLAUDE_PLUGIN_ROOT}/skills/cocos-reverse-engineering/scripts/unpack-cocos.sh [OPTIONS] <path-to-build>

Options:

  • -o <dir> — output directory (default: <build-name>-extracted).
  • -k <key> — XXTEA key (if Phase 3 produced one).
  • --version-hint 2.3.x|2.4.x|3.x — force engine version when auto-detection fails.
  • --bundle <name> — 3.x only; unpack a specific bundle (main, internal, resources, subpackage name). Default: all bundles.
  • --assets-only — skip the script pass, only recover assets.
  • --scripts-only — skip the asset pass, only recover scripts.
  • --verbose — show per-file progress.

The wrapper runs cc-reverse under the hood and then:

  1. Copies the recovered assets/ tree into the output directory.
  2. Generates a minimal editor-compatible project.json / package.json at the root so the result opens in Cocos Creator.
  3. Writes a RECOVERY_REPORT.md listing engine version, bundle count, script count, and any assets that failed to decode.

For 3.x projects, each bundle is unpacked into its own subdir (assets/main/, assets/resources/, …) — matching the editor's folder layout when a project is re-imported.

See ${CLAUDE_PLUGIN_ROOT}/skills/cocos-reverse-engineering/references/cc-reverse-usage.md for the full CLI reference and troubleshooting matrix.

Phase 5: Inspect and catalogue assets

With the project recovered, navigate and document what's inside.

Actions:

  1. Read the entry point(s):

    • 2.x → assets/Scripts/<main scene>.ts (game bootstrap) and the first entry under scenes in settings.
    • 3.x → assets/main/ scripts (bundled application) plus scene/ for .scene files. Look at application.js / settings.json for the launch scene UUID.
  2. Survey the asset tree:

    bash
    bash ${CLAUDE_PLUGIN_ROOT}/skills/cocos-reverse-engineering/scripts/find-assets.sh <output>/assets

    Prints counts of each asset kind (Scene, Prefab, SpriteFrame, AudioClip, AnimationClip, Spine, DragonBones, Material, Mesh, EffectAsset, …) plus total size and any unrecognised file types.

  3. Map scene → prefab → component dependencies. The .fire/.scene files reference prefabs and components by UUID; the recovered meta files list each asset's UUID. Trace from the scene root down.

  4. Identify third-party SDKs. Cocos games commonly bundle analytics/ads SDKs (AppLovin, Unity Ads, Bugly, GameAnalytics). These usually sit in assets/Scripts/ as large .ts files with recognisable API names.

See ${CLAUDE_PLUGIN_ROOT}/skills/cocos-reverse-engineering/references/asset-recovery-patterns.md for library-specific search patterns and the asset documentation template.

Output

At the end of the workflow, deliver:

  1. Recovered project in the output directory, structured as a regular Cocos Creator project (assets/, project.json, per-asset .meta).
  2. Engine summary — detected version, bundle count, encryption status, key (if any).
  3. Asset catalogue — counts by type, total size, list of any assets that couldn't be decoded.
  4. Script inventory — recovered .ts/.js files grouped by package prefix, with SDK dependencies called out.

References

  • ${CLAUDE_PLUGIN_ROOT}/skills/cocos-reverse-engineering/references/setup-guide.md — installing Node, cc-reverse, and optional tools.
  • ${CLAUDE_PLUGIN_ROOT}/skills/cocos-reverse-engineering/references/cc-reverse-usage.md — cc-reverse CLI reference and cc-reverse.config.js options.
  • ${CLAUDE_PLUGIN_ROOT}/skills/cocos-reverse-engineering/references/cocos2x-format.md — 2.3.x and 2.4.x build layout, CCSettings, compressed-type array format, res/ tree.
  • ${CLAUDE_PLUGIN_ROOT}/skills/cocos-reverse-engineering/references/cocos3x-format.md — 3.x build layout, bundle config.json schema, import//native/ paths, CCON and packed formats.
  • ${CLAUDE_PLUGIN_ROOT}/skills/cocos-reverse-engineering/references/jsc-decryption.md — XXTEA key locations, byte-array keys, gzip post-processing, why decryption sometimes fails.
  • ${CLAUDE_PLUGIN_ROOT}/skills/cocos-reverse-engineering/references/asset-recovery-patterns.md — grep patterns for scenes, prefabs, sprite frames, Spine, DragonBones, and the per-asset documentation template.

Matgeliwwert Fichieren

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Cocos Reverse Engineering?

Reverse engineer Cocos Creator 2.x / 3.x game builds. Detect the engine version, decrypt XXTEA-encrypted .jsc scripts, recover settings/config metadata, rebuild the asset graph (scenes, prefabs, sprite frames, audio, animations, Spine, DragonBones) and emit an editable Cocos project. Use when the user wants to decompile, unpack, or inspect a compiled Cocos Creator game (H5, web-mobile, mini-game, native build).

Firwat Cocos Reverse Engineering op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Cocos Reverse Engineering besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Cocos Reverse Engineering an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/Crain99/cocos-reverse-engineering-skill/tree/main/plugins/cocos-reverse-engineering/skills/cocos-reverse-engineering an. TypingMind liest d'Datei SKILL.md, bündelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Cocos Reverse Engineering benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Cocos Reverse Engineering benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Cocos Reverse Engineering domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Cocos Reverse Engineering gratis?

Jo. De Skill gëtt vum Crain99 ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇