MCPInstall

reverse-engineer-js

Reverse-engineer minified or obfuscated JavaScript bundles. Primary tool: humanify (humanifyjs) — uses an LLM to rename mangled identifiers back to meaningful names. Default model: gemini-3.8-flash. Use when the user says 'deobfuscate this bundle', 'humanify this', 'rename minified vars', 'reverse engineer this JS', 'what does bundle.js do', or is working in a project with a deobfuscated og/ or modules/ folder fed by humanify. Covers humanify CLI invocation, the pseudo-TTY workaround for cursorTo crashes, single-module extraction from a bundle, and chaining with beautifiers.

Installs
45
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/vladmdgolam/agent-skills --skill reverse-engineer-js
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads reverse-engineer-js automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Reverse Engineer JS

LLM-assisted deobfuscation of minified / mangled JavaScript using humanifyjs plus surrounding tooling for extracting and reintegrating modules.

Tools at a glance

ToolPurposeWhen
humanifyjs (npx)Rename mangled vars/functions via LLMMangled but already valid JS
prettier / js-beautifyReformat single-line minified codeBefore humanify, if needed
webcrackUnpack webpack / browserify bundles into per-module filesWhen bundle is one big file
Source-map sleuthing// # sourceMappingURL=... may exist next to the bundleAlways check first — beats LLM rename

Always check for a sourcemap (bundle.js.map or sourceMappingURL comment in the file) before spending tokens on humanify. If found, original sources are recoverable for free.

Default humanify invocation

Use Gemini unless the user says otherwise:

npx humanifyjs gemini -m "gemini-3.8-flash" -o <outputDir> <inputFile>

Requires GEMINI_API_KEY in env (the project's root .env is the usual place).

Other backends:

# OpenAI
npx humanifyjs openai --apiKey="$OPENAI_API_KEY" --model gpt-4.1-mini bundle.js

# Local (slower, free)
npx humanifyjs local bundle.js

Critical gotchas

1. Pseudo-TTY required in non-interactive shells

humanify calls process.stdout.cursorTo(...) for its progress bar. In Claude Code / CI / piped contexts, stdout is not a TTY and the call crashes with TypeError: process.stdout.cursorTo is not a function.

Wrap the call in script -q /dev/null:

script -q /dev/null npx humanifyjs gemini -m "gemini-3.8-flash" -o "$OUT" "$IN"

(macOS/BSD script syntax. On Linux: script -qc "<cmd>" /dev/null.)

2. Output filename is fixed

humanify always writes its result as <outputDir>/deobfuscated.js regardless of input filename. Don't expect module_1234.js in → module_1234.js out.

3. Long files = long runs

humanify processes top-level declarations sequentially with one LLM call each. A 5 MB bundle can take 30+ minutes. Strategies:

  • Run on single modules extracted from the bundle, not the whole thing
  • Pre-split with webcrack first if the bundle is webpacked
  • Pick the cheapest model that still reads the code well. gemini-3.8-flash is the default here; on a very large bundle a lite variant (gemini-3.5-flash-lite) cuts the per-declaration cost, at some accuracy cost on dense code

4. Keep an archive of the original

Before any rewrite, copy the pristine bundle to archive/bundle.original.js. humanify is non-deterministic and you may want to re-run with a different model.

Workflow A: Whole-bundle deobfuscation

When the bundle is small (<500 KB) or you have time:

mkdir -p archive out
cp bundle.js archive/bundle.original.js
script -q /dev/null npx humanifyjs gemini \
  -m "gemini-3.8-flash" \
  -o out bundle.js
# result: out/deobfuscated.js

Then optionally run prettier --write out/deobfuscated.js for nicer formatting.

Workflow B: Single-module extraction (large bundles)

Common in fxhash / generative-art bundles: a single bundle contains many id: (params) => { ... } modules and you only want to humanify a few interesting ones.

  1. Identify the module ID — search the bundle for distinctive strings, then trace back to the enclosing <id>: (e, t, n) => { opener.
  2. Extract the module body — match the opener, count braces (respecting strings) until the matching }.
  3. Wrap as a standalone arrow — write (e, t, n) => { <body> } to a temp file. humanify needs valid top-level code.
  4. Run humanify — script -q /dev/null npx humanifyjs gemini -m "gemini-3.8-flash" -o "$OUT" "$IN".
  5. Unwrap — strip the (e, t, n) => { ... } shell back off the result.
  6. Save and stub — write the deobf'd body to modules/module_<id>_<name>.js, replace the body in the bundle with a stub like <id>: (e, t, n) => { window.DEOBF[<id>](e, t, n); }.

If the project already has a scripts/deobfuscate.js (or similar), reuse it — the brace-counting / string-escape logic is finicky enough that re-deriving it for each new bundle is a waste. A typical script: takes a numeric module ID, extracts the body from bundle.js, runs humanify on the wrapped function, unwraps, and writes modules/module_<id>_<name>.js.

Workflow C: Webpack bundle → per-module files

When dealing with a webpack bundle, webcrack splits modules cleanly before humanify even runs:

npx webcrack bundle.js -o webcracked/
# Then humanify each module of interest:
script -q /dev/null npx humanifyjs gemini \
  -m "gemini-3.8-flash" \
  -o humanified webcracked/modules/123.js

Examples

Example 1: deobfuscate a small fxhash bundle

User says: "humanify the bundle.js in this fxhash project"

Actions:

  1. Check for sourcemap: head -c 4096 bundle.js | tail -c 200 — look for sourceMappingURL. None? Continue.
  2. Confirm GEMINI_API_KEY in .env. Source it: set -a; source .env; set +a.
  3. Archive: mkdir -p archive && cp bundle.js archive/bundle.original.js.
  4. Run: mkdir -p out && script -q /dev/null npx humanifyjs gemini -m "gemini-3.8-flash" -o out bundle.js.
  5. Beautify: npx prettier --write out/deobfuscated.js.

Result: out/deobfuscated.js with renamed vars, ready to read.

Example 2: deobfuscate one module out of a giant bundle

User says: "Deobfuscate module 3658 from og/bundle.js, name it treeGenerator"

Actions:

  1. If the project already has a deobfuscation helper (e.g. scripts/deobfuscate.js), run it: node scripts/deobfuscate.js 3658 treeGenerator.
  2. Otherwise: extract the module body by brace-counting, wrap as (e, t, n) => { ... }, run humanify with script -q /dev/null, unwrap, save to modules/module_3658_treeGenerator.js, stub the bundle.

Result: New file in modules/ with a readable version of the function; bundle.js shrunk by stubbing.

Example 3: humanify crashed with cursorTo is not a function

User says: "humanify just dies immediately"

Diagnosis: Non-TTY stdout (this is the default in Claude Code's bash tool).

Fix: Re-run wrapped in script -q /dev/null <cmd> (macOS) or script -qc "<cmd>" /dev/null (Linux).

Troubleshooting

cursorTo is not a function

Cause: stdout is not a TTY. Fix: wrap in script -q /dev/null.

GEMINI_API_KEY not set

Cause: humanify reads from process env, not from the project .env automatically. Fix: set -a; source .env; set +a in the same shell, or pass inline: GEMINI_API_KEY=... npx humanifyjs gemini ....

Output is identical to input (no renames)

Cause: humanify only renames identifiers it considers mangled (short, single-letter). Already-readable code is left alone. Fix: confirm the input is actually obfuscated; if names like useState survive that's expected, not a bug.

Rate limits / quota errors from Gemini

Cause: large file, many top-level functions → many sequential LLM calls. Fix: switch to local backend for free local rename, or extract a single module (Workflow B) instead of the whole bundle.

humanify takes hours

Cause: big bundle, sequential per-function calls. Fix: pre-split with webcrack, or only humanify the modules you actually need.

Output directory contains stale deobfuscated.js

Cause: humanify writes to a fixed filename. A failed second run will pick up the previous good output. Fix: rm -f $OUT/deobfuscated.js before each run.

FAQ

What does the reverse-engineer-js skill do?

Reverse-engineer minified or obfuscated JavaScript bundles. Primary tool: humanify (humanifyjs) — uses an LLM to rename mangled identifiers back to meaningful names. Default model: gemini-3.8-flash. Use when the user says 'deobfuscate this bundle', 'humanify this', 'rename minified vars', 'reverse engineer this JS', 'what does bundle.js do', or is working in a project with a deobfuscated og/ or modules/ folder fed by humanify. Covers humanify CLI invocation, the pseudo-TTY workaround for cursorTo crashes, single-module extraction from a bundle, and chaining with beautifiers.

How do I install reverse-engineer-js?

Run npx skills add https://github.com/vladmdgolam/agent-skills --skill reverse-engineer-js in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/reverse-engineer-js/ (personal) or .claude/skills/reverse-engineer-js/ (project).

Which AI agents can use reverse-engineer-js?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is reverse-engineer-js safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains reverse-engineer-js?

It is published by vladmdgolam in vladmdgolam/agent-skills. It has 45 recorded installs.

More from vladmdgolam/agent-skills

View all →

blender-mcp

vladmdgolam/agent-skills

Blender MCP expert for scene inspection, Python scripting, GLTF export, and material/animation extraction. Activate when: (1) using Blender MCP tools (getsceneinfo, executepython, screenshot, etc.), (2) writing Blender Python scripts for extraction or manipulation, (3) exporting scenes to GLTF/GLB for web (Three.js, R3F), (4) debugging material or texture export losses, (5) optimizing GLB files with gltf-transform, (6) using asset integrations (PolyHaven, Sketchfab, Hyper3D Rodin, Hunyuan3D). Covers critical export gotchas, material mapping survival, texture optimization pipeline, headless CLI patterns, and known failure modes.

AI & Agents2.4K installs

cinema4d-mcp

vladmdgolam/agent-skills

Open the skill to read its SKILL.md instructions.

AI & Agents92 installs

visual-feedback-loop

vladmdgolam/agent-skills

Open the skill to read its SKILL.md instructions.

AI & Agents51 installs

pdf-look-scanned

vladmdgolam/agent-skills

Open the skill to read its SKILL.md instructions.

Docs & Writing49 installs

time-lens

vladmdgolam/agent-skills

Open the skill to read its SKILL.md instructions.

AI & Agents45 installs

figma-context-mcp

vladmdgolam/agent-skills

Open the skill to read its SKILL.md instructions.

AI & Agents41 installs

Popular ai & agents skills

View category →

google-agents-cli-publish

google/agents-cli

This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini", "publish to Gemini" (formerly Gemini Enterprise), or needs guidance on the agents-cli publish gemini command. Also use when the user wants to "manage agents in Agent Registry", "list/update/delete registered agents", or "register an MCP server". Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, Agent Registry fleet management, and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment (use google-agents-cli-deploy).

AI & Agents513.9K installs

google-agents-cli-eval

google/agents-cli

This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).

AI & Agents513.5K installs

skill-creator

anthropics/skills

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

OfficialAI & Agents416.4K installs

codex-pet

prime-skills/runcomfy-agent-skills

Codex Pet generator on RunComfy. Build a Codex-compatible Codex Pet spritesheet.webp + pet.json from a single reference image, drop it into ${CODEXHOME:-$HOME/.codex}/pets/ / and Codex picks it up as a custom Codex Pet next to the 8 built-ins. This skill produces the exact Codex Pet atlas Codex expects (1536x1872 PNG/WebP, 8 cols x 9 rows, 192x208 cells, 9 animation states — idle, running-right, running-left, waving, jumping, failed, waiting, running, review). Calls OpenAI GPT Image 2 edit ONCE via the local RunComfy CLI as runcomfy run openai/gpt-image-2/edit to produce a canonical Codex Pet pose, then assembles all 9 animation rows programmatically with ImageMagick micro-transforms — no Codex Pro, no $imagegen, no OPENAIAPIKEY required, only RUNCOMFYTOKEN. Triggers on "codex pet", "create codex pet", "make codex pet", "hatch codex pet", "/hatch image", "desktop pet codex", "codex pets", "spritesheet.webp", or any explicit ask to build a custom pet for OpenAI Codex.

AI & Agents402.1K installs

full-output-enforcement

leonxlnx/taste-skill

Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.

AI & Agents401K installs

executing-plans

obra/superpowers

Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available

AI & Agents245.7K installs