find-jsc-key

find-jsc-key is a command for Claude Code from Crain99/cocos-reverse-engineering-skill. It costs 19 tokens per session (631 once invoked), scanned A, original, MIT.

A command that searches a Cocos Creator game build for the XXTEA key used to encrypt its JavaScript files. Cocos Creator is a tool for making games, and .jsc files are its encrypted script files.

In plain words
What is it for?
Use it to search Cocos Creator 2.x or 3.x build files, reconstruct keys written as byte arrays, and print possible keys for further reverse-engineering work.
Why use it?
It saves time when you need to inspect an encrypted Cocos build and the key may be embedded in common build files. It only performs a text-based lookup, so keys inside native compiled code may remain out of reach.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the cocos-reverse-engineering plugin — 1 skill, 2 commands shipped together

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add Crain99/cocos-reverse-engineering-skill
Claude Code
/plugin install cocos-reverse-engineering

Made for: Claude Code.

Or install cocos-reverse-engineering, the plugin that ships this one along with the rest of its 1 skill, 2 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for find-jsc-key

README.md
[![agentmods](https://agentmods.dev/badge/commands/crain99/cocos-reverse-engineering-skill/find-jsc-key.svg)](https://agentmods.dev/commands/crain99/cocos-reverse-engineering-skill/find-jsc-key)
Your own site
<a href="https://agentmods.dev/commands/crain99/cocos-reverse-engineering-skill/find-jsc-key"><img src="https://agentmods.dev/badge/commands/crain99/cocos-reverse-engineering-skill/find-jsc-key.svg" alt="Measured on agentmods" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 631 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00019 $0.00631
Opus 5 $0.00010 $0.00316
Sonnet 5 $0.00004 $0.00126
Haiku 4.5 $0.00002 $0.00063

Measured 6d ago against content hash cfd1c8aa3f6b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

find-jsc-key scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/cocos-reverse-engineering/commands/find-jsc-key.md · 54 lines

How it starts

The opening of the file, as written. The whole thing — 54 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/find-jsc-key

Search a Cocos Creator build for the XXTEA key used to encrypt its .jsc scripts. This is a focused lookup — use /reverse-cocos for the full workflow.

Instructions

Step 1: Get the target

If the user passed a path, use it. Otherwise ask.

Step 2: Run the key finder

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

It searches:

  • 2.x builds: main.js, src/main.js for xxteaKey, encryptKey, XXTEA_KEY, and literal UUID-shaped strings.
  • 3.x builds: src/settings.json (assets.encrypted), application.js, cocos-js/ bundled scripts.
  • Byte-array keys: [0x61, 0x62, ...] style definitions — the script reconstructs them into strings.

Output is one or more KEY=<value> lines on stdout. Non-KEY= lines are diagnostic.

Step 3: If no key found

Candidates aren't always obvious. Ask the user:

  1. Whether they've seen the key in any developer-shipped docs or SDK strings.
  2. Whether the game uses a native XXTEA wrapper (look for jsb_xxtea references — in that case the key may be inside the native binary, which is out of scope for this text-based lookup).
  3. Try grep -rE '[0-9a-f]{8}-[0-9a-f]{4}' <path>/main.js <path>/src/ — sometimes the key is a bare UUID literal not matched by the main patterns. Show the user the candidates and let them pick.

Step 4: Verify the key

If a KEY= was produced, verify it by decrypting one .jsc file:

bash ${CLAUDE_PLUGIN_ROOT}/skills/cocos-reverse-engineering/scripts/unpack-cocos.sh --scripts-only -k <key> -o /tmp/cc-verify <path>

Then read a few lines from one of the recovered .js files under /tmp/cc-verify/assets/Scripts/. If it looks like valid JavaScript (not random bytes), the key is correct.

Step 5: Pass the key onward

Print the key back to the user in a clearly labelled block so they can copy it, and suggest:

Now run /reverse-cocos <path> — the key will be picked up automatically, or you can pass -k <key> to the unpack script directly.

Read the full file on GitHub · 54 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 54 lines · 19 tokens per session scan A cfd1c8aa3f6b

Subscribe to this mod's changes

find-jsc-key is a command published in the GitHub repository Crain99/cocos-reverse-engineering-skill (37 stars, last pushed 4mo ago), licensed MIT. It adds 19 tokens to every session and 631 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.