Skip to content

Guide · Agent skill

How to use baoyu-electron-extract to unpack Electron apps

Updated · written with AI from the project's own documentation and checked against our catalogue data

baoyu-electron-extract is an agent skill that finds an installed Electron desktop app, unpacks its app.asar bundle and writes out its resources and JavaScript. It is for developers, students and people auditing what code an app actually contains. After this guide you will know how to install the skill, ask for an extraction in plain language and read the output folder.

Electron App ExtractorJimLiu/baoyu-skills · MIT

Quick start

  1. 1Download and unzip the skill. Download the skill ZIP from the page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder. Or upload it under Settings → Capabilities → Skills in the Claude apps.
  2. 2Check bun or npx. Make sure bun is installed, or that npx is available so the agent can run bun with npx -y bun. Install Prettier as well.
  3. 3Ask for the extraction. Tell the agent which app you want, such as 'extract the Electron app Slack'. You can also give an absolute path to the app or its app.asar file.
  4. 4Confirm the match if asked. If several apps match, the script lists the candidates and stops. Choose the absolute path you want and the agent re-runs with it.
  5. 5Open the restored or extracted folder. Open restored/ if it exists, since it holds the rebuilt source tree. Otherwise read the Prettier-formatted files in extracted/.

What the skill makes the agent do

Many desktop apps, such as Slack, VS Code and Discord, are built with Electron, and their code ships inside an app.asar bundle. With this skill installed, the agent can locate that bundle on your computer, extract it and rebuild readable files.

If the app includes .js.map source maps, the skill restores the original source files from the sourcesContent embedded in them. If there are no source maps, it formats the minified JavaScript with Prettier so it is easier to read. Results go to a folder in your Downloads directory by default.

  • Works with app names or absolute paths, including .app bundles, install folders and .asar files
  • Skips node_modules and webpack runtime entries
  • Supports macOS and Windows

Install the Electron extract skill

Download the ZIP for this skill from the page you are reading. Unzip it into one of these locations, depending on whether you want it available everywhere or in one project:

For all your projects, unzip it into ~/.claude/skills/. For a single project, unzip it into that project's .claude/skills/ folder.

In the Claude apps you can instead upload the skill under Settings → Capabilities → Skills.

  • Personal: ~/.claude/skills/
  • Project only: <your-project>/.claude/skills/
  • Claude apps: Settings → Capabilities → Skills

Install the requirements: bun and Prettier

The script runs with bun. If bun is already installed, the agent uses it directly. If not but npx is available, the agent runs bun through npx -y bun. If neither is available, the skill suggests installing bun first.

Prettier is used to format minified code when an app has no source maps.

  • bun, or npx (to run bun via npx -y bun)
  • Prettier
npx -y bun --version

Trigger the skill with natural requests

You do not need to type a command. Describe what you want in plain language. The skill triggers on phrases such as 'extract Electron app', 'decompile this Electron app', 'unpack app.asar', 'show me the source of <app>' or 'how is <app> built'. Chinese phrases such as '提取 Electron 应用' and '看 <app> 的源码' also trigger it.

If you give only an app name, the agent may ask for the app name or path and, if you want a custom output folder, where to put it. If the agent runs a dry run first, it prints the resolved paths and writes nothing.

  • 'Extract the Electron app Slack and show me the source.'
  • 'Unpack app.asar for /Applications/Visual Studio Code.app.'
  • 'How is Discord built? Get the source code of Discord.'
  • 'Dry-run the extraction for Notion so I can check which bundle it finds.'

Read the output folder

The default output is ~/Downloads/<AppName>-electron-extract/. Look at the subfolder that exists first. If restored/ exists, the original source tree was rebuilt from source maps, and that is the place to start. If only extracted/ exists, the JavaScript and CSS there were formatted with Prettier in place.

When the extraction succeeds, the agent reports the output paths and counts of extracted, restored and formatted files.

  • restored/: source tree rebuilt from .js.map files (read this first)
  • extracted/: raw or Prettier-formatted files when no maps exist
  • Paths like ../../src/main.ts in a source map become restored/src/main.ts

Safety and licence notes

This skill runs scripts on your machine and does not use the network. The output is the app's full code and may expose internal logic or embedded secrets. Use it only on apps you have a legitimate reason to inspect.

The skill itself is MIT licensed. That licence covers the skill, not the app. Copying or redistributing proprietary app code may breach the app's licence or terms of service.

  • Runs scripts: yes
  • Uses network: no
  • Do not copy or redistribute proprietary code from the output

What people use it for

  • Seeing how a desktop Electron app is structured before building a similar app
  • Studying how popular desktop apps are built for coursework or research
  • Auditing which code an installed Electron app actually contains
  • Checking how a source map maps bundled files back to readable paths

Frequently asked questions

How do I install the baoyu-electron-extract skill?

Download the skill ZIP from the page and unzip it into ~/.claude/skills/ for all projects, or into a project's .claude/skills/ folder for one project. You can also upload it in the Claude apps under Settings → Capabilities → Skills.

What do I need to run the Electron extract skill?

You need bun, or npx so the agent can run bun with npx -y bun. You also need Prettier, which formats minified code when an app has no source maps.

Is the Electron app extractor skill free?

The skill is MIT licensed. The licence covers the skill itself, not the code of the apps you extract, which may be covered by the app's own licence or terms of service.

Does it work on Windows as well as macOS?

Yes. The skill supports both macOS and Windows and accepts a .app bundle, a Windows install folder or a .asar file as input.

Why does the agent say it found multiple matches?

More than one installed app or bundle matched the name you gave. The script lists the candidates and exits, so you can choose the absolute path and run the extraction again.

What if the output folder already exists?

The script refuses to write into a non-empty output folder unless you allow it with --force. You can also ask for a different output path with --output.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use this skill if you are a developer, student or auditor who wants to read the code of an installed Electron app on macOS or Windows. Pick something else if you need to reuse or redistribute proprietary app code, or if the app you want to inspect is not built with Electron.

Download the skill