Agent skill · software engineering · jimliu

baoyu-electron-extract

Extracts resources and JavaScript from any installed Electron app (`.asar` bundle), restoring original sources from `.js.map` files when available or formatting minified code with Prettier otherwise. Use when user wants to "extract Electron app", "decompile Electron", "get the source code of <app>", "inspect app.asar", "看 Electron 应用源码", "提取 .asar", or asks how a desktop Electron app is built. Skips `node_modules` and supports both macOS and Windows.

Why this skill is useful

Adds a script for extracting and restoring source code from Electron apps, which is not commonly known or available in public documentation.

What it needs

Requires bun, npx installed locally. About 5k tokens when loaded. Last updated 2026-07-04. 24,677 stars on the source repository.

What this skill does

Electron App Extract Extracts resources and code from an installed Electron app's app.asar. When a .js.map is present, restores the original source files from the embedded sourcesContent; otherwise formats the minified code with Prettier. Source-map paths are resolved relative to the .js.map file first, so bundled paths like ../../src/main.ts restore to readable paths such as restored/src/main.ts instead of hashed placeholders. Always skips nodemodules. Works on macOS and Windows. User Input Tools When this skill prompts the user, follow this tool-selection rule (priority order): 1. Prefer built-in user-input tools exposed by the current agent runtime — e.g., AskUserQuestion, requestuserinput, clarify, askuser, or any equivalent. 2. Fallback: if no such tool exists, emit a numbered plain-text message and ask the user to reply with the chosen number/answer for each question. 3. Batching: if the tool supports multiple questions per call, combine all applicable questions into a single call; if only single-question, ask them one at a time in priority order. Concrete AskUserQuestion references below are examples — substitute the local equivalent in other runtimes. Script Directory Scripts in scripts/ subdirectory. {baseDir} = this SKILL.md's directory path. Resolve ${BUNX} runtime: if bun installed → bun; if npx available → npx -y bun; else suggest installing bun. Replace {baseDir} and ${BUNX} with actual values. Script Purpose ----------------- ------------------------------------------------------------------------------ scripts/main.ts App discovery + asar extraction + source-map restoration + Prettier formatting When to use Use this skill whenever the user wants to look inside an installed Electron application or inspect its bundled code. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills jimliu/baoyu-electron-extract

View the source on GitHub

Browse the @skills marketplace