baoyu-electron-extract

Extracts JavaScript and resources from Electron apps via app.asar unpacking and source maps.

947|163|Updated Jan 13, 2026
One-click install
npx skills add https://github.com/guanyang/open-agent-hub --skill baoyu-electron-extract
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: baoyu-electron-extract
Source: https://github.com/guanyang/open-agent-hub/tree/main/skills/baoyu-electron-extract
Command: npx skills add https://github.com/guanyang/open-agent-hub --skill baoyu-electron-extract

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Extract resources and JavaScript from installed Electron apps by unpacking app.asar and restoring original sources from embedded source maps, when available.

Core Features & Use Cases

  • Decompile Electron apps by extracting code and assets from app.asar while skipping node_modules.
  • Restore original sources from .js.map files when sourcesContent is present, or format minified files with Prettier.
  • Use cases include inspecting desktop apps like Codex, Cursor, Discord, Slack, VS Code, and examining how an Electron app is built.

Quick Start

Run the script with the app name or path to begin extraction.

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 app's asar archive?

You can extract source code from an Electron app by unpacking its app.asar file to retrieve JavaScript and resources, automatically skipping node_modules directories during the extraction process.

Can I restore original source files from source maps in a decompiled Electron app?

Yes, source restoration is possible when embedded .js.map files contain sourcesContent, allowing you to recover original sources directly from the extracted Electron app files instead of viewing minified code.

How does Prettier formatting help when decompiling Electron apps?

Prettier formatting applies to minified JavaScript files when source maps are unavailable, converting compressed code into readable formats during the Electron app extraction process for easier inspection.

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

Yes, the Electron extraction process handles decompilation and source restoration on both macOS and Windows environments, supporting desktop apps like Cursor, Discord, Slack, and VS Code.

What is the best way to inspect how a desktop app like Cursor or Slack is built?

Extracting its Electron app.asar archive allows you to inspect the source code and assets, restoring original sources from embedded source maps or formatting minified files with Prettier for analysis.

How do I specify a custom asar file path for Electron app extraction?

You can auto-discover the Electron app or pass an explicit path using the --asar CLI option, alongside additional flags for output directory configuration and dry-run testing.