baoyu-electron-extract

Extracts resources and source code from Electron .asar bundles with source-map restoration.

3|Updated Jun 27, 2026
One-click install
npx skills add https://github.com/XinAloha/skills --skill baoyu-electron-extract-xinaloha
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: baoyu-electron-extract
Source: https://github.com/XinAloha/skills/tree/main/engineering/electron-extract
Command: npx skills add https://github.com/XinAloha/skills --skill baoyu-electron-extract-xinaloha

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @electron/asar, prettier, bun, and includes scripts (resource) components.

What problem does it solve?

This skill solves the difficulty of inspecting the internal logic and source code of compiled Electron desktop applications, which are typically bundled into opaque .asar archives.

Core Features & Use Cases

  • Resource Extraction: Unpacks .asar bundles to reveal raw JavaScript, CSS, and assets.
  • Source-Map Restoration: Automatically reconstructs original source code trees from .js.map files when available.
  • Code Formatting: Applies Prettier to minified code to ensure readability when source maps are missing.
  • Use Case: Use this to audit the behavior of a desktop app, understand how a specific feature is implemented, or recover lost source code from an installed application.

Quick Start

Ask the agent to extract the source code of the installed application named Codex and save it to your downloads folder.

Frequently Asked Questions about baoyu-electron-extract

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract source code from an Electron asar file?

To extract source code from an Electron asar file, this Skill unpacks the .asar bundle to reveal raw JavaScript, CSS, and assets. It then automatically reconstructs the original source tree from .js.map files when available.

Can I recover readable source code from a minified Electron app?

You can recover readable code from a minified Electron app by applying Prettier formatting. When source maps are missing, this Skill formats the minified JavaScript automatically to ensure maximum readability for auditing.

Does this Electron decompilation tool work on both macOS and Windows?

Yes, this Electron decompilation process supports automated source-map restoration and Prettier formatting for both macOS and Windows environments. It handles installed application bundles across these operating systems.

What is the best way to reverse engineer a desktop application for security auditing?

The best way to reverse engineer desktop software for security auditing is unpacking the .asar bundle and restoring source maps. This Skill extracts resources and reconstructs the original code tree to analyze internal logic.

Why are my source maps not restoring properly during Electron asar extraction?

Source-map restoration during asar extraction relies on the presence of .js.map files within the original bundle. If the application was compiled without generating source maps, this Skill falls back to Prettier formatting to improve raw code readability.